2 ms·
As someone with limited experience, how do you deal with animations and such in GTK/Glade? Took a look at the Glade website (https://glade.gnome.org/ https://gl
by capableweb 5y ago
As someone with limited experience, how do you deal with animations and such in GTK/Glade? Took a look at the Glade website (https://glade.gnome.org/ https://glade.gnome.org/) and doesn't seem mentioned. In fact, I cannot even find a list of supported features.
- estebank 5y ago(Disclaimer: I have no idea what I'm talking about) I wouldn't be surprised if you could/had to do something similar to this sprite handling example[1], where instead of updating the sprite's location you update widgets' attributes. This would be a "manual" process, but it should work (if repainting widgets is fast enough). [1]: https://github.com/steshaw/gtk-examples/blob/master/ch13.sprites.animation/defender/animate.c#L304 https://github.com/steshaw/gtk-examples/blob/master/ch13.spr...
- smoldesu 5y agoAnimation is handled by the compositor I'm pretty sure. Since different Linux desktops have different performance requirements, some will opt-in to using more fancy animations, whereas less powerful ones will disable them. For everything else, you'd probably need to use some bespoke activators to achieve the effect you want. Not terribly hard to spin up, but it's definitely less simple than languages designed for frontend development.
- capableweb 5y ago> Animation is handled by the compositor I'm pretty sure. Since different Linux desktops have different performance requirements, some will opt-in to using more fancy animations, whereas less powerful ones will disable them. I... don't understand what this means. Let's say in GTK/Glade I want a Button that when you click on it, it moves from the bottom-left corner to the top-right corner. How do I archive this in that GUI builder or even with the XML spec?
- smoldesu 5y agoI haven't done anything like this myself, but you can directly manipulate the location of UI elements in realtime. Failing all else, Rust is at least low enough level to impliment a frame-by-frame redraw... but that would be a very yucky way to do that.