From 1f77cd05fdbed146afac1020954e4910fa01875f Mon Sep 17 00:00:00 2001 From: San Jacobs Date: Sat, 27 Sep 2025 18:40:35 +0200 Subject: Coms have hovering and pressing data! Buttons give feedback! --- src/main.odin | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/main.odin') diff --git a/src/main.odin b/src/main.odin index a621812..ead0e83 100644 --- a/src/main.odin +++ b/src/main.odin @@ -120,9 +120,12 @@ button :: proc(text : string, id : string) -> t.Com { padding={2,2,2,2}, flags=t.BUTTON, id=id) + color : t.Color = {.1,.1,.1, 1} + if com.hover do color={.2,.2,.2, 1} + if com.clicked || com.is_down do color={.05,.05,.05, 1} t.tafl(sizing_width=t.GROW, sizing_height=t.GROW, - color={.1,.1,.1, 1}, + color=color, position_horizontal=.MIDDLE, position_vertical=.MIDDLE,) t.tafl(text=text) -- cgit v1.2.1