add tick and on_tick event, fix unsaved document prompt, implement TextInput blinking cursor

This commit is contained in:
2018-10-08 01:00:49 +02:00
parent e2069fadca
commit c9c7b9f1c4
19 changed files with 226 additions and 46 deletions

View File

@@ -179,11 +179,16 @@ static CVReturn MyDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTime
working_list.front()();
working_list.pop_front();
}
double dt = now - _prevTime;
if (dt > 0.1)
App::I.redraw = true;
if (App::I.redraw)
{
App::I.clear();
App::I.update(now - _prevTime);
App::I.update(dt);
CGLFlushDrawable([glctx CGLContextObj]);
_prevTime = now;
}