|
|
|
@ -1111,6 +1111,7 @@ namespace olc |
|
|
|
|
std::string TextEntryGetString() const; |
|
|
|
|
int32_t TextEntryGetCursor() const; |
|
|
|
|
bool IsTextEntryEnabled() const; |
|
|
|
|
void SetFPSDisplay(bool display); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1173,6 +1174,7 @@ namespace olc |
|
|
|
|
float fFrameTimer = 1.0f; |
|
|
|
|
float fLastElapsed = 0.0f; |
|
|
|
|
int nFrameCount = 0;
|
|
|
|
|
bool showFPS = true; |
|
|
|
|
bool bSuspendTextureTransfer = false; |
|
|
|
|
Renderable fontRenderable; |
|
|
|
|
std::vector<LayerDesc> vLayers; |
|
|
|
@ -3198,6 +3200,8 @@ namespace olc |
|
|
|
|
|
|
|
|
|
bool PixelGameEngine::IsTextEntryEnabled() const |
|
|
|
|
{ return bTextEntryEnable; } |
|
|
|
|
void PixelGameEngine::SetFPSDisplay(bool display) |
|
|
|
|
{ showFPS=display; } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void PixelGameEngine::UpdateTextEntry() |
|
|
|
@ -3536,7 +3540,7 @@ namespace olc |
|
|
|
|
{ |
|
|
|
|
nLastFPS = nFrameCount; |
|
|
|
|
fFrameTimer -= 1.0f; |
|
|
|
|
std::string sTitle = "OneLoneCoder.com - Pixel Game Engine - " + sAppName + " - FPS: " + std::to_string(nFrameCount); |
|
|
|
|
std::string sTitle = "OneLoneCoder.com - Pixel Game Engine - " + sAppName + ((showFPS)?" - FPS: " + std::to_string(nFrameCount):""); |
|
|
|
|
platform->SetWindowTitle(sTitle); |
|
|
|
|
nFrameCount = 0; |
|
|
|
|
} |
|
|
|
|