|
@@ -84,9 +84,11 @@ void UI::eventsFinished() {
|
84
|
84
|
ImGuiIO& io = ImGui::GetIO();
|
85
|
85
|
io.DisplaySize = ImVec2((float)getWindow().getWidth(), (float)getWindow().getHeight());
|
86
|
86
|
|
87
|
|
- static long lastTime = 0;
|
|
87
|
+ static unsigned long lastTime = 0;
|
88
|
88
|
io.DeltaTime = ((float)(systemTimerGet() - lastTime)) / 1000.0f;
|
89
|
89
|
lastTime = systemTimerGet();
|
|
90
|
+ if (io.DeltaTime <= 0.0f)
|
|
91
|
+ io.DeltaTime = 1.0f / 60.0f;
|
90
|
92
|
|
91
|
93
|
ImGui::NewFrame();
|
92
|
94
|
|
|
@@ -220,6 +222,9 @@ void UI::handleKeyboard(KeyboardButton key, bool pressed) {
|
220
|
222
|
}
|
221
|
223
|
|
222
|
224
|
void UI::handleText(char *text, bool notFinished) {
|
|
225
|
+ if (notFinished)
|
|
226
|
+ return;
|
|
227
|
+
|
223
|
228
|
ImGuiIO& io = ImGui::GetIO();
|
224
|
229
|
while (*text != '\0') {
|
225
|
230
|
io.AddInputCharacter(*text);
|