aboutsummaryrefslogtreecommitdiff
path: root/src/main.odin
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.odin')
-rw-r--r--src/main.odin5
1 files changed, 4 insertions, 1 deletions
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)