Closed MathemanFlo closed 2 years ago
This is a good question. I thought about that, too. The problem is that inlineRadio is more a container of multiple controls inside and it has no real interface to communicate a hovered state to the caller. E.g. the Started, Hovered, ... state known from image or label. I can imagine multiple solutions.
handle.position = hovered;
and indicate actual changes by return value (as we do now). It's still inconsistent with other controls though...var handle : Handle = ...;
var selectedValue = Ext.inlineRadio(ui, handle, ["A", "B"], Left);
if (ui.isHovered && handle.position == 0) ...
else if (ui.isHovered && handle.position == 1) ...
We simply skip this feature. It is really not that important and I could change https://github.com/armory3d/armorpaint/commit/501af489f3772190a46f593e1d121df1626a29de to use one tooltip instead of multiple. At the moment it is really only for this case.
Oki, let's skip this one for now but would love to revisit it eventually. Can do a re-think of zui design in the future, now that there is a lot of experience gained from the zui usage in ArmorPaint. 🙂
I completely agree. In general zui is well designed and flexible but it could use some redesign for sure as any grown code base.
Is there a way to let user call
ui.tooltip()
manually like in other cases? I guess we would need to expose actively hovered item?