|
|
|
@ -13,7 +13,7 @@
|
|
|
|
|
using namespace MWGui;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
HUD::HUD(int width, int height, bool fpsSwitch)
|
|
|
|
|
HUD::HUD(int width, int height, int fpsLevel)
|
|
|
|
|
: Layout("openmw_hud_layout.xml")
|
|
|
|
|
{
|
|
|
|
|
setCoord(0,0, width, height);
|
|
|
|
@ -37,10 +37,19 @@ HUD::HUD(int width, int height, bool fpsSwitch)
|
|
|
|
|
|
|
|
|
|
getWidget(crosshair, "Crosshair");
|
|
|
|
|
|
|
|
|
|
getWidget(fpsbox, "FPSBox");
|
|
|
|
|
getWidget(fpscounter, "FPSCounter");
|
|
|
|
|
|
|
|
|
|
fpsbox->setVisible(fpsSwitch);
|
|
|
|
|
if ( fpsLevel == 2 ){
|
|
|
|
|
getWidget(fpsbox, "FPSBoxAdv");
|
|
|
|
|
fpsbox->setVisible(true);
|
|
|
|
|
getWidget(fpscounter, "FPSCounterAdv");
|
|
|
|
|
}else if ( fpsLevel == 1 ){
|
|
|
|
|
getWidget(fpsbox, "FPSBox");
|
|
|
|
|
fpsbox->setVisible(true);
|
|
|
|
|
getWidget(fpscounter, "FPSCounter");
|
|
|
|
|
}else{
|
|
|
|
|
getWidget(fpscounter, "FPSCounter");
|
|
|
|
|
}
|
|
|
|
|
getWidget(trianglecounter, "TriangleCounter");
|
|
|
|
|
getWidget(batchcounter, "BatchCounter");
|
|
|
|
|
|
|
|
|
|
compass->setImageTexture("textures\\compass.dds");
|
|
|
|
|
crosshair->setImageTexture("textures\\target.dds");
|
|
|
|
@ -59,6 +68,15 @@ void HUD::setFPS(float 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)
|
|
|
|
|
{
|
|
|
|
|