forked from teamnwah/openmw-tes3coop
Improved code, added labels to the counter
This commit is contained in:
parent
3b15170d09
commit
e73640e720
2 changed files with 22 additions and 17 deletions
|
@ -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");
|
||||
|
|
|
@ -52,15 +52,29 @@
|
|||
<!-- Basic FPSCounter box -->
|
||||
<Widget type="Widget" skin="HUD_Box" position="12 12 28 21" align="Left Top"
|
||||
name="FPSBox">
|
||||
<Property key="Widget_Visible" value="false"/>
|
||||
<Widget type="StaticText" skin="NumFPS" position="3 3 21 17" name="FPSCounter"/>
|
||||
</Widget>
|
||||
|
||||
<!-- 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">
|
||||
<Widget type="StaticText" skin="NumFPS" position="3 3 51 17" name="FPSCounterAdv"/>
|
||||
<Widget type="StaticText" skin="NumFPS" position="3 3 51 32" name="TriangleCounter"/>
|
||||
<Widget type="StaticText" skin="NumFPS" position="3 3 51 47" name="BatchCounter"/>
|
||||
<Property key="Widget_Visible" value="false"/>
|
||||
|
||||
<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>
|
||||
|
|
Loading…
Reference in a new issue