From 4508e882910c7d3c900816a9ddf2a863a51c19f0 Mon Sep 17 00:00:00 2001 From: iobyte Date: Sat, 25 Apr 2020 14:28:48 +0000 Subject: [PATCH] remove unused carsettingsmenu files (it was replaced by garagemenu) git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@6958 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 9e95d128cb85056cdd6eabe9f8cf1e9cc56568d0 Former-commit-id: 446f408b161e1ab6581862840dc4e39f22dcd259 --- .../userinterface/legacymenu/CMakeLists.txt | 4 +- .../confscreens/carsettingsmenu.cpp | 108 ------------------ .../legacymenu/confscreens/carsettingsmenu.h | 43 ------- .../racescreens/csnetworkingmenu.cpp | 2 - .../legacymenu/racescreens/networkingmenu.cpp | 2 - 5 files changed, 2 insertions(+), 157 deletions(-) delete mode 100644 src/modules/userinterface/legacymenu/confscreens/carsettingsmenu.cpp delete mode 100644 src/modules/userinterface/legacymenu/confscreens/carsettingsmenu.h diff --git a/src/modules/userinterface/legacymenu/CMakeLists.txt b/src/modules/userinterface/legacymenu/CMakeLists.txt index e3cfb2659..12eceeabb 100644 --- a/src/modules/userinterface/legacymenu/CMakeLists.txt +++ b/src/modules/userinterface/legacymenu/CMakeLists.txt @@ -19,14 +19,14 @@ SET(CONFSCREENS_SOURCES ${CS}/playerconfig.cpp ${CS}/controlconfig.cpp ${CS}/displayconfig.cpp ${CS}/graphconfig.cpp ${CS}/openglconfig.cpp ${CS}/monitorconfig.cpp ${CS}/advancedgraphconfig.cpp ${CS}/simuconfig.cpp ${CS}/soundconfig.cpp ${CS}/aiconfig.cpp - ${CS}/carsettingsmenu.cpp ${CS}/hostsettingsmenu.cpp) + ${CS}/hostsettingsmenu.cpp) SET(CONFSCREENS_HEADERS ${CS}/confscreens.h ${CS}/advancedgraphconfig.h ${CS}/playerconfig.h ${CS}/controlconfig.h ${CS}/joystickconfig.h ${CS}/mouseconfig.h ${CS}/joy2butconfig.h ${CS}/monitorconfig.h ${CS}/displayconfig.h ${CS}/graphconfig.h ${CS}/openglconfig.h ${CS}/simuconfig.h ${CS}/soundconfig.h ${CS}/aiconfig.h - ${CS}/carsettingsmenu.h ${CS}/hostsettingsmenu.h) + ${CS}/hostsettingsmenu.h) IF(OPTION_SDL_FORCEFEEDBACK) SET(CONFSCREENS_SOURCES ${CONFSCREENS_SOURCES} ${CS}/forcefeedbackconfig.cpp) diff --git a/src/modules/userinterface/legacymenu/confscreens/carsettingsmenu.cpp b/src/modules/userinterface/legacymenu/confscreens/carsettingsmenu.cpp deleted file mode 100644 index 1c7e3fa1d..000000000 --- a/src/modules/userinterface/legacymenu/confscreens/carsettingsmenu.cpp +++ /dev/null @@ -1,108 +0,0 @@ -/*************************************************************************** - - file : carsettingsmenu.cpp - created : December 2009 - copyright : (C) 2009 Brian Gavin - web : speed-dreams.sourceforge.net - - ***************************************************************************/ - -/*************************************************************************** - * * - * 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 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - - -/* -This file deals with car settings -*/ - -#include -#ifdef CLIENT_SERVER -#include -#else -#include -#endif - -#include "carsettingsmenu.h" - - -static void *pPrevMenu = NULL; -std::string CarSettingsMenu::m_strCar; - -void CarSettingsMenu::onActivate(void *P) -{ - -} - -void CarSettingsMenu::onCarPick(tComboBoxInfo *pInfo) -{ - m_strCar = pInfo->vecChoices[pInfo->nPos]; -} - -void CarSettingsMenu::onAccept(void *p) -{ - GfCar *pCar = GfCars::self()->getCarWithName(m_strCar); - NetGetNetwork()->SetCarInfo(pCar->getId().c_str()); - GfuiScreenActivate(pPrevMenu); -} - -void CarSettingsMenu::onCancel(void *p) -{ - GfuiScreenActivate(pPrevMenu); -} - -CarSettingsMenu::CarSettingsMenu() -: GfuiMenuScreen("carselectionmenu.xml") -{ -} - -bool CarSettingsMenu::initialize(void* pMenu,const char *pszCar) -{ - std::string strCarCat; - bool bCollisions; - NetGetNetwork()->GetHostSettings(strCarCat,bCollisions); - pPrevMenu = pMenu; - - void* pMenuHandle = GfuiScreenCreate(NULL,NULL,onActivate, - NULL, (tfuiCallback)NULL, - 1); - setMenuHandle(pMenuHandle); - - openXMLDescriptor(); - - createStaticControls(); - - int carCatId = createComboboxControl("modelcombo",NULL,onCarPick); - createComboboxControl("skincombo",NULL,NULL); - createStaticImageControl("carpreviewimage"); - createProgressbarControl("topspeedprogress"); - createProgressbarControl("accelerationprogress"); - createProgressbarControl("handlingprogress"); - createProgressbarControl("brakingprogress"); - - const std::vector vecCarRealNames = - GfCars::self()->getCarNamesInCategory(strCarCat); - - m_strCar = pszCar; - int carIndex = 0; - for (unsigned i=0;i - -#include "confscreens.h" - - -class CarSettingsMenu : public GfuiMenuScreen -{ -public: - - CarSettingsMenu(); - bool initialize(void *pPrevMenu,const char *pzaCar); -protected: - //callback functions must be static - static void onActivate(void *p); - static void onAccept(void *p); - static void onCancel(void *p); - static void onCarPick(tComboBoxInfo * pInfo); - - static std::string m_strCar; -}; - -#endif /* _CARSETTINGSMENU_H_ */ diff --git a/src/modules/userinterface/legacymenu/racescreens/csnetworkingmenu.cpp b/src/modules/userinterface/legacymenu/racescreens/csnetworkingmenu.cpp index c75df8a29..dcba699bd 100644 --- a/src/modules/userinterface/legacymenu/racescreens/csnetworkingmenu.cpp +++ b/src/modules/userinterface/legacymenu/racescreens/csnetworkingmenu.cpp @@ -43,7 +43,6 @@ #include #include #include -#include #include "legacymenu.h" #include "racescreens.h" @@ -87,7 +86,6 @@ std::string g_strHostPort = "28500"; static std::string g_strTempConfig = ""; HostSettingsMenu g_HostMenu; -CarSettingsMenu g_CarMenu; // The car selection menu. static RmGarageMenu GarageMenu; diff --git a/src/modules/userinterface/legacymenu/racescreens/networkingmenu.cpp b/src/modules/userinterface/legacymenu/racescreens/networkingmenu.cpp index dc96c3597..d6cc19ded 100644 --- a/src/modules/userinterface/legacymenu/racescreens/networkingmenu.cpp +++ b/src/modules/userinterface/legacymenu/racescreens/networkingmenu.cpp @@ -44,7 +44,6 @@ #include #include #include -#include #include "legacymenu.h" #include "racescreens.h" @@ -88,7 +87,6 @@ static float white[] = {1.0, 1.0, 1.0, 1.0}; static std::string g_strHostIP = "127.0.0.1"; HostSettingsMenu g_HostMenu; -CarSettingsMenu g_CarMenu; // The car selection menu. static RmGarageMenu GarageMenu;