diff options
| author | Alexander M Pickering <alex@cogarr.net> | 2025-01-26 14:31:52 -0600 |
|---|---|---|
| committer | Alexander M Pickering <alex@cogarr.net> | 2025-01-26 14:31:52 -0600 |
| commit | c39ff632b46c179709101c5b50a061ebd723689f (patch) | |
| tree | 23060311477b996cd11c50851e7dfb889d339346 /src/ui/checkbox.moon | |
| parent | c1030d5ddbf34b1b19fa7fd169f3cf5a7b7f98f3 (diff) | |
| download | ggj25-c39ff632b46c179709101c5b50a061ebd723689f.tar.gz ggj25-c39ff632b46c179709101c5b50a061ebd723689f.tar.bz2 ggj25-c39ff632b46c179709101c5b50a061ebd723689f.zip | |
final commit
Diffstat (limited to 'src/ui/checkbox.moon')
| -rw-r--r-- | src/ui/checkbox.moon | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/ui/checkbox.moon b/src/ui/checkbox.moon new file mode 100644 index 0000000..e76a790 --- /dev/null +++ b/src/ui/checkbox.moon @@ -0,0 +1,13 @@ +Button = require("ui.button") +class Checkbox extends Button + fire: (e) => + if e.event == "mouse_down" + if @depressed + @up! + else + @down! + --@down! + if @on + @on(@depressed) + +Checkbox |
