From 5db73589216ace7377ebf100219633904dda231e Mon Sep 17 00:00:00 2001 From: Alayan Date: Tue, 13 Nov 2018 15:50:24 +0100 Subject: [PATCH 01/12] Fix #3559 --- src/achievements/achievements_status.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/achievements/achievements_status.cpp b/src/achievements/achievements_status.cpp index 857de0f0a..7f8741070 100644 --- a/src/achievements/achievements_status.cpp +++ b/src/achievements/achievements_status.cpp @@ -440,7 +440,7 @@ void AchievementsStatus::updateAchievementsProgress(UpdateType type, unsigned in { std::string goal_string[2]; int max_across_tracks = -1; - int min_across_tracks = -1; + int min_across_tracks = INT_MAX; int max_kart_hits = 0; if (type == UP_ACHIEVEMENT_DATA) { From e56a9bdf584deeeb744f64dda1c7314adf526566 Mon Sep 17 00:00:00 2001 From: Alayan Date: Tue, 13 Nov 2018 16:11:28 +0100 Subject: [PATCH 02/12] Fix #3549 --- data/stk_config.xml | 2 +- src/karts/kart.cpp | 24 +++++++++++++----------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/data/stk_config.xml b/data/stk_config.xml index fe8cd1bf2..35d8a6005 100644 --- a/data/stk_config.xml +++ b/data/stk_config.xml @@ -170,7 +170,7 @@ - + diff --git a/src/karts/kart.cpp b/src/karts/kart.cpp index 71772df13..a04a8c483 100644 --- a/src/karts/kart.cpp +++ b/src/karts/kart.cpp @@ -993,17 +993,19 @@ void Kart::finishedRace(float time, bool from_server) RaceGUIBase* m = World::getWorld()->getRaceGUI(); if (m) { - if (race_manager-> - getMinorMode() == RaceManager::MINOR_MODE_FOLLOW_LEADER && - getPosition() == 2) - m->addMessage(_("You won the race!"), this, 2.0f); - else if (race_manager->getMinorMode() == RaceManager::MINOR_MODE_NORMAL_RACE || - race_manager->getMinorMode() == RaceManager::MINOR_MODE_TIME_TRIAL) - { - m->addMessage((getPosition() == 1 ? - _("You won the race!") : _("You finished the race!")) , - this, 2.0f); - } + bool won_the_race = false; + unsigned int win_position = 1; + + if (race_manager->getMinorMode() == RaceManager::MINOR_MODE_FOLLOW_LEADER) + win_position = 2; + + if (getPosition() == (int)win_position && + World::getWorld()->getNumKarts() > win_position) + won_the_race = true; + + m->addMessage((won_the_race ? + _("You won the race!") : _("You finished the race!")) , + this, 2.0f, video::SColor(255, 255, 255, 255), true, true, true); } } From 0d1f760aba2331898ca49d4bd6af439274f5c980 Mon Sep 17 00:00:00 2001 From: Benau Date: Wed, 14 Nov 2018 01:00:59 +0800 Subject: [PATCH 03/12] Try a lower value of min-adjust-length --- data/stk_config.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/stk_config.xml b/data/stk_config.xml index 35d8a6005..3e1d1c445 100644 --- a/data/stk_config.xml +++ b/data/stk_config.xml @@ -555,7 +555,7 @@ max-adjust-time: Maximum time spent in each smoothing stage. adjust-length-threshold: The higher this value, the larger the correction curve. --> - Date: Tue, 13 Nov 2018 19:34:19 +0100 Subject: [PATCH 04/12] Tune more challenge time requirements with the new kart characteristics --- data/challenges/candela_city.challenge | 2 +- data/challenges/granparadiso_island.challenge | 2 +- data/challenges/minigolf.challenge | 2 +- data/challenges/sandtrack.challenge | 6 +++--- data/challenges/snowpeak.challenge | 4 ++-- data/challenges/stk_enterprise.challenge | 2 +- data/challenges/zengarden.challenge | 8 ++++---- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/data/challenges/candela_city.challenge b/data/challenges/candela_city.challenge index b0bba6013..cca9f5e4a 100644 --- a/data/challenges/candela_city.challenge +++ b/data/challenges/candela_city.challenge @@ -7,7 +7,7 @@ - + diff --git a/data/challenges/granparadiso_island.challenge b/data/challenges/granparadiso_island.challenge index 5172258d4..63ea3de7a 100644 --- a/data/challenges/granparadiso_island.challenge +++ b/data/challenges/granparadiso_island.challenge @@ -7,7 +7,7 @@ - + diff --git a/data/challenges/minigolf.challenge b/data/challenges/minigolf.challenge index 9bc87988f..25e391487 100644 --- a/data/challenges/minigolf.challenge +++ b/data/challenges/minigolf.challenge @@ -7,7 +7,7 @@ - + diff --git a/data/challenges/sandtrack.challenge b/data/challenges/sandtrack.challenge index a8fd77e6c..1cb76437c 100644 --- a/data/challenges/sandtrack.challenge +++ b/data/challenges/sandtrack.challenge @@ -7,15 +7,15 @@ - + - + - + diff --git a/data/challenges/snowpeak.challenge b/data/challenges/snowpeak.challenge index b3bee45d1..922acbd5e 100644 --- a/data/challenges/snowpeak.challenge +++ b/data/challenges/snowpeak.challenge @@ -7,11 +7,11 @@ - + - + diff --git a/data/challenges/stk_enterprise.challenge b/data/challenges/stk_enterprise.challenge index 07b6e6fe4..9583a11e7 100644 --- a/data/challenges/stk_enterprise.challenge +++ b/data/challenges/stk_enterprise.challenge @@ -7,7 +7,7 @@ - + diff --git a/data/challenges/zengarden.challenge b/data/challenges/zengarden.challenge index 7c9d9c8bb..d55fc6dac 100644 --- a/data/challenges/zengarden.challenge +++ b/data/challenges/zengarden.challenge @@ -6,15 +6,15 @@ - - + + - + - + From cef9d81e9a9c8a5a5b858fda9705baf770d54dcd Mon Sep 17 00:00:00 2001 From: Alayan Date: Tue, 13 Nov 2018 21:37:07 +0100 Subject: [PATCH 05/12] Make default sound level less loud, fix #3553 --- src/config/user_config.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config/user_config.hpp b/src/config/user_config.hpp index aa7bb8171..5df665ffa 100644 --- a/src/config/user_config.hpp +++ b/src/config/user_config.hpp @@ -394,11 +394,11 @@ namespace UserConfigParams &m_audio_group, "Whether musics are enabled or not (true or false)") ); PARAM_PREFIX FloatUserConfigParam m_sfx_volume - PARAM_DEFAULT( FloatUserConfigParam(1.0, "sfx_volume", + PARAM_DEFAULT( FloatUserConfigParam(0.6f, "sfx_volume", &m_audio_group, "Volume for sound effects, see openal AL_GAIN " "for interpretation") ); PARAM_PREFIX FloatUserConfigParam m_music_volume - PARAM_DEFAULT( FloatUserConfigParam(0.7f, "music_volume", + PARAM_DEFAULT( FloatUserConfigParam(0.5f, "music_volume", &m_audio_group, "Music volume from 0.0 to 1.0") ); // ---- Race setup From 814916a2a6184bafebf5e4aadae2bef75322f4b9 Mon Sep 17 00:00:00 2001 From: Deve Date: Tue, 13 Nov 2018 21:52:09 +0100 Subject: [PATCH 06/12] Try to fix some crashes when closing android activity --- src/main_android.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main_android.cpp b/src/main_android.cpp index 8a43a5e13..2e6e55d4f 100644 --- a/src/main_android.cpp +++ b/src/main_android.cpp @@ -105,7 +105,7 @@ void android_main(struct android_app* app) // its state is remembered when the window is restored. We will use exit // call to make sure that all variables are cleared until a proper fix will // be done. - exit(0); + _exit(0); } #endif From acd749d75f676f2a638ec3a3a0f7a2b421b4a674 Mon Sep 17 00:00:00 2001 From: Alayan Date: Tue, 13 Nov 2018 22:21:44 +0100 Subject: [PATCH 07/12] Fix #3518 --- data/gui/dialogs/select_challenge.stkgui | 8 +++++++- data/gui/dialogs/select_challenge_nobest.stkgui | 8 +++++++- src/states_screens/dialogs/select_challenge.cpp | 17 +++++++++++++++++ src/states_screens/dialogs/select_challenge.hpp | 2 ++ 4 files changed, 33 insertions(+), 2 deletions(-) diff --git a/data/gui/dialogs/select_challenge.stkgui b/data/gui/dialogs/select_challenge.stkgui index c11716c1f..73edac1a9 100644 --- a/data/gui/dialogs/select_challenge.stkgui +++ b/data/gui/dialogs/select_challenge.stkgui @@ -2,7 +2,13 @@
-
+
+ + +
+ + +
diff --git a/data/gui/dialogs/select_challenge_nobest.stkgui b/data/gui/dialogs/select_challenge_nobest.stkgui index d7fd4faa9..6b9532ad2 100644 --- a/data/gui/dialogs/select_challenge_nobest.stkgui +++ b/data/gui/dialogs/select_challenge_nobest.stkgui @@ -2,7 +2,13 @@
-
+
+ + +
+ + +
diff --git a/src/states_screens/dialogs/select_challenge.cpp b/src/states_screens/dialogs/select_challenge.cpp index d3513e808..eecf38265 100644 --- a/src/states_screens/dialogs/select_challenge.cpp +++ b/src/states_screens/dialogs/select_challenge.cpp @@ -174,11 +174,28 @@ void SelectChallengeDialog::updateSolvedIcon(const ChallengeStatus* c, RaceManag } } //updateSolvedIcon +// ----------------------------------------------------------------------------- +void SelectChallengeDialog::onUpdate(float dt) +{ + if (m_self_destroy) + { + ModalDialog::clearWindow(); + ModalDialog::dismiss(); + return; + } +} // onUpdate + // ---------------------------------------------------------------------------- GUIEngine::EventPropagation SelectChallengeDialog::processEvent(const std::string& eventSourceParam) { std::string eventSource = eventSourceParam; + if (eventSource == "back") + { + m_self_destroy = true; + return GUIEngine::EVENT_BLOCK; + } + if (eventSource == "novice" || eventSource == "intermediate" || eventSource == "expert" || eventSource == "supertux") { diff --git a/src/states_screens/dialogs/select_challenge.hpp b/src/states_screens/dialogs/select_challenge.hpp index e6aaabb8b..8677e7486 100644 --- a/src/states_screens/dialogs/select_challenge.hpp +++ b/src/states_screens/dialogs/select_challenge.hpp @@ -30,6 +30,7 @@ class SelectChallengeDialog : public GUIEngine::ModalDialog { private: + bool m_self_destroy = false; std::string m_challenge_id; void updateSolvedIcon(const ChallengeStatus* c, RaceManager::Difficulty diff, const char* widget_name, const char* path); @@ -40,6 +41,7 @@ public: virtual ~SelectChallengeDialog(); virtual GUIEngine::EventPropagation processEvent(const std::string& eventSource); + virtual void onUpdate(float dt); }; #endif From 7cc4c92b31b0367623f39bed32dacc8cfea651f3 Mon Sep 17 00:00:00 2001 From: Deve Date: Wed, 14 Nov 2018 20:59:00 +0100 Subject: [PATCH 08/12] Fixed compilation with current mesa. It fixes #3557. --- lib/glew/include/GL/glew.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/glew/include/GL/glew.h b/lib/glew/include/GL/glew.h index b5b6987fc..a9f9e4b9b 100644 --- a/lib/glew/include/GL/glew.h +++ b/lib/glew/include/GL/glew.h @@ -93,7 +93,7 @@ #if defined(__REGAL_H__) #error Regal.h included before glew.h #endif -#if defined(__glext_h_) || defined(__GLEXT_H_) +#if defined(__glext_h_) || defined(__GLEXT_H_) || defined(__gl_glext_h_) #error glext.h included before glew.h #endif #if defined(__gl_ATI_h_) @@ -109,6 +109,7 @@ #define __X_GL_H #define __glext_h_ #define __GLEXT_H_ +#define __gl_glext_h_ #define __gl_ATI_h_ #if defined(_WIN32) From 2b696d08ff546effd87def8350fcee1c393ccf9a Mon Sep 17 00:00:00 2001 From: Deve Date: Wed, 14 Nov 2018 22:41:20 +0100 Subject: [PATCH 09/12] Give more space for translations --- data/gui/screens/soccer_setup.stkgui | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/gui/screens/soccer_setup.stkgui b/data/gui/screens/soccer_setup.stkgui index 95ffcb059..13b83a681 100644 --- a/data/gui/screens/soccer_setup.stkgui +++ b/data/gui/screens/soccer_setup.stkgui @@ -11,11 +11,11 @@ -
+
- +
From b215bf4d228836a7cc9b04fc6ebca2a051cdf37f Mon Sep 17 00:00:00 2001 From: hiker Date: Thu, 15 Nov 2018 09:39:48 +1100 Subject: [PATCH 10/12] Fixed compiler warnings. --- src/karts/controller/network_ai_controller.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/karts/controller/network_ai_controller.cpp b/src/karts/controller/network_ai_controller.cpp index 85335b839..c23d84e08 100644 --- a/src/karts/controller/network_ai_controller.cpp +++ b/src/karts/controller/network_ai_controller.cpp @@ -81,15 +81,15 @@ void NetworkAIController::convertAIToPlayerActions() if (m_ai_controls->getSteer() < 0.0f) { all_actions.emplace_back(PA_STEER_LEFT, - fabsf(m_ai_controls->getSteer()) * 32768); + int(fabsf(m_ai_controls->getSteer()) * 32768)); } else { all_actions.emplace_back(PA_STEER_RIGHT, - fabsf(m_ai_controls->getSteer()) * 32768); + int(fabsf(m_ai_controls->getSteer()) * 32768)); } all_actions.emplace_back(PA_ACCEL, - m_ai_controls->getAccel() * 32768); + int(m_ai_controls->getAccel() * 32768)); all_actions.emplace_back(PA_BRAKE, m_ai_controls->getBrake() ? 32768 : 0); all_actions.emplace_back(PA_FIRE, From d59f2fdca631faa893f3e9832ba5f7ca83ea9235 Mon Sep 17 00:00:00 2001 From: Deve Date: Thu, 15 Nov 2018 21:43:49 +0100 Subject: [PATCH 11/12] Small clarification in android readme --- android/README.ANDROID | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/android/README.ANDROID b/android/README.ANDROID index 94429d86e..4b7ae45af 100644 --- a/android/README.ANDROID +++ b/android/README.ANDROID @@ -102,7 +102,10 @@ SDK_PATH - Path to SDK directory NDK_PATH - Path to NDK directory PROJECT_VERSION - Set Supertuxkart version number, for example "0.9.3" or - "git20170409" or whatever. + "git20170409" or whatever. The version must match with file + assets/data/supertuxkart.$PROJECT_VERSION + and that file must exist, because it is used for extracting + and loading game data. Default is: git. PROJECT_CODE - Set Supertuxkart version code that is used in the manifest From d8c9fd7fb63fb4de4aad5dcdd4ede23de2bf359d Mon Sep 17 00:00:00 2001 From: Alayan Date: Fri, 16 Nov 2018 03:20:39 +0100 Subject: [PATCH 12/12] Split UI options into general options (new default tab) and UI options --- data/gui/icons/License.txt | 1 + data/gui/icons/options_general.png | Bin 0 -> 4468 bytes data/gui/screens/options_audio.stkgui | 2 + data/gui/screens/options_device.stkgui | 2 + data/gui/screens/options_general.stkgui | 93 +++++++ data/gui/screens/options_input.stkgui | 2 + data/gui/screens/options_language.stkgui | 2 + data/gui/screens/options_players.stkgui | 32 ++- data/gui/screens/options_ui.stkgui | 43 +--- data/gui/screens/options_video.stkgui | 2 + data/gui/screens/user_screen_tab.stkgui | 2 + sources.cmake | 2 +- .../dialogs/race_paused_dialog.cpp | 4 +- src/states_screens/main_menu_screen.cpp | 4 +- .../options/options_screen_audio.cpp | 3 + .../options/options_screen_device.cpp | 3 + .../options/options_screen_general.cpp | 229 ++++++++++++++++++ .../options/options_screen_general.hpp | 61 +++++ .../options/options_screen_input.cpp | 3 + .../options/options_screen_language.cpp | 3 + .../options/options_screen_ui.cpp | 95 +------- .../options/options_screen_video.cpp | 3 + src/states_screens/options/user_screen.cpp | 3 + 23 files changed, 444 insertions(+), 150 deletions(-) create mode 100644 data/gui/icons/options_general.png create mode 100644 data/gui/screens/options_general.stkgui create mode 100644 src/states_screens/options/options_screen_general.cpp create mode 100644 src/states_screens/options/options_screen_general.hpp diff --git a/data/gui/icons/License.txt b/data/gui/icons/License.txt index 3762085cd..ce20ece7f 100644 --- a/data/gui/icons/License.txt +++ b/data/gui/icons/License.txt @@ -41,6 +41,7 @@ crown.png by glitch, from https://openclipart.org/detail/210257/misc-game-crown, ghost_plus.png by Alayan, based on https://openclipart.org/detail/17847/cartoon-ghost by lemmling, released under CC-O options_language.png by Alayan, based on http://www.languageicon.org/, released under CC-BY-SA 3+ +options_general.png by Alayan, released under CC-BY-SA 4 blue_flag.png, heart.png and red_flag.png by Benau, released under CC-BY-SA 4 diff --git a/data/gui/icons/options_general.png b/data/gui/icons/options_general.png new file mode 100644 index 0000000000000000000000000000000000000000..656a440c5d6b4df18dd8026618211f1ba92e179d GIT binary patch literal 4468 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 + + + + +
+
+ + +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+
+
+
diff --git a/data/gui/screens/options_input.stkgui b/data/gui/screens/options_input.stkgui index 9f85e953a..3e1611321 100644 --- a/data/gui/screens/options_input.stkgui +++ b/data/gui/screens/options_input.stkgui @@ -8,6 +8,8 @@
+ + +
+
+ -
- +
- - - - - - - + + + + + + + + + @@ -46,6 +56,4 @@
- - diff --git a/data/gui/screens/options_ui.stkgui b/data/gui/screens/options_ui.stkgui index 0fc9c485a..d1c75f2b7 100644 --- a/data/gui/screens/options_ui.stkgui +++ b/data/gui/screens/options_ui.stkgui @@ -8,6 +8,8 @@
+ - -
- - -
- - - -
- - -
- - - -
- - -
- - - -
- - -
- - - -
- - -
- -
diff --git a/data/gui/screens/options_video.stkgui b/data/gui/screens/options_video.stkgui index b3fa50e62..b6081eed0 100644 --- a/data/gui/screens/options_video.stkgui +++ b/data/gui/screens/options_video.stkgui @@ -8,6 +8,8 @@
+ + push(); + OptionsScreenGeneral::getInstance()->push(); return GUIEngine::EVENT_BLOCK; } else if (selection == "restart") diff --git a/src/states_screens/main_menu_screen.cpp b/src/states_screens/main_menu_screen.cpp index 3107252c4..424af5837 100644 --- a/src/states_screens/main_menu_screen.cpp +++ b/src/states_screens/main_menu_screen.cpp @@ -47,7 +47,7 @@ #include "states_screens/online/online_profile_achievements.hpp" #include "states_screens/online/online_profile_servers.hpp" #include "states_screens/online/online_screen.hpp" -#include "states_screens/options/options_screen_video.hpp" +#include "states_screens/options/options_screen_general.hpp" #include "states_screens/state_manager.hpp" #include "states_screens/options/user_screen.hpp" #if DEBUG_MENU_ITEM @@ -401,7 +401,7 @@ void MainMenuScreen::eventCallback(Widget* widget, const std::string& name, } else if (selection == "options") { - OptionsScreenVideo::getInstance()->push(); + OptionsScreenGeneral::getInstance()->push(); } else if (selection == "quit") { diff --git a/src/states_screens/options/options_screen_audio.cpp b/src/states_screens/options/options_screen_audio.cpp index 3ec86d73e..5f5d4f56b 100644 --- a/src/states_screens/options/options_screen_audio.cpp +++ b/src/states_screens/options/options_screen_audio.cpp @@ -27,6 +27,7 @@ #include "guiengine/widgets/spinner_widget.hpp" #include "guiengine/widget.hpp" #include "io/file_manager.hpp" +#include "states_screens/options/options_screen_general.hpp" #include "states_screens/options/options_screen_input.hpp" #include "states_screens/options/options_screen_language.hpp" #include "states_screens/options/options_screen_ui.hpp" @@ -112,6 +113,8 @@ void OptionsScreenAudio::eventCallback(Widget* widget, const std::string& name, screen = OptionsScreenInput::getInstance(); else if (selection == "tab_ui") screen = OptionsScreenUI::getInstance(); + else if (selection == "tab_general") + screen = OptionsScreenGeneral::getInstance(); else if (selection == "tab_language") screen = OptionsScreenLanguage::getInstance(); if(screen) diff --git a/src/states_screens/options/options_screen_device.cpp b/src/states_screens/options/options_screen_device.cpp index 5e01da7f9..ce6f7cc13 100644 --- a/src/states_screens/options/options_screen_device.cpp +++ b/src/states_screens/options/options_screen_device.cpp @@ -32,6 +32,7 @@ #include "io/file_manager.hpp" #include "states_screens/dialogs/press_a_key_dialog.hpp" #include "states_screens/options/options_screen_audio.hpp" +#include "states_screens/options/options_screen_general.hpp" #include "states_screens/options/options_screen_input.hpp" #include "states_screens/options/options_screen_language.hpp" #include "states_screens/options/options_screen_video.hpp" @@ -550,6 +551,8 @@ void OptionsScreenDevice::eventCallback(Widget* widget, // screen = OptionsScreenInput::getInstance(); else if (selection == "tab_ui") screen = OptionsScreenUI::getInstance(); + else if (selection == "tab_general") + screen = OptionsScreenGeneral::getInstance(); else if (selection == "tab_language") screen = OptionsScreenLanguage::getInstance(); if(screen) diff --git a/src/states_screens/options/options_screen_general.cpp b/src/states_screens/options/options_screen_general.cpp new file mode 100644 index 000000000..a6360ae77 --- /dev/null +++ b/src/states_screens/options/options_screen_general.cpp @@ -0,0 +1,229 @@ +// SuperTuxKart - a fun racing game with go-kart +// Copyright (C) 2009-2015 Marianne Gagnon +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 3 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +#include "states_screens/options/options_screen_general.hpp" + +#include "addons/news_manager.hpp" +#include "audio/sfx_manager.hpp" +#include "audio/sfx_base.hpp" +#include "config/hardware_stats.hpp" +#include "config/player_manager.hpp" +#include "config/user_config.hpp" +#include "font/bold_face.hpp" +#include "font/font_manager.hpp" +#include "font/regular_face.hpp" +#include "graphics/irr_driver.hpp" +#include "guiengine/scalable_font.hpp" +#include "guiengine/screen.hpp" +#include "guiengine/widgets/button_widget.hpp" +#include "guiengine/widgets/check_box_widget.hpp" +#include "guiengine/widgets/dynamic_ribbon_widget.hpp" +#include "guiengine/widgets/label_widget.hpp" +#include "guiengine/widgets/list_widget.hpp" +#include "guiengine/widgets/spinner_widget.hpp" +#include "guiengine/widget.hpp" +#include "io/file_manager.hpp" +#include "online/request_manager.hpp" +#include "states_screens/main_menu_screen.hpp" +#include "states_screens/options/options_screen_audio.hpp" +#include "states_screens/options/options_screen_input.hpp" +#include "states_screens/options/options_screen_language.hpp" +#include "states_screens/options/options_screen_ui.hpp" +#include "states_screens/options/options_screen_video.hpp" +#include "states_screens/state_manager.hpp" +#include "states_screens/options/user_screen.hpp" +#include "utils/log.hpp" +#include "utils/string_utils.hpp" +#include "utils/translation.hpp" + +#include +#include +#include + +using namespace GUIEngine; +using namespace Online; + +// ----------------------------------------------------------------------------- + +OptionsScreenGeneral::OptionsScreenGeneral() : Screen("options_general.stkgui") +{ + m_inited = false; +} // OptionsScreenVideo + +// ----------------------------------------------------------------------------- + +void OptionsScreenGeneral::loadedFromFile() +{ + m_inited = false; +} // loadedFromFile + +// ----------------------------------------------------------------------------- + +void OptionsScreenGeneral::init() +{ + Screen::init(); + RibbonWidget* ribbon = getWidget("options_choice"); + assert(ribbon != NULL); + ribbon->setFocusForPlayer(PLAYER_ID_GAME_MASTER); + ribbon->select( "tab_general", PLAYER_ID_GAME_MASTER ); + + CheckBoxWidget* news = getWidget("enable-internet"); + assert( news != NULL ); + news->setState( UserConfigParams::m_internet_status + ==RequestManager::IPERM_ALLOWED ); + CheckBoxWidget* stats = getWidget("enable-hw-report"); + assert( stats != NULL ); + LabelWidget *stats_label = getWidget("label-hw-report"); + assert( stats_label ); + stats->setState(UserConfigParams::m_hw_report_enable); + + getWidget("enable-lobby-chat") + ->setState(UserConfigParams::m_lobby_chat); + + if(news->getState()) + { + stats_label->setVisible(true); + stats->setVisible(true); + stats->setState(UserConfigParams::m_hw_report_enable); + } + else + { + stats_label->setVisible(false); + stats->setVisible(false); + } + CheckBoxWidget* difficulty = getWidget("perPlayerDifficulty"); + assert( difficulty != NULL ); + difficulty->setState( UserConfigParams::m_per_player_difficulty ); + // I18N: Tooltip in the UI menu. Use enough linebreaks to make sure the text fits the screen in low resolutions. + difficulty->setTooltip(_("In multiplayer mode, players can select handicapped\n(more difficult) profiles on the kart selection screen")); + + CheckBoxWidget* show_login = getWidget("show-login"); + assert( show_login!= NULL ); + show_login->setState( UserConfigParams::m_always_show_login_screen); + +} // init + +// ----------------------------------------------------------------------------- + +void OptionsScreenGeneral::eventCallback(Widget* widget, const std::string& name, const int playerID) +{ +#ifndef SERVER_ONLY + if (name == "options_choice") + { + std::string selection = ((RibbonWidget*)widget)->getSelectionIDString(PLAYER_ID_GAME_MASTER); + + Screen *screen = NULL; + if (selection == "tab_audio") + screen = OptionsScreenAudio::getInstance(); + else if (selection == "tab_video") + screen = OptionsScreenVideo::getInstance(); + else if (selection == "tab_players") + screen = TabbedUserScreen::getInstance(); + else if (selection == "tab_controls") + screen = OptionsScreenInput::getInstance(); + else if (selection == "tab_ui") + screen = OptionsScreenUI::getInstance(); + //else if (selection == "tab_general") + // screen = OptionsScreenGeneral::getInstance(); + else if (selection == "tab_language") + screen = OptionsScreenLanguage::getInstance(); + if(screen) + StateManager::get()->replaceTopMostScreen(screen); + } + else if(name == "back") + { + StateManager::get()->escapePressed(); + } + else if (name=="enable-internet") + { + CheckBoxWidget* internet = getWidget("enable-internet"); + assert( internet != NULL ); + UserConfigParams::m_internet_status = + internet->getState() ? RequestManager::IPERM_ALLOWED + : RequestManager::IPERM_NOT_ALLOWED; + // If internet gets enabled, re-initialise the addon manager (which + // happens in a separate thread) so that news.xml etc can be + // downloaded if necessary. + CheckBoxWidget* stats = getWidget("enable-hw-report"); + LabelWidget* stats_label = getWidget("label-hw-report"); + CheckBoxWidget* chat = getWidget("enable-lobby-chat"); + LabelWidget* chat_label = getWidget("label-lobby-chat"); + if(internet->getState()) + { + NewsManager::get()->init(false); + stats->setVisible(true); + stats_label->setVisible(true); + stats->setState(UserConfigParams::m_hw_report_enable); + chat->setVisible(true); + stats->setState(UserConfigParams::m_lobby_chat); + chat_label->setVisible(true); + } + else + { + chat->setVisible(false); + chat_label->setVisible(false); + stats->setVisible(false); + stats_label->setVisible(false); + PlayerProfile* profile = PlayerManager::getCurrentPlayer(); + if (profile != NULL && profile->isLoggedIn()) + profile->requestSignOut(); + } + } + else if (name=="enable-hw-report") + { + CheckBoxWidget* stats = getWidget("enable-hw-report"); + UserConfigParams::m_hw_report_enable = stats->getState(); + if(stats->getState()) + HardwareStats::reportHardwareStats(); + } + else if (name=="enable-lobby-chat") + { + CheckBoxWidget* chat = getWidget("enable-lobby-chat"); + UserConfigParams::m_lobby_chat = chat->getState(); + } + else if (name=="show-login") + { + CheckBoxWidget* show_login = getWidget("show-login"); + assert( show_login != NULL ); + UserConfigParams::m_always_show_login_screen = show_login->getState(); + } + else if (name=="perPlayerDifficulty") + { + CheckBoxWidget* difficulty = getWidget("perPlayerDifficulty"); + assert( difficulty != NULL ); + UserConfigParams::m_per_player_difficulty = difficulty->getState(); + } +#endif +} // eventCallback + +// ----------------------------------------------------------------------------- + +void OptionsScreenGeneral::tearDown() +{ + Screen::tearDown(); + // save changes when leaving screen + user_config->saveConfig(); +} // tearDown + +// ----------------------------------------------------------------------------- + +void OptionsScreenGeneral::unloaded() +{ + m_inited = false; +} // unloaded + +// ----------------------------------------------------------------------------- diff --git a/src/states_screens/options/options_screen_general.hpp b/src/states_screens/options/options_screen_general.hpp new file mode 100644 index 000000000..2a714966a --- /dev/null +++ b/src/states_screens/options/options_screen_general.hpp @@ -0,0 +1,61 @@ +// SuperTuxKart - a fun racing game with go-kart +// Copyright (C) 2009-2015 Marianne Gagnon +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 3 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +#ifndef __HEADER_OPTIONS_SCREEN_GENERAL_HPP__ +#define __HEADER_OPTIONS_SCREEN_GENERAL_HPP__ + +#include + +#include "guiengine/screen.hpp" + +namespace GUIEngine { class Widget; } + +struct Input; + +/** + * \brief Graphics options screen + * \ingroup states_screens + */ +class OptionsScreenGeneral : public GUIEngine::Screen, public GUIEngine::ScreenSingleton +{ + OptionsScreenGeneral(); + bool m_inited; + + std::vector m_skins; + +public: + friend class GUIEngine::ScreenSingleton; + + /** \brief implement callback from parent class GUIEngine::Screen */ + virtual void loadedFromFile() OVERRIDE; + + /** \brief implement callback from parent class GUIEngine::Screen */ + virtual void eventCallback(GUIEngine::Widget* widget, const std::string& name, + const int playerID) OVERRIDE; + + /** \brief implement callback from parent class GUIEngine::Screen */ + virtual void init() OVERRIDE; + + /** \brief implement callback from parent class GUIEngine::Screen */ + virtual void tearDown() OVERRIDE; + + /** \brief implement optional callback from parent class GUIEngine::Screen */ + virtual void unloaded() OVERRIDE; +}; + +#endif diff --git a/src/states_screens/options/options_screen_input.cpp b/src/states_screens/options/options_screen_input.cpp index 23f4d8a72..db5fa69d2 100644 --- a/src/states_screens/options/options_screen_input.cpp +++ b/src/states_screens/options/options_screen_input.cpp @@ -30,6 +30,7 @@ #include "io/file_manager.hpp" #include "states_screens/options/options_screen_device.hpp" #include "states_screens/options/options_screen_audio.hpp" +#include "states_screens/options/options_screen_general.hpp" #include "states_screens/options/options_screen_language.hpp" #include "states_screens/options/options_screen_video.hpp" #include "states_screens/options/options_screen_ui.hpp" @@ -222,6 +223,8 @@ void OptionsScreenInput::eventCallback(Widget* widget, const std::string& name, // screen = OptionsScreenInput::getInstance(); else if (selection == "tab_ui") screen = OptionsScreenUI::getInstance(); + else if (selection == "tab_general") + screen = OptionsScreenGeneral::getInstance(); else if (selection == "tab_language") screen = OptionsScreenLanguage::getInstance(); if(screen) diff --git a/src/states_screens/options/options_screen_language.cpp b/src/states_screens/options/options_screen_language.cpp index ca4ebe0cf..c742b7dab 100644 --- a/src/states_screens/options/options_screen_language.cpp +++ b/src/states_screens/options/options_screen_language.cpp @@ -40,6 +40,7 @@ #include "online/request_manager.hpp" #include "states_screens/main_menu_screen.hpp" #include "states_screens/options/options_screen_audio.hpp" +#include "states_screens/options/options_screen_general.hpp" #include "states_screens/options/options_screen_input.hpp" #include "states_screens/options/options_screen_ui.hpp" #include "states_screens/options/options_screen_video.hpp" @@ -139,6 +140,8 @@ void OptionsScreenLanguage::eventCallback(Widget* widget, const std::string& nam screen = OptionsScreenInput::getInstance(); else if (selection == "tab_ui") screen = OptionsScreenUI::getInstance(); + else if (selection == "tab_general") + screen = OptionsScreenGeneral::getInstance(); //else if (selection == "tab_language") // screen = OptionsScreenLanguage::getInstance(); if(screen) diff --git a/src/states_screens/options/options_screen_ui.cpp b/src/states_screens/options/options_screen_ui.cpp index 96ed74917..d448becd7 100644 --- a/src/states_screens/options/options_screen_ui.cpp +++ b/src/states_screens/options/options_screen_ui.cpp @@ -40,6 +40,7 @@ #include "online/request_manager.hpp" #include "states_screens/main_menu_screen.hpp" #include "states_screens/options/options_screen_audio.hpp" +#include "states_screens/options/options_screen_general.hpp" #include "states_screens/options/options_screen_input.hpp" #include "states_screens/options/options_screen_language.hpp" #include "states_screens/options/options_screen_video.hpp" @@ -163,39 +164,6 @@ void OptionsScreenUI::init() CheckBoxWidget* fps = getWidget("showfps"); assert( fps != NULL ); fps->setState( UserConfigParams::m_display_fps ); - CheckBoxWidget* news = getWidget("enable-internet"); - assert( news != NULL ); - news->setState( UserConfigParams::m_internet_status - ==RequestManager::IPERM_ALLOWED ); - CheckBoxWidget* stats = getWidget("enable-hw-report"); - assert( stats != NULL ); - LabelWidget *stats_label = getWidget("label-hw-report"); - assert( stats_label ); - stats->setState(UserConfigParams::m_hw_report_enable); - - getWidget("enable-lobby-chat") - ->setState(UserConfigParams::m_lobby_chat); - - if(news->getState()) - { - stats_label->setVisible(true); - stats->setVisible(true); - stats->setState(UserConfigParams::m_hw_report_enable); - } - else - { - stats_label->setVisible(false); - stats->setVisible(false); - } - CheckBoxWidget* difficulty = getWidget("perPlayerDifficulty"); - assert( difficulty != NULL ); - difficulty->setState( UserConfigParams::m_per_player_difficulty ); - // I18N: Tooltip in the UI menu. Use enough linebreaks to make sure the text fits the screen in low resolutions. - difficulty->setTooltip(_("In multiplayer mode, players can select handicapped\n(more difficult) profiles on the kart selection screen")); - - CheckBoxWidget* show_login = getWidget("show-login"); - assert( show_login!= NULL ); - show_login->setState( UserConfigParams::m_always_show_login_screen); // --- select the right skin in the spinner bool currSkinFound = false; @@ -243,6 +211,8 @@ void OptionsScreenUI::eventCallback(Widget* widget, const std::string& name, con screen = OptionsScreenInput::getInstance(); //else if (selection == "tab_ui") // screen = OptionsScreenUI::getInstance(); + else if (selection == "tab_general") + screen = OptionsScreenGeneral::getInstance(); else if (selection == "tab_language") screen = OptionsScreenLanguage::getInstance(); if(screen) @@ -282,65 +252,6 @@ void OptionsScreenUI::eventCallback(Widget* widget, const std::string& name, con assert( fps != NULL ); UserConfigParams::m_display_fps = fps->getState(); } - else if (name=="enable-internet") - { - CheckBoxWidget* internet = getWidget("enable-internet"); - assert( internet != NULL ); - UserConfigParams::m_internet_status = - internet->getState() ? RequestManager::IPERM_ALLOWED - : RequestManager::IPERM_NOT_ALLOWED; - // If internet gets enabled, re-initialise the addon manager (which - // happens in a separate thread) so that news.xml etc can be - // downloaded if necessary. - CheckBoxWidget* stats = getWidget("enable-hw-report"); - LabelWidget* stats_label = getWidget("label-hw-report"); - CheckBoxWidget* chat = getWidget("enable-lobby-chat"); - LabelWidget* chat_label = getWidget("label-lobby-chat"); - if(internet->getState()) - { - NewsManager::get()->init(false); - stats->setVisible(true); - stats_label->setVisible(true); - stats->setState(UserConfigParams::m_hw_report_enable); - chat->setVisible(true); - stats->setState(UserConfigParams::m_lobby_chat); - chat_label->setVisible(true); - } - else - { - chat->setVisible(false); - chat_label->setVisible(false); - stats->setVisible(false); - stats_label->setVisible(false); - PlayerProfile* profile = PlayerManager::getCurrentPlayer(); - if (profile != NULL && profile->isLoggedIn()) - profile->requestSignOut(); - } - } - else if (name=="enable-hw-report") - { - CheckBoxWidget* stats = getWidget("enable-hw-report"); - UserConfigParams::m_hw_report_enable = stats->getState(); - if(stats->getState()) - HardwareStats::reportHardwareStats(); - } - else if (name=="enable-lobby-chat") - { - CheckBoxWidget* chat = getWidget("enable-lobby-chat"); - UserConfigParams::m_lobby_chat = chat->getState(); - } - else if (name=="show-login") - { - CheckBoxWidget* show_login = getWidget("show-login"); - assert( show_login != NULL ); - UserConfigParams::m_always_show_login_screen = show_login->getState(); - } - else if (name=="perPlayerDifficulty") - { - CheckBoxWidget* difficulty = getWidget("perPlayerDifficulty"); - assert( difficulty != NULL ); - UserConfigParams::m_per_player_difficulty = difficulty->getState(); - } #endif } // eventCallback diff --git a/src/states_screens/options/options_screen_video.cpp b/src/states_screens/options/options_screen_video.cpp index 2121706bc..e2d66cb6a 100644 --- a/src/states_screens/options/options_screen_video.cpp +++ b/src/states_screens/options/options_screen_video.cpp @@ -31,6 +31,7 @@ #include "io/file_manager.hpp" #include "states_screens/dialogs/custom_video_settings.hpp" #include "states_screens/options/options_screen_audio.hpp" +#include "states_screens/options/options_screen_general.hpp" #include "states_screens/options/options_screen_input.hpp" #include "states_screens/options/options_screen_language.hpp" #include "states_screens/options/options_screen_ui.hpp" @@ -513,6 +514,8 @@ void OptionsScreenVideo::eventCallback(Widget* widget, const std::string& name, screen = OptionsScreenInput::getInstance(); else if (selection == "tab_ui") screen = OptionsScreenUI::getInstance(); + else if (selection == "tab_general") + screen = OptionsScreenGeneral::getInstance(); else if (selection == "tab_language") screen = OptionsScreenLanguage::getInstance(); if(screen) diff --git a/src/states_screens/options/user_screen.cpp b/src/states_screens/options/user_screen.cpp index 73cf7cf1e..5e6180699 100644 --- a/src/states_screens/options/user_screen.cpp +++ b/src/states_screens/options/user_screen.cpp @@ -36,6 +36,7 @@ #include "states_screens/dialogs/recovery_dialog.hpp" #include "states_screens/main_menu_screen.hpp" #include "states_screens/options/options_screen_audio.hpp" +#include "states_screens/options/options_screen_general.hpp" #include "states_screens/options/options_screen_input.hpp" #include "states_screens/options/options_screen_language.hpp" #include "states_screens/options/options_screen_ui.hpp" @@ -748,6 +749,8 @@ void TabbedUserScreen::eventCallback(GUIEngine::Widget* widget, screen = OptionsScreenInput::getInstance(); else if (selection == "tab_ui") screen = OptionsScreenUI::getInstance(); + else if (selection == "tab_general") + screen = OptionsScreenGeneral::getInstance(); else if (selection == "tab_language") screen = OptionsScreenLanguage::getInstance(); if(screen)