From: <hik...@us...> - 2008-06-27 10:15:02
|
Revision: 2140 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=2140&view=rev Author: hikerstk Date: 2008-06-27 03:14:53 -0700 (Fri, 27 Jun 2008) Log Message: ----------- Put the previous selected character in the most prominent position of the new gui. Modified Paths: -------------- trunk/supertuxkart/src/gui/char_sel.cpp Modified: trunk/supertuxkart/src/gui/char_sel.cpp =================================================================== --- trunk/supertuxkart/src/gui/char_sel.cpp 2008-06-25 06:18:16 UTC (rev 2139) +++ trunk/supertuxkart/src/gui/char_sel.cpp 2008-06-27 10:14:53 UTC (rev 2140) @@ -110,9 +110,6 @@ widget_manager->breakLine(); } - m_offset = 0; - updateScrollPosition(); - widget_manager->addEmptyWgt(WTOK_EMPTY_DOWN, computeIndent(m_num_entries), HEIGHT/2); widget_manager->addTextButtonWgt(WTOK_DOWN, 20, HEIGHT/2, "v"); widget_manager->breakLine(); @@ -128,15 +125,17 @@ const int LAST_KART = user_config->m_player[m_player_index].getLastKartId(); if( LAST_KART != -1 && kartAvailable(LAST_KART))// is LAST_KART not in vector of selected karts { + m_offset = LAST_KART - m_num_entries/2; widget_manager->setSelectedWgt(WTOK_RACER0 + LAST_KART); switchCharacter(LAST_KART); } else { + m_offset = 0; switchCharacter(0); } + updateScrollPosition(); - m_offset = 0; m_clock = 0; //test @@ -259,7 +258,6 @@ const KartProperties* KP = kart_properties_manager->getKartById(kart_id); if (KP != NULL) { - printf("selecting kart %s\n",KP->getIdent().c_str()); race_manager->setPlayerKart(m_player_index, KP->getIdent()); user_config->m_player[m_player_index].setLastKartId(kart_id); // Add selected kart (token) to selected karts vector so it cannot be This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |