Actaully previous way was correct, event handlers on parent

This commit is contained in:
JMS55 2023-12-21 22:07:00 -08:00
parent 302f3cb6e3
commit 75504ec4fc

View file

@ -80,12 +80,12 @@ fn SceneTree<'a>(cx: Scope, selected_entity: &'a UseState<Option<Entity>>) -> El
}
}
node {
padding: "8",
background_color: if spawn_entity_hovered { NEUTRAL_600 } else { NEUTRAL_800 },
text {
onclick: move |_| spawn_entity(),
onmouse_enter: enter,
onmouse_exit: exit,
padding: "8",
background_color: if spawn_entity_hovered { NEUTRAL_600 } else { NEUTRAL_800 },
text {
text: "Spawn Entity",
text_size: "18"
}