updated Xcode project + made kart selection screen actually work

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3506 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2009-05-17 15:18:24 +00:00
parent 616acb985a
commit 705962d501
2 changed files with 28 additions and 14 deletions

View File

@ -77,14 +77,16 @@ namespace StateManager
if(!getCurrentScreen()->m_inited) if(!getCurrentScreen()->m_inited)
{ {
w->addItem("Gnu","k1","gui/gnu.png"); const int kart_amount = kart_properties_manager->getNumberOfKarts();
w->addItem("Wilber","k2","gui/gnu.png"); for(int n=0; n<kart_amount; n++)
w->addItem("Tux","k3","gui/gnu.png"); {
w->addItem("Puffy","k4","gui/gnu.png"); const KartProperties* prop = kart_properties_manager->getKartById(n);
w->addItem("Hexley","k5","gui/gnu.png"); std::string icon_path = "karts/";
w->addItem("Sushi","k6","gui/gnu.png"); icon_path += prop->getIdent() + "/" + prop->getIconFile();
w->addItem("Nolok","k7","gui/gnu.png"); w->addItem(prop->getName().c_str(), prop->getIdent().c_str(), icon_path.c_str());
w->addItem("Mozilla","k8","gui/gnu.png");
}
getCurrentScreen()->m_inited = true; getCurrentScreen()->m_inited = true;
} }
w->updateItemDisplay(); w->updateItemDisplay();
@ -110,9 +112,13 @@ namespace StateManager
getCurrentScreen()->m_inited = true; getCurrentScreen()->m_inited = true;
} // end if init } // end if init
// TODO - actually check which kart was selected
else if(name == "karts") else if(name == "karts")
{ {
RibbonGridWidget* w = getCurrentScreen()->getWidget<RibbonGridWidget>("karts");
assert( w != NULL );
race_manager->setLocalKartInfo(0, w->getSelectionName());
StateManager::pushMenu("racesetup.stkgui"); StateManager::pushMenu("racesetup.stkgui");
} }
} }
@ -237,10 +243,6 @@ namespace StateManager
std::cout << "Clicked on track " << w2->getSelectionName().c_str() << std::endl; std::cout << "Clicked on track " << w2->getSelectionName().c_str() << std::endl;
StateManager::enterGameState(); StateManager::enterGameState();
//race_manager->setLocalKartInfo(0, "tux");
//race_manager->setLocalKartInfo(0, "nolok");
//race_manager->setLocalKartInfo(0, "mozilla");
race_manager->setLocalKartInfo(0, "adiumy");
//race_manager->setDifficulty(RaceManager::RD_HARD); //race_manager->setDifficulty(RaceManager::RD_HARD);
race_manager->setTrack("beach"); race_manager->setTrack("beach");
race_manager->setNumLaps( 3 ); race_manager->setNumLaps( 3 );

View File

@ -18,6 +18,8 @@
950557890F696A900056E88C /* screen_loader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 950557810F696A900056E88C /* screen_loader.cpp */; }; 950557890F696A900056E88C /* screen_loader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 950557810F696A900056E88C /* screen_loader.cpp */; };
9505578A0F696A900056E88C /* skin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 950557820F696A900056E88C /* skin.cpp */; }; 9505578A0F696A900056E88C /* skin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 950557820F696A900056E88C /* skin.cpp */; };
9505578B0F696A900056E88C /* widget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 950557840F696A900056E88C /* widget.cpp */; }; 9505578B0F696A900056E88C /* widget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 950557840F696A900056E88C /* widget.cpp */; };
951C35810FC05BF400A48379 /* quad_set.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 951C357E0FC05BF400A48379 /* quad_set.cpp */; };
951C35820FC05BF400A48379 /* quad_graph.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 951C35800FC05BF400A48379 /* quad_graph.cpp */; };
953EAAAF0F30A4220000D57D /* terrain_info.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 953EAAAE0F30A4220000D57D /* terrain_info.cpp */; }; 953EAAAF0F30A4220000D57D /* terrain_info.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 953EAAAE0F30A4220000D57D /* terrain_info.cpp */; };
953EAAB20F30A4410000D57D /* triangle_mesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 953EAAB10F30A4410000D57D /* triangle_mesh.cpp */; }; 953EAAB20F30A4410000D57D /* triangle_mesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 953EAAB10F30A4410000D57D /* triangle_mesh.cpp */; };
953EAAB60F30A4650000D57D /* translation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 953EAAB50F30A4650000D57D /* translation.cpp */; }; 953EAAB60F30A4650000D57D /* translation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 953EAAB50F30A4650000D57D /* translation.cpp */; };
@ -258,6 +260,10 @@
950557830F696A900056E88C /* skin.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = skin.hpp; path = ../../gui/skin.hpp; sourceTree = SOURCE_ROOT; }; 950557830F696A900056E88C /* skin.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = skin.hpp; path = ../../gui/skin.hpp; sourceTree = SOURCE_ROOT; };
950557840F696A900056E88C /* widget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = widget.cpp; path = ../../gui/widget.cpp; sourceTree = SOURCE_ROOT; }; 950557840F696A900056E88C /* widget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = widget.cpp; path = ../../gui/widget.cpp; sourceTree = SOURCE_ROOT; };
950557850F696A900056E88C /* widget.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = widget.hpp; path = ../../gui/widget.hpp; sourceTree = SOURCE_ROOT; }; 950557850F696A900056E88C /* widget.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = widget.hpp; path = ../../gui/widget.hpp; sourceTree = SOURCE_ROOT; };
951C357D0FC05BF400A48379 /* quad_set.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = quad_set.hpp; path = games/supertuxkart/src/tracks/quad_set.hpp; sourceTree = SYSTEM_DEVELOPER_DIR; };
951C357E0FC05BF400A48379 /* quad_set.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = quad_set.cpp; path = games/supertuxkart/src/tracks/quad_set.cpp; sourceTree = SYSTEM_DEVELOPER_DIR; };
951C357F0FC05BF400A48379 /* quad_graph.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = quad_graph.hpp; path = ../../tracks/quad_graph.hpp; sourceTree = SOURCE_ROOT; };
951C35800FC05BF400A48379 /* quad_graph.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = quad_graph.cpp; path = games/supertuxkart/src/tracks/quad_graph.cpp; sourceTree = SYSTEM_DEVELOPER_DIR; };
951F96810F29670C00E1AC66 /* SuperTuxKart */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = SuperTuxKart; sourceTree = BUILT_PRODUCTS_DIR; }; 951F96810F29670C00E1AC66 /* SuperTuxKart */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = SuperTuxKart; sourceTree = BUILT_PRODUCTS_DIR; };
953EAAAD0F30A4220000D57D /* terrain_info.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = terrain_info.hpp; path = ../../tracks/terrain_info.hpp; sourceTree = SOURCE_ROOT; }; 953EAAAD0F30A4220000D57D /* terrain_info.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = terrain_info.hpp; path = ../../tracks/terrain_info.hpp; sourceTree = SOURCE_ROOT; };
953EAAAE0F30A4220000D57D /* terrain_info.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = terrain_info.cpp; path = ../../tracks/terrain_info.cpp; sourceTree = SOURCE_ROOT; }; 953EAAAE0F30A4220000D57D /* terrain_info.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = terrain_info.cpp; path = ../../tracks/terrain_info.cpp; sourceTree = SOURCE_ROOT; };
@ -1951,6 +1957,10 @@
95C2B1CE0F296545000D3E5D /* tracks */ = { 95C2B1CE0F296545000D3E5D /* tracks */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
951C357D0FC05BF400A48379 /* quad_set.hpp */,
951C357E0FC05BF400A48379 /* quad_set.cpp */,
951C357F0FC05BF400A48379 /* quad_graph.hpp */,
951C35800FC05BF400A48379 /* quad_graph.cpp */,
953EAAAD0F30A4220000D57D /* terrain_info.hpp */, 953EAAAD0F30A4220000D57D /* terrain_info.hpp */,
953EAAAE0F30A4220000D57D /* terrain_info.cpp */, 953EAAAE0F30A4220000D57D /* terrain_info.cpp */,
95C2B1CF0F296545000D3E5D /* track.cpp */, 95C2B1CF0F296545000D3E5D /* track.cpp */,
@ -2749,6 +2759,8 @@
95A1184B0F77FC3900B18B3D /* input_device.cpp in Sources */, 95A1184B0F77FC3900B18B3D /* input_device.cpp in Sources */,
95A1187B0F78024E00B18B3D /* device_manager.cpp in Sources */, 95A1187B0F78024E00B18B3D /* device_manager.cpp in Sources */,
95CA59F80F82FCB7003323DB /* physical_object.cpp in Sources */, 95CA59F80F82FCB7003323DB /* physical_object.cpp in Sources */,
951C35810FC05BF400A48379 /* quad_set.cpp in Sources */,
951C35820FC05BF400A48379 /* quad_graph.cpp in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };