And you'd be entirely wrong about that!richmond62 wrote: ↑Wed Aug 21, 2024 12:16 pm I would suppose the ONLY real difference between a new 'classic' control and a control that has been assembled from a group of other controls is that the former cannot be ungrouped: I am not convinced that is a good thing.
1) How do you 'ungroup' the image data of an icon used on a 'classic button' from the button? You can't. I have written scripts that can, but it's not as simple as you might think it is. As I'm sure you already know, the actual image used as the icon must be stored elsewhere in seperate 'image control'.
2) Do you not see the button's roundRect path and styled font text are pulsing slightly, while separately it's also spinning a rather large 24bit image with alpha channel inside of it? And it's 'non-blocking' while doing all of that. You can click on it and it does things without interrupting the animation. There is simply no way to do this sort of thing with 'classic' button, or even the 'classic image' control.
Moreover, this 'button' could be made to store its icon in a 'text' (or 'imageText'?) property the way a classic 'Image' control can, unlike a 'classic button' which only contains imageIDs for images that are located elsewhere.
It could be made to render the image inside of a compound path so you could have your image clipped inside of a star shape (for example), in fact I have already done that in one of my earlier experiments with widgets and images. See that 'card deal' animation posted earlier in the thread? That image, along with the roundRect 'SVG path' it's being rendered inside of, are being skewed and distorted on the canvas from changing values of a large set of properties I built into that widget. The animation was actually a simple XTscript that was setting the properties on the widget on a timer.
Also as mentioned, unlike 'classic' controls, Widgets are modules and so are external to the Engine. You can do iterative development on them, making small changes without having to recompile the engine(s) on all the platforms and release a new distribution just for people to be able to try a new widget or new version of a widget control. In some respects that makes Widgets somewhere in between creating a composite group of custom control, and editing a classic control in the Engines VC++ source and recompiling.
You can also still group widgets with other controls if you like, I've often done that to use 'SVG icons' widget as icons grouped with a button underneath.
One very real difference is that you reference a 'classic button' as a 'button' (or 'btn' for short) in script, while widget objects are referenced as 'widget' (or 'wgt' for short).