mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-20 07:46:43 +00:00
Reload wheel-adjusted batchsize immediately
Commented by: elexis Differential Revision: https://code.wildfiregames.com/D1742 This was SVN commit r22227.
This commit is contained in:
@@ -1333,10 +1333,14 @@ var g_BatchSize = getDefaultBatchTrainingSize();
|
|||||||
|
|
||||||
function OnTrainMouseWheel(dir)
|
function OnTrainMouseWheel(dir)
|
||||||
{
|
{
|
||||||
if (Engine.HotkeyIsPressed("session.batchtrain"))
|
if (!Engine.HotkeyIsPressed("session.batchtrain"))
|
||||||
g_BatchSize += dir / Engine.ConfigDB_GetValue("user", "gui.session.scrollbatchratio");
|
return;
|
||||||
|
|
||||||
|
g_BatchSize += dir / Engine.ConfigDB_GetValue("user", "gui.session.scrollbatchratio");
|
||||||
if (g_BatchSize < 1 || !Number.isFinite(g_BatchSize))
|
if (g_BatchSize < 1 || !Number.isFinite(g_BatchSize))
|
||||||
g_BatchSize = 1;
|
g_BatchSize = 1;
|
||||||
|
|
||||||
|
updateSelectionDetails();
|
||||||
}
|
}
|
||||||
|
|
||||||
function getBuildingsWhichCanTrainEntity(entitiesToCheck, trainEntType)
|
function getBuildingsWhichCanTrainEntity(entitiesToCheck, trainEntType)
|
||||||
|
|||||||
Reference in New Issue
Block a user