mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-18 18:40:06 +00:00
Merge remote branch 'scrawl/master'
This commit is contained in:
commit
c4bf6214db
@ -11,11 +11,20 @@ namespace MWGui
|
|||||||
|
|
||||||
MainMenu::MainMenu(int w, int h)
|
MainMenu::MainMenu(int w, int h)
|
||||||
: OEngine::GUI::Layout("openmw_mainmenu.layout")
|
: OEngine::GUI::Layout("openmw_mainmenu.layout")
|
||||||
|
, mButtonBox(0)
|
||||||
|
{
|
||||||
|
onResChange(w,h);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainMenu::onResChange(int w, int h)
|
||||||
{
|
{
|
||||||
setCoord(0,0,w,h);
|
setCoord(0,0,w,h);
|
||||||
|
|
||||||
int height = 64 * 3;
|
int height = 64 * 3;
|
||||||
|
|
||||||
|
if (mButtonBox)
|
||||||
|
MyGUI::Gui::getInstance ().destroyWidget(mButtonBox);
|
||||||
|
|
||||||
mButtonBox = mMainWidget->createWidget<MyGUI::Widget>("", MyGUI::IntCoord(w/2 - 64, h/2 - height/2, 128, height), MyGUI::Align::Default);
|
mButtonBox = mMainWidget->createWidget<MyGUI::Widget>("", MyGUI::IntCoord(w/2 - 64, h/2 - height/2, 128, height), MyGUI::Align::Default);
|
||||||
int curH = 0;
|
int curH = 0;
|
||||||
|
|
||||||
@ -55,7 +64,6 @@ namespace MWGui
|
|||||||
mExitGame->setImageResource ("Menu_ExitGame");
|
mExitGame->setImageResource ("Menu_ExitGame");
|
||||||
mExitGame->eventMouseButtonClick += MyGUI::newDelegate(this, &MainMenu::exitGame);
|
mExitGame->eventMouseButtonClick += MyGUI::newDelegate(this, &MainMenu::exitGame);
|
||||||
curH += 64;
|
curH += 64;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainMenu::returnToGame(MyGUI::Widget* sender)
|
void MainMenu::returnToGame(MyGUI::Widget* sender)
|
||||||
|
@ -8,6 +8,8 @@ namespace MWGui
|
|||||||
public:
|
public:
|
||||||
MainMenu(int w, int h);
|
MainMenu(int w, int h);
|
||||||
|
|
||||||
|
void onResChange(int w, int h);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MyGUI::Button* mReturn;
|
MyGUI::Button* mReturn;
|
||||||
MyGUI::Button* mNewGame;
|
MyGUI::Button* mNewGame;
|
||||||
|
@ -639,6 +639,7 @@ void WindowManager::processChangedSettings(const Settings::CategorySettingVector
|
|||||||
int y = Settings::Manager::getInt("resolution y", "Video");
|
int y = Settings::Manager::getInt("resolution y", "Video");
|
||||||
mHud->onResChange(x, y);
|
mHud->onResChange(x, y);
|
||||||
mConsole->onResChange(x, y);
|
mConsole->onResChange(x, y);
|
||||||
|
mMenu->onResChange(x, y);
|
||||||
mSettingsWindow->center();
|
mSettingsWindow->center();
|
||||||
mAlchemyWindow->center();
|
mAlchemyWindow->center();
|
||||||
mScrollWindow->center();
|
mScrollWindow->center();
|
||||||
|
@ -776,6 +776,7 @@ void RenderingManager::windowResized(Ogre::RenderWindow* rw)
|
|||||||
|
|
||||||
void RenderingManager::windowClosed(Ogre::RenderWindow* rw)
|
void RenderingManager::windowClosed(Ogre::RenderWindow* rw)
|
||||||
{
|
{
|
||||||
|
Ogre::Root::getSingleton ().queueEndRendering ();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RenderingManager::waterShaderSupported()
|
bool RenderingManager::waterShaderSupported()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user