Yellow-Dog-Man / Resonite-Issues

Issue repository for Resonite.
https://resonite.com
135 stars 2 forks source link

More DynamicVariable Button components please! #1630

Open ukilop opened 5 months ago

ukilop commented 5 months ago

Is your feature request related to a problem? Please describe.

It is a tad tedious for simple buttons to simply write a value to a dynamic variable, its either ButtonValueSet + DynamicValueVariable (which can cause issues in some cases as thats a new storage field for dynvars) or flux with ButtonEvents + WriteDynamicVariable

Describe the solution you'd like

The new HoverDynamicValueSet in the PRERELEASE build is intriguing for a variety of reasons, but first a suggested alteration, perhaps it should be in Common UI/Button Interactions folder instead?

But my main ask is: Could we get a few more Button-Events reactive components similar to this? such as: HoverDynamicReferenceSet<T> ButtonDynamicReferenceSet<T> ButtonDynamicValueSet<T>

Describe alternatives you've considered

Continue doing what I described in first section?

Additional Context

No response

Requesters

No response

JackTheFoxOtter commented 5 months ago

but first a suggested alteration, perhaps it should be in Common UI/Button Interactions folder instead?

I don't think it's a button event receiver. It doesn't need a button event. It works on any UIX element without a button.

Banane9 commented 5 months ago

Ahh yes, I remember thinking about these during the old times™. Absolutely agree on those being a convenient addition, especially with localized values for dynamic variables.

mpmxyz commented 5 months ago

As a motivation: I just tried to setup a tooltip system for one of my creations and unfortunately had to find out that I'd need a HoverDynamicReferenceSet<Slot> if I want to keep the complexity within the UI small. The biggest challenge is to get the global position of the UIX element. With a small amount of ProtoFlux per element you may get a global position but that won't stay valid when the object is moving or if you want to handle multiple objects with the same system. Keeping a reference to the UI slot would solve that.

Frooxius commented 5 months ago

I'll add a bunch more when I get time!