summaryrefslogtreecommitdiff
path: root/src/ui/paint.h
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-09-12 13:49:38 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-09-12 13:49:38 +0300
commit33620846cca5678fbd662ea1a48fad302727dae7 (patch)
tree322fb4ab2c1dd7dd3eceee0834f3e90d27838de4 /src/ui/paint.h
parent1410bbde7779efe3a20f603523547c8b8f55b6a1 (diff)
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.
Diffstat (limited to 'src/ui/paint.h')
-rw-r--r--src/ui/paint.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ui/paint.h b/src/ui/paint.h
index 90cc2aef..e6701635 100644
--- a/src/ui/paint.h
+++ b/src/ui/paint.h
@@ -36,6 +36,8 @@ struct Impl_Paint {
36 uint8_t alpha; 36 uint8_t alpha;
37}; 37};
38 38
39extern iInt2 origin_Paint; /* add this to all drawn positions so buffered graphics are correctly offset */
40
39void init_Paint (iPaint *); 41void init_Paint (iPaint *);
40 42
41void beginTarget_Paint (iPaint *, SDL_Texture *target); 43void beginTarget_Paint (iPaint *, SDL_Texture *target);