move setImage in Window::init

* part of 4802d128fe that said it tried to call GL functions before initialised. Didn't confirm this, but looks reasonable.
This commit is contained in:
Jools Wills 2017-05-28 17:43:41 +01:00
parent 6a20acd6b0
commit e27e7cfd19

View file

@ -65,8 +65,6 @@ bool Window::init(unsigned int width, unsigned int height)
return false;
}
mBackgroundOverlay->setImage(":/scroll_gradient.png");
InputManager::getInstance()->init();
ResourceManager::getInstance()->reloadAll();
@ -79,6 +77,7 @@ bool Window::init(unsigned int width, unsigned int height)
mDefaultFonts.push_back(Font::get(FONT_SIZE_LARGE));
}
mBackgroundOverlay->setImage(":/scroll_gradient.png");
mBackgroundOverlay->setResize((float)Renderer::getScreenWidth(), (float)Renderer::getScreenHeight());
// update our help because font sizes probably changed