From 0547e1e4691a4a81c2b37bf235f1becafdef3a52 Mon Sep 17 00:00:00 2001 From: riso <4726939+risostk@users.noreply.github.com> Date: Mon, 23 Sep 2019 08:59:17 -0500 Subject: [PATCH] Add options to control the number of red/blue AI in soccer mode (#4063) * Add options to control the number of red/blue AI in soccer mode (offline) * fix a bug related to the upper bound when AI num=0 and trying to lower the number * forgot to fix this * remove the Balanced/Custom spinner * improve the AI number spinner's behavior at lower bound * Hide blue ai number setting if not soccer * move getting red/blue players number to function TrackInfoScreen::getRedBluePlayerNumber() * Tab to Space * rename local variable m_xxx to num_xxx * bug fix * improve the default AI number: try the previously used one, if cannot use the previous, recalculate the AI number using balanced --- data/gui/screens/track_info.stkgui | 9 + src/config/user_config.hpp | 6 + src/modes/world.cpp | 33 +-- src/states_screens/track_info_screen.cpp | 243 ++++++++++++++++++++--- src/states_screens/track_info_screen.hpp | 15 ++ 5 files changed, 243 insertions(+), 63 deletions(-) diff --git a/data/gui/screens/track_info.stkgui b/data/gui/screens/track_info.stkgui index 08abe0f0b..9620b89d4 100644 --- a/data/gui/screens/track_info.stkgui +++ b/data/gui/screens/track_info.stkgui @@ -64,6 +64,15 @@