1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 18:19:55 +00:00

Improved code, added labels to the counter

This commit is contained in:
Jacob Essex 2012-01-17 11:58:06 +00:00
parent 3b15170d09
commit e73640e720
2 changed files with 22 additions and 17 deletions

View file

@ -37,24 +37,15 @@ HUD::HUD(int width, int height, int fpsLevel)
getWidget(crosshair, "Crosshair"); getWidget(crosshair, "Crosshair");
MyGUI::WidgetPtr fpsBoxAdvanced;
MyGUI::WidgetPtr fpsBoxDefault;
getWidget(fpsBoxDefault, "FPSBox");
getWidget(fpsBoxAdvanced, "FPSBoxAdv");
if ( fpsLevel == 2 ){ if ( fpsLevel == 2 ){
fpsBoxDefault->setVisible(false); getWidget(fpsbox, "FPSBoxAdv");
fpsbox = fpsBoxAdvanced; fpsbox->setVisible(true);
getWidget(fpscounter, "FPSCounterAdv"); getWidget(fpscounter, "FPSCounterAdv");
}else if ( fpsLevel == 1 ){ }else if ( fpsLevel == 1 ){
fpsBoxAdvanced->setVisible(false); getWidget(fpsbox, "FPSBox");
fpsbox = fpsBoxDefault; fpsbox->setVisible(true);
getWidget(fpscounter, "FPSCounter"); getWidget(fpscounter, "FPSCounter");
}else{ }else{
fpsBoxDefault->setVisible(false);
fpsBoxAdvanced->setVisible(false);
getWidget(fpscounter, "FPSCounter"); getWidget(fpscounter, "FPSCounter");
} }
getWidget(trianglecounter, "TriangleCounter"); getWidget(trianglecounter, "TriangleCounter");

View file

@ -52,15 +52,29 @@
<!-- Basic FPSCounter box --> <!-- Basic FPSCounter box -->
<Widget type="Widget" skin="HUD_Box" position="12 12 28 21" align="Left Top" <Widget type="Widget" skin="HUD_Box" position="12 12 28 21" align="Left Top"
name="FPSBox"> name="FPSBox">
<Property key="Widget_Visible" value="false"/>
<Widget type="StaticText" skin="NumFPS" position="3 3 21 17" name="FPSCounter"/> <Widget type="StaticText" skin="NumFPS" position="3 3 21 17" name="FPSCounter"/>
</Widget> </Widget>
<!-- Advanced FPSCounter box --> <!-- Advanced FPSCounter box -->
<Widget type="Widget" skin="HUD_Box" position="12 12 58 51" align="Left Top" <Widget type="Widget" skin="HUD_Box" position="12 12 118 51" align="Left Top"
name="FPSBoxAdv"> name="FPSBoxAdv">
<Widget type="StaticText" skin="NumFPS" position="3 3 51 17" name="FPSCounterAdv"/> <Property key="Widget_Visible" value="false"/>
<Widget type="StaticText" skin="NumFPS" position="3 3 51 32" name="TriangleCounter"/>
<Widget type="StaticText" skin="NumFPS" position="3 3 51 47" name="BatchCounter"/> <Widget type="StaticText" skin="NumFPS" position="3 3 71 17">
<Property key="Widget_Caption" value="FPS: "/>
</Widget>
<Widget type="StaticText" skin="NumFPS" position="53 3 71 17" name="FPSCounterAdv"/>
<Widget type="StaticText" skin="NumFPS" position="3 3 71 32">
<Property key="Widget_Caption" value="Tri Count: "/>
</Widget>
<Widget type="StaticText" skin="NumFPS" position="53 3 71 32" name="TriangleCounter"/>
<Widget type="StaticText" skin="NumFPS" position="3 3 71 47">
<Property key="Widget_Caption" value="Batch Count: "/>
</Widget>
<Widget type="StaticText" skin="NumFPS" position="53 3 71 47" name="BatchCounter"/>
</Widget> </Widget>
</Widget> </Widget>