From 33620846cca5678fbd662ea1a48fad302727dae7 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Sun, 12 Sep 2021 13:49:38 +0300 Subject: Mobile: Draw optimizations; focus handling Widgets can now be marked for buffering their contents, which is useful if their contents change seldom but they are drawn often. For example, the navbar is always visible but doesn't change very often, and during animations menu contents are static but there is a moving animation so everything gets drawn 60 FPS. Focus handling was also improved so the lookup results can be scrolled while entering text, and one can tap outside an input field to unfocus it. --- src/ui/uploadwidget.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/ui/uploadwidget.c') diff --git a/src/ui/uploadwidget.c b/src/ui/uploadwidget.c index fb8aaf0a..78a1196a 100644 --- a/src/ui/uploadwidget.c +++ b/src/ui/uploadwidget.c @@ -376,11 +376,11 @@ static iBool processEvent_UploadWidget_(iUploadWidget *d, const SDL_Event *ev) { return processEvent_Widget(w, ev); } -static void draw_UploadWidget_(const iUploadWidget *d) { - draw_Widget(constAs_Widget(d)); -} +//static void draw_UploadWidget_(const iUploadWidget *d) { +// draw_Widget(constAs_Widget(d)); +//} iBeginDefineSubclass(UploadWidget, Widget) .processEvent = (iAny *) processEvent_UploadWidget_, - .draw = (iAny *) draw_UploadWidget_, + .draw = draw_Widget, iEndDefineSubclass(UploadWidget) -- cgit v1.2.3