From 61b86879f8ac19429747f67d5b83a6785670658a Mon Sep 17 00:00:00 2001 From: auria Date: Sun, 30 Aug 2009 23:12:00 +0000 Subject: [PATCH] Fixed kart spinner being 'empty' the second time (and subsequent) git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3969 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/guiengine/skin.cpp | 9 ++++++--- src/guiengine/widget.cpp | 14 +++++++++----- src/guiengine/widget.hpp | 4 +++- src/states_screens/kart_selection.cpp | 2 -- 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/src/guiengine/skin.cpp b/src/guiengine/skin.cpp index 721d77255..93939f7f8 100644 --- a/src/guiengine/skin.cpp +++ b/src/guiengine/skin.cpp @@ -780,10 +780,9 @@ void Skin::drawSpinnerBody(const core::rect< s32 > &rect, Widget* widget, const } } } - - + BoxRenderParams& params = (focused || pressed) ? SkinConfig::m_render_params["spinner::focused"] : - SkinConfig::m_render_params["spinner::neutral"]; + SkinConfig::m_render_params["spinner::neutral"]; // FIXME: temporary only if (widget->isFocusedForPlayer(1)) @@ -970,6 +969,10 @@ void Skin::process3DPane(IGUIElement *element, const core::rect< s32 > &rect, co Widget* widget = GUIEngine::getCurrentScreen()->getWidget(id); + //std::cout << "3D Pane " << id << " : "; + //if(widget == NULL) std::cout << "NULL\n"; + //else std::cout << widget->m_properties[PROP_ID].c_str() << std::endl; + if(widget == NULL) return; const WidgetType type = widget->m_type; diff --git a/src/guiengine/widget.cpp b/src/guiengine/widget.cpp index ec51b8395..071c4f785 100644 --- a/src/guiengine/widget.cpp +++ b/src/guiengine/widget.cpp @@ -78,6 +78,7 @@ Widget::Widget(bool reserve_id) m_event_handler = NULL; m_show_bounding_box = false; m_parent = NULL; + m_reserve_id = reserve_id; for (int n=0; nplayerID = playerID; - - // FIXME : if a player removes itself, all IDs need to be updated this->m_properties[PROP_ID] = StringUtils::insertValues("@p%i", playerID); setSize(area->x, area->y, area->w, area->h);