diff options
| author | Alexander M Pickering <alex@cogarr.net> | 2025-01-21 16:03:25 -0600 |
|---|---|---|
| committer | Alexander M Pickering <alex@cogarr.net> | 2025-01-21 16:03:25 -0600 |
| commit | 89a8f94ac0206412c1a2d7b8766d97dbdbd36253 (patch) | |
| tree | c9ddc23d31d3c5058d3465dabb68aae7b8209138 /src/ui/button.moon | |
| parent | 0370d64b3bd7914be55358817e52bbc8a529a7d3 (diff) | |
| download | ggj25-89a8f94ac0206412c1a2d7b8766d97dbdbd36253.tar.gz ggj25-89a8f94ac0206412c1a2d7b8766d97dbdbd36253.tar.bz2 ggj25-89a8f94ac0206412c1a2d7b8766d97dbdbd36253.zip | |
work
Diffstat (limited to 'src/ui/button.moon')
| -rw-r--r-- | src/ui/button.moon | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ui/button.moon b/src/ui/button.moon index 5915bc9..6eaa6d3 100644 --- a/src/ui/button.moon +++ b/src/ui/button.moon @@ -2,6 +2,7 @@ s = require("ui.sprites") util = require("util") color = require("color") +world = require("world") states = {"up","down"} rows = {"upper","mid","lower"} cols = {"left","mid","right"} @@ -107,8 +108,9 @@ class Button @text = am.text(text, "left","top", color.am_color.foreground) position\append( am.translate(@@down_upper_left.width, -@@down_upper_right.height)\append( + am.scale(world.controller.text_size)\append( @text - )) + ))) @depressed = false down: () => @depressed = true |
