|
|
@ -13,7 +13,7 @@
|
|
|
|
using namespace MWGui;
|
|
|
|
using namespace MWGui;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
HUD::HUD(int width, int height, bool fpsSwitch)
|
|
|
|
HUD::HUD(int width, int height, int fpsLevel)
|
|
|
|
: Layout("openmw_hud_layout.xml")
|
|
|
|
: Layout("openmw_hud_layout.xml")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
setCoord(0,0, width, height);
|
|
|
|
setCoord(0,0, width, height);
|
|
|
@ -37,10 +37,28 @@ HUD::HUD(int width, int height, bool fpsSwitch)
|
|
|
|
|
|
|
|
|
|
|
|
getWidget(crosshair, "Crosshair");
|
|
|
|
getWidget(crosshair, "Crosshair");
|
|
|
|
|
|
|
|
|
|
|
|
getWidget(fpsbox, "FPSBox");
|
|
|
|
|
|
|
|
|
|
|
|
MyGUI::WidgetPtr fpsBoxAdvanced;
|
|
|
|
|
|
|
|
MyGUI::WidgetPtr fpsBoxDefault;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getWidget(fpsBoxDefault, "FPSBox");
|
|
|
|
|
|
|
|
getWidget(fpsBoxAdvanced, "FPSBoxAdv");
|
|
|
|
|
|
|
|
if ( fpsLevel == 2 ){
|
|
|
|
|
|
|
|
fpsBoxDefault->setVisible(false);
|
|
|
|
|
|
|
|
fpsbox = fpsBoxAdvanced;
|
|
|
|
|
|
|
|
getWidget(fpscounter, "FPSCounterAdv");
|
|
|
|
|
|
|
|
}else if ( fpsLevel == 1 ){
|
|
|
|
|
|
|
|
fpsBoxAdvanced->setVisible(false);
|
|
|
|
|
|
|
|
fpsbox = fpsBoxDefault;
|
|
|
|
getWidget(fpscounter, "FPSCounter");
|
|
|
|
getWidget(fpscounter, "FPSCounter");
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
fpsBoxDefault->setVisible(false);
|
|
|
|
|
|
|
|
fpsBoxAdvanced->setVisible(false);
|
|
|
|
|
|
|
|
|
|
|
|
fpsbox->setVisible(fpsSwitch);
|
|
|
|
getWidget(fpscounter, "FPSCounter");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
getWidget(trianglecounter, "TriangleCounter");
|
|
|
|
|
|
|
|
getWidget(batchcounter, "BatchCounter");
|
|
|
|
|
|
|
|
|
|
|
|
compass->setImageTexture("textures\\compass.dds");
|
|
|
|
compass->setImageTexture("textures\\compass.dds");
|
|
|
|
crosshair->setImageTexture("textures\\target.dds");
|
|
|
|
crosshair->setImageTexture("textures\\target.dds");
|
|
|
@ -59,6 +77,15 @@ void HUD::setFPS(float fps)
|
|
|
|
fpscounter->setCaption(boost::lexical_cast<std::string>((int)fps));
|
|
|
|
fpscounter->setCaption(boost::lexical_cast<std::string>((int)fps));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void HUD::setTriangleCount(size_t count)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
trianglecounter->setCaption(boost::lexical_cast<std::string>(count));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void HUD::setBatchCount(size_t count)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
batchcounter->setCaption(boost::lexical_cast<std::string>(count));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void HUD::setStats(int h, int hmax, int m, int mmax, int s, int smax)
|
|
|
|
void HUD::setStats(int h, int hmax, int m, int mmax, int s, int smax)
|
|
|
|
{
|
|
|
|
{
|
|
|
|