public void ChangeLimit(int val) { if (chosenResourceID == -1) { return; } int x = dockSystem.minValueForTrading[chosenResourceID]; x += val; if (x < 0) { x = 0; } dockSystem.ChangeMinValue(chosenResourceID, x); showingLimit = x; limitInputField.text = showingLimit.ToString(); showingLimit = x; }
public void LimitChangeButton(int resourceID, bool plus) { int x = dockSystem.minValueForTrading[resourceID]; x += MIN_VALUE_CHANGING_STEP * (plus ? 1 : -1); if (x < 0) { x = 0; } dockSystem.ChangeMinValue(resourceID, x); RefreshTradeOperationsList(); }