Actaully previous way was correct, event handlers on parent
This commit is contained in:
parent
302f3cb6e3
commit
75504ec4fc
|
@ -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"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue