Zoom binds + shiftBrick; click norm Y

This commit is contained in:
RallyBlock committed 2026-11-10 01:58:28 -05:00
1 parent b5a847d418
commit 59b7b3e4df
1 file changed
+31 -3
+31 -3
View File
@@ -56,7 +56,7 @@ function RPGClient_NormScreenPos(%pos)
%h = 1;
}
%x = getWord(%pos, 0) / %w;
%y = 1 - getWord(%pos, 1) / %h;
%y = getWord(%pos, 1) / %h;
return RPGClient_ClampNorm(%x, %y);
}
@@ -467,6 +467,10 @@ function RPGClient_StockMoveMapBinds()
moveMap.bind(keyboard, d, moveright);
moveMap.bind(keyboard, left, invLeft);
moveMap.bind(keyboard, right, invRight);
moveMap.bind(keyboard, equals, RPGClient_ZoomIn);
moveMap.bind(keyboard, minus, RPGClient_ZoomOut);
moveMap.bind(keyboard, "[", RPGClient_ZoomIn);
moveMap.bind(keyboard, "]", RPGClient_ZoomOut);
}
function RPGClient_RestoreMoveMap()
@@ -696,7 +700,7 @@ function RPGClient_ZoomIn(%val)
}
if (%val)
{
$RPGClient::Dist = getMax($RPGClient::DistMin, $RPGClient::Dist - 1.2);
$RPGClient::Dist = getMax($RPGClient::DistMin, $RPGClient::Dist - 2.5);
RPGClient_ApplyCamera(1);
}
}
@@ -713,7 +717,7 @@ function RPGClient_ZoomOut(%val)
}
if (%val)
{
$RPGClient::Dist = getMin($RPGClient::DistMax, $RPGClient::Dist + 1.2);
$RPGClient::Dist = getMin($RPGClient::DistMax, $RPGClient::Dist + 2.5);
RPGClient_ApplyCamera(1);
}
}
@@ -1160,6 +1164,30 @@ package RPGClient_Input
};
activatePackage(RPGClient_Input);
package RPGClient_ZoomKeys
{
function shiftBrickUp(%val)
{
if (RPGClient_RpgKeys() && %val)
{
RPGClient_ZoomIn(1);
return;
}
Parent::shiftBrickUp(%val);
}
function shiftBrickDown(%val)
{
if (RPGClient_RpgKeys() && %val)
{
RPGClient_ZoomOut(1);
return;
}
Parent::shiftBrickDown(%val);
}
};
activatePackage(RPGClient_ZoomKeys);
package RPGClient_MapStack
{
function noHudGui::onWake(%this)