View Single Post
Old 03-07-2024, 03:23 PM   #4
pazos
cosiņeiro
pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.
 
Posts: 1,288
Karma: 2200073
Join Date: Apr 2014
Device: BQ Cervantes 4
Quote:
Originally Posted by Maimun Ahmed View Post
Thank you pazos for the answer. The code seems to be a kotlin script. I just wished to create a similar animation using lua that can be embedded in KOReader's source code (like the standard progress bar in frontend/ui/widget.
Hi, if this is something you want for yourself, even without a real purpose, I think you can build something quickly using the emulator. We ship a widget test utility in https://github.com/koreader/koreader...s/wbuilder.lua, so you can play with your widget without launching a full blown KOReader instance.

If you want to build something that does some background job while displaying the animation that's harder.

A lua state/vm is mostly single threaded. The best you can do is some sort of cooperative multitasking, in the form of lua coroutines
pazos is offline   Reply With Quote