diff --git a/apps/openmw/mwgui/layouts.hpp b/apps/openmw/mwgui/layouts.hpp index c330afadb..ae43848ad 100644 --- a/apps/openmw/mwgui/layouts.hpp +++ b/apps/openmw/mwgui/layouts.hpp @@ -36,7 +36,7 @@ namespace MWGui class HUD : public OEngine::GUI::Layout { public: - HUD(int width, int height) + HUD(int width, int height, bool fpsSwitch) : Layout("openmw_hud_layout.xml") { setCoord(0,0, width, height); @@ -59,8 +59,12 @@ namespace MWGui getWidget(compass, "Compass"); getWidget(crosshair, "Crosshair"); + + getWidget(fpsbox, "FPSBox"); getWidget(fpscounter, "FPSCounter"); + fpsbox->setVisible(fpsSwitch); + compass->setImageTexture("textures\\compass.dds"); crosshair->setImageTexture("textures\\target.dds"); @@ -153,6 +157,8 @@ namespace MWGui MyGUI::StaticImagePtr compass; MyGUI::StaticImagePtr crosshair; + + MyGUI::WidgetPtr fpsbox; MyGUI::StaticTextPtr fpscounter; }; diff --git a/apps/openmw/mwgui/window_manager.cpp b/apps/openmw/mwgui/window_manager.cpp index fa5200bf5..4e33a002b 100644 --- a/apps/openmw/mwgui/window_manager.cpp +++ b/apps/openmw/mwgui/window_manager.cpp @@ -54,7 +54,7 @@ WindowManager::WindowManager(MyGUI::Gui *_gui, MWWorld::Environment& environment int w = gui->getViewSize().width; int h = gui->getViewSize().height; - hud = new HUD(w,h); + hud = new HUD(w,h, showFPSCounter); menu = new MainMenu(w,h); map = new MapWindow(); stats = new StatsWindow (environment); diff --git a/extern/mygui_3.0.1/openmw_resources/openmw_hud_layout.xml b/extern/mygui_3.0.1/openmw_resources/openmw_hud_layout.xml index 9d62b3aa4..8dc3cebab 100644 --- a/extern/mygui_3.0.1/openmw_resources/openmw_hud_layout.xml +++ b/extern/mygui_3.0.1/openmw_resources/openmw_hud_layout.xml @@ -49,12 +49,12 @@ - + - - - + + + diff --git a/extern/mygui_3.0.1/openmw_resources/openmw_text.skin.xml b/extern/mygui_3.0.1/openmw_resources/openmw_text.skin.xml index 66bf6cd10..bdaaaa0d5 100644 --- a/extern/mygui_3.0.1/openmw_resources/openmw_text.skin.xml +++ b/extern/mygui_3.0.1/openmw_resources/openmw_text.skin.xml @@ -9,6 +9,14 @@ + + + + + + + +