Fix border display drawing for menus. Fix scrollable window components that went outside to use proper scrolling offsets. Fix issue with same-frame clicking and releasing causing a different button to be selected.

This commit is contained in:
2023-12-15 23:57:09 -06:00
parent 92c093c589
commit 025a89788e
22 changed files with 103 additions and 101 deletions
+3 -2
View File
@@ -4328,7 +4328,8 @@ namespace olc
m_tp1 = m_tp2;
// Our time per frame coefficient
float fElapsedTime = elapsedTime.count();
float actualElapsedTime = elapsedTime.count();
float fElapsedTime = std::clamp(elapsedTime.count(),0.f,1/30.f); //HACK fix. We can't have a negative time. Although using a more precise system clock should make this never occur. Also make sure if the game is too slow we advance by only 1/30th of a second.
fLastElapsed = fElapsedTime;
fRunTime += fElapsedTime;
@@ -4441,7 +4442,7 @@ namespace olc
renderer->DisplayFrame();
// Update Title Bar
fFrameTimer += fElapsedTime;
fFrameTimer += actualElapsedTime;
nFrameCount++;
if (fFrameTimer >= 1.0f)
{