Work around weird irrLicht thing : IDs must not start at 0, since it appears their GUI engine hardcodes some ID values... xD

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5087 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2010-03-27 23:36:17 +00:00
parent 2f3cf6d8b4
commit f1edf20c31

View File

@ -133,7 +133,8 @@ void Widget::elementRemoved()
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
namespace GUIEngine namespace GUIEngine
{ {
static unsigned int id_counter = 0; // IDs must not start at 0, since it appears their GUI engine hardcodes some ID values... xD
static unsigned int id_counter = 100;
/** // for items that can't be reached with keyboard navigation but can be clicked */ /** // for items that can't be reached with keyboard navigation but can be clicked */
static unsigned int id_counter_2 = 1000; static unsigned int id_counter_2 = 1000;
@ -154,7 +155,7 @@ int Widget::getNewNoFocusID()
* (so we start again from ID 0, and don't grow to big numbers) */ * (so we start again from ID 0, and don't grow to big numbers) */
void Widget::resetIDCounters() void Widget::resetIDCounters()
{ {
id_counter = 0; id_counter = 100;
id_counter_2 = 1000; id_counter_2 = 1000;
} }