owo-lib
owo-lib copied to clipboard
[ui] crash with nested dropdown components
This has changed a bit. Ignoring the checkbox-specific changes, the
.nested()call now requires sizing. There is also some pitfall with the nested component, as it currently crashes when hovered :thinking: E.G.:
Components.dropdown(Sizing.content())
.button(Text.literal("Option 1"), button -> {
// Handle button click event
})
.checkbox(Text.literal("Option 2"), false, ignored -> {})
.nested(Text.literal("Submenu"), Sizing.content(), submenu -> {
submenu.button(Text.literal("Submenu Option"), button -> {
// Handle submenu button click event
});
})
.closeWhenNotHovered(true)
.padding(Insets.of(5))
.surface(Surface.TOOLTIP)
Originally posted by @Noaaan in https://github.com/wisp-forest/docs/pull/12#discussion_r1896762725