forked from 0ad/0ad
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:
parent
bc93f51a1c
commit
06fae58904
@ -1333,10 +1333,14 @@ var g_BatchSize = getDefaultBatchTrainingSize();
|
||||
|
||||
function OnTrainMouseWheel(dir)
|
||||
{
|
||||
if (Engine.HotkeyIsPressed("session.batchtrain"))
|
||||
g_BatchSize += dir / Engine.ConfigDB_GetValue("user", "gui.session.scrollbatchratio");
|
||||
if (!Engine.HotkeyIsPressed("session.batchtrain"))
|
||||
return;
|
||||
|
||||
g_BatchSize += dir / Engine.ConfigDB_GetValue("user", "gui.session.scrollbatchratio");
|
||||
if (g_BatchSize < 1 || !Number.isFinite(g_BatchSize))
|
||||
g_BatchSize = 1;
|
||||
|
||||
updateSelectionDetails();
|
||||
}
|
||||
|
||||
function getBuildingsWhichCanTrainEntity(entitiesToCheck, trainEntType)
|
||||
|
Loading…
Reference in New Issue
Block a user