PGE2
This commit is contained in:
parent
bd8b088a2c
commit
1d311b2deb
@ -1111,6 +1111,7 @@ namespace olc
|
|||||||
std::string TextEntryGetString() const;
|
std::string TextEntryGetString() const;
|
||||||
int32_t TextEntryGetCursor() const;
|
int32_t TextEntryGetCursor() const;
|
||||||
bool IsTextEntryEnabled() const;
|
bool IsTextEntryEnabled() const;
|
||||||
|
void SetFPSDisplay(bool display);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -1173,6 +1174,7 @@ namespace olc
|
|||||||
float fFrameTimer = 1.0f;
|
float fFrameTimer = 1.0f;
|
||||||
float fLastElapsed = 0.0f;
|
float fLastElapsed = 0.0f;
|
||||||
int nFrameCount = 0;
|
int nFrameCount = 0;
|
||||||
|
bool showFPS = true;
|
||||||
bool bSuspendTextureTransfer = false;
|
bool bSuspendTextureTransfer = false;
|
||||||
Renderable fontRenderable;
|
Renderable fontRenderable;
|
||||||
std::vector<LayerDesc> vLayers;
|
std::vector<LayerDesc> vLayers;
|
||||||
@ -3198,6 +3200,8 @@ namespace olc
|
|||||||
|
|
||||||
bool PixelGameEngine::IsTextEntryEnabled() const
|
bool PixelGameEngine::IsTextEntryEnabled() const
|
||||||
{ return bTextEntryEnable; }
|
{ return bTextEntryEnable; }
|
||||||
|
void PixelGameEngine::SetFPSDisplay(bool display)
|
||||||
|
{ showFPS=display; }
|
||||||
|
|
||||||
|
|
||||||
void PixelGameEngine::UpdateTextEntry()
|
void PixelGameEngine::UpdateTextEntry()
|
||||||
@ -3536,7 +3540,7 @@ namespace olc
|
|||||||
{
|
{
|
||||||
nLastFPS = nFrameCount;
|
nLastFPS = nFrameCount;
|
||||||
fFrameTimer -= 1.0f;
|
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);
|
platform->SetWindowTitle(sTitle);
|
||||||
nFrameCount = 0;
|
nFrameCount = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user