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
This commit is contained in:
parent
564bc36686
commit
4508e88291
5 changed files with 2 additions and 157 deletions
|
@ -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)
|
||||
|
|
|
@ -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 <cars.h>
|
||||
#ifdef CLIENT_SERVER
|
||||
#include <csnetwork.h>
|
||||
#else
|
||||
#include <network.h>
|
||||
#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<std::string> vecCarRealNames =
|
||||
GfCars::self()->getCarNamesInCategory(strCarCat);
|
||||
|
||||
m_strCar = pszCar;
|
||||
int carIndex = 0;
|
||||
for (unsigned i=0;i<vecCarRealNames.size();i++)
|
||||
{
|
||||
GfuiComboboxAddText(pMenuHandle,carCatId,vecCarRealNames[i].c_str());
|
||||
if (vecCarRealNames[i] == m_strCar)
|
||||
carIndex = i;
|
||||
}
|
||||
|
||||
GfuiComboboxSetSelectedIndex(pMenuHandle,carCatId,carIndex);
|
||||
|
||||
createButtonControl("accept",NULL,onAccept);
|
||||
createButtonControl("cancel",NULL,onCancel);
|
||||
|
||||
closeXMLDescriptor();
|
||||
|
||||
return true;
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
/***************************************************************************
|
||||
|
||||
file : carsettingsmenu.h
|
||||
created : July 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. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef _CARSETTINGSMENU_H_
|
||||
#define _CARSETTINGSMENU_H_
|
||||
|
||||
#include <tgfclient.h>
|
||||
|
||||
#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_ */
|
|
@ -43,7 +43,6 @@
|
|||
#include <playerconfig.h>
|
||||
#include <playerpref.h>
|
||||
#include <hostsettingsmenu.h>
|
||||
#include <carsettingsmenu.h>
|
||||
|
||||
#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;
|
||||
|
|
|
@ -44,7 +44,6 @@
|
|||
#include <playerconfig.h>
|
||||
#include <playerpref.h>
|
||||
#include <hostsettingsmenu.h>
|
||||
#include <carsettingsmenu.h>
|
||||
|
||||
#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;
|
||||
|
|
Loading…
Reference in a new issue