diff --git a/changelog.txt b/changelog.txt index 3c13f7d16..f0e4b9ca3 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,6 +1,7 @@ October 10 -Added a theming tag for the Fast Select box's text. -Fixed GuiBox background being positioned wrong. +-Fixed GuiBox/GuiFastSelect render order. October 7 -Fixed borders for GuiBox. The right and bottom borders are flipped, too. diff --git a/src/components/GuiFastSelect.cpp b/src/components/GuiFastSelect.cpp index fb75f1f17..5f9423b89 100644 --- a/src/components/GuiFastSelect.cpp +++ b/src/components/GuiFastSelect.cpp @@ -25,7 +25,7 @@ GuiFastSelect::GuiFastSelect(GuiComponent* parent, GuiList* list, cha unsigned int sw = Renderer::getScreenWidth(), sh = Renderer::getScreenHeight(); mBox = new GuiBox(sw * 0.2, sh * 0.2, sw * 0.6, sh * 0.6); mBox->setData(data); - addChild(mBox); + //addChild(mBox); mTextColor = textcolor; @@ -37,7 +37,6 @@ GuiFastSelect::~GuiFastSelect() Renderer::unregisterComponent(this); InputManager::unregisterComponent(this); - removeChild(mBox); delete mBox; mParent->resume(); @@ -50,6 +49,8 @@ void GuiFastSelect::onRender() if(!mBox->hasBackground()) Renderer::drawRect(sw * 0.2, sh * 0.2, sw * 0.6, sh * 0.6, 0x000FF0); + mBox->render(); + Renderer::drawCenteredText(LETTERS.substr(mLetterID, 1), 0, sh * 0.5 - (Renderer::getFontHeight(Renderer::LARGE) * 0.5), mTextColor, Renderer::LARGE); }