Iris - Immediate Mode UI library, based on Dear ImGui

Will there ever be docking support for Window widgets?

I know this will probably be a complicated feature to add but it would be amazing to dock a settings panel to the right while messing with settings. I know this is already possible by well moving the window and resizing it but still I think it could be a great addition.

You are able to just pass through the same state object to multiple widgets:

local state = Iris.State(true)

Iris.Window({ "Window A" })
    Iris.Checkbox({ "Checkbox A" }, { isChecked = state })
Iris.End()

Iris.Window({ "Window B" })
    Iris.Checkbox({ "Checkbox B" }, { isChecked = state })
Iris.End()

Not in the near future. Iā€™ve had less time recently to devote to it, but as we get most of the widgets out and finished, Iā€™m interested in pursuing this line.

Apologies for the late reply, for some reason I didnā€™t get a notificationā€¦ Again.

Anyway, I know, but both Checkbox Widgetsā€™ States are bound to their own separate State. I tried adding a new line under sort of like this:

local state = Iris.State(true)
local state2 = Iris.State(true)

Iris.Window({ "Window A" })
    local foo = Iris.Checkbox({ "Checkbox A" }, { isChecked = state })
    foo.state.isChecked:set(state2:get())
Iris.End()

Iris.Window({ "Window B" }) -- Settings Window
    local foo = Iris.Checkbox({ "Checkbox B" }, { isChecked = state2 })
    foo.state.isChecked:set(state:get())
Iris.End()

But obviously, like I mentioned before, Iris just broke.

change state:get() to state.value, worked for me. not in your case, but i mean, getting stateā€™s value in general

1 Like

Thank you, Iā€™m a bit busy at the moment, but Iā€™ll try this when I get around to it and get back to you, cheers mate! :slight_smile:

Absolutely revolutionary plugin, testing out systems with weird edge cases has never been easier!

1 Like

I donā€™t quite understand your use case here. If you want two checkboxes to have the same state, then you can just use one. If they are going to be linked, then why do they each need their own state?

Itā€™s hard to explain, Iā€™ll try and see if I can use one state linked to both, thank you.