Yellow-Dog-Man / Resonite-Issues

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

Scale/Access a UIX Canvas programilly (Flux or Components) #2363

Open AmasterAmaster opened 2 weeks ago

AmasterAmaster commented 2 weeks ago

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

Currently, the only way to access the scale of a UIX Canvas is getting it directly, or getting it dynamically by setting up dynamic variables, (or god forbid, using ref hacking to get the field of the size, my only option currently).

If I want to get a duplicated slot's canvas's size, I would need to jump through hoops just to get the data to read and write to it.

For context: I am making a tool that makes creating, using, editing, modifying, deleting (panel or elements), and cleanup UIX easier for people that do not know how to or want to work with the current UIX system. (I hear many complaints, hence the inspiration of this tool). This of course means I would need to dynamically grab a canvas's size and scale it easily, however the problems are that I can't just grab it directly without opening it up with an inspector, and there are no dynamic variables I could use since none are pre-setup with even the default provided UI Panel in Resonite Essentials.

Describe the solution you'd like

Have an easy way, either using ProtoFlux or Components, to access a UIX Canvas's data (in my case, the size field). This could be similar to an interface reference like IFocusable where you can pass in the reference of a canvas and all the information you need is readily available.

Describe alternatives you've considered

I have considered the following:

Additional Context

This would help make editing and creating UIX so much easier and faster, and people that do not want to work with UIX happy that there is something that makes this easier for them.

Requesters

AmasterAmaster

Zyzyl commented 2 weeks ago

This would be implicity solved by https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/57

Also, you say the core problem you're wanting to solve is "UIX is difficult for some users to work with". The difficulty accessing the Canvas' Size field is a sub-issue relating to the specific implementation details of your proposed solution to that more fundamental problem. If there isn't one already, I'd suggest opening an issue requesting a better editor for UIX instead.

AmasterAmaster commented 2 weeks ago

@Zyzyl Fair enough, I just wanted to provide extra context for this issue, as some people may say "why would you want that?". Hence why I provided one reason, but there could be many. And yes, It would be very nice to have component access to this, and would solve this easily. I am not sure if there could be another solution in contrast (and I am open to ideas), but at least making this request will allow it to be tracked in some fashion.