From e73640e720dcbab59153a97155d986bb107086a1 Mon Sep 17 00:00:00 2001 From: Jacob Essex Date: Tue, 17 Jan 2012 11:58:06 +0000 Subject: [PATCH] Improved code, added labels to the counter --- apps/openmw/mwgui/layouts.cpp | 17 ++++---------- .../openmw_resources/openmw_hud_layout.xml | 22 +++++++++++++++---- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/apps/openmw/mwgui/layouts.cpp b/apps/openmw/mwgui/layouts.cpp index ea9a85113..ebabc6faf 100644 --- a/apps/openmw/mwgui/layouts.cpp +++ b/apps/openmw/mwgui/layouts.cpp @@ -37,24 +37,15 @@ HUD::HUD(int width, int height, int fpsLevel) getWidget(crosshair, "Crosshair"); - - MyGUI::WidgetPtr fpsBoxAdvanced; - MyGUI::WidgetPtr fpsBoxDefault; - - getWidget(fpsBoxDefault, "FPSBox"); - getWidget(fpsBoxAdvanced, "FPSBoxAdv"); if ( fpsLevel == 2 ){ - fpsBoxDefault->setVisible(false); - fpsbox = fpsBoxAdvanced; + getWidget(fpsbox, "FPSBoxAdv"); + fpsbox->setVisible(true); getWidget(fpscounter, "FPSCounterAdv"); }else if ( fpsLevel == 1 ){ - fpsBoxAdvanced->setVisible(false); - fpsbox = fpsBoxDefault; + getWidget(fpsbox, "FPSBox"); + fpsbox->setVisible(true); getWidget(fpscounter, "FPSCounter"); }else{ - fpsBoxDefault->setVisible(false); - fpsBoxAdvanced->setVisible(false); - getWidget(fpscounter, "FPSCounter"); } getWidget(trianglecounter, "TriangleCounter"); 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 32eb31027..9e5f26c5b 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 @@ -52,15 +52,29 @@ + - - - - + + + + + + + + + + + + + + + +