SirMallard / Iris

Iris is an Immediate-Mode GUI Library for Roblox for creating debug and visualisation UI and tools, based on Dear ImGui,
https://sirmallard.github.io/Iris/
MIT License
164 stars 25 forks source link

Iris.Inert #27

Closed SirMallard closed 1 year ago

SirMallard commented 1 year ago

Sinks any input onto children widget, effectively making them disabled. Can't use Iris.Disabled since that is a property already. Either Iris.Inert or Iris.InActive?

SirMallard commented 1 year ago

I don't think this is really possible. The MouseEnter and MouseLeave states fire regardless of whether there's an element in front, so visually it breaks. Also, it requires the zindex of the widget to be above every other widget, which is a lot of work to calculate, especially when it has descendants beyond children. Furthermore, it would need a dedicated End method to remove any config changes, such as setting the text color to disabled. Even further, child widgets which span the entire screen don't work with it.

It was a nice idea and it would be ideal to have some way to disable any widget, but unless anyone has some better ideas, I'm not going to implement it.