gui docs update + some minor cleanup

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3388 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria
2009-04-16 00:10:49 +00:00
parent c54a87d6a1
commit ea16856103
2 changed files with 2 additions and 15 deletions

View File

@@ -22,7 +22,8 @@ WTYPE_SPINNER "spinner"
A spinner component (lets you choose numbers). Sprecify PROP_MIN_VALUE and PROP_MAX_VALUE to have control
over values (default will be from 0 to 10). You can specify an icon; then, include a sprintf format string
like %i in the name, and at runtime the current number will be inserted into the given name to find the
right file for each possible value the spinner can take.
right file for each possible value the spinner can take. It may also display arbitrary text instead of
numbers, though this cannot be achieve in the XML file; use the ->addLabel(...) method in code to do this.
WTYPE_BUTTON "button"
A plain text buttons.

View File

@@ -403,25 +403,11 @@ void Skin::drawSpinnerBody(const core::rect< s32 > &rect, const Widget* widget,
{
IGUIElement* focused_widget = GUIEngine::getGUIEnv()->getFocus();
//{
//Widget* widget = GUIEngine::getCurrentScreen()->getWidget(focused_widget->getID());
//if(focused_widget == NULL) std::cout << "no focus\n";
//else if(widget != NULL)
//{
// std::cout << "focused : " << widget->m_properties[PROP_ID].c_str() << " (id " << focused_widget->getID() << ")" << std::endl;
//}
//}
//Widget* stupid_stl = (Widget*)widget;
//std::cout << "widget name : " << (stupid_stl->m_properties[PROP_ID].c_str()) << std::endl;
if(focused_widget != NULL && widget->m_children.size()>2)
{
//std::cout << "checking against " << widget->m_children[0].id << " and " << widget->m_children[2].id << std::endl;
if(widget->m_children[0].id == focused_widget->getID() ||
widget->m_children[2].id == focused_widget->getID())
{
//std::cout << "focused = true;\n";
focused = true;
}
}