detect mouse clicks in bottom bar (hacky)
This commit is contained in:
parent
7ea1e9a0e7
commit
b346323d0b
25
rc.fnl
25
rc.fnl
@ -47,6 +47,31 @@
|
|||||||
(- 360 30 bar-height) (- 720 bar-height)
|
(- 360 30 bar-height) (- 720 bar-height)
|
||||||
0.7)))))))
|
0.7)))))))
|
||||||
|
|
||||||
|
(fn kill-window []
|
||||||
|
(print "DIE")
|
||||||
|
true)
|
||||||
|
|
||||||
|
(fn launch []
|
||||||
|
(print "WHOOSH")
|
||||||
|
true)
|
||||||
|
|
||||||
|
(fn carousel []
|
||||||
|
(print "spin spin sugar")
|
||||||
|
true)
|
||||||
|
|
||||||
|
(let [cursor (kiwmi:cursor)]
|
||||||
|
(cursor:on "button_down"
|
||||||
|
(fn [button]
|
||||||
|
(let [(x y) (cursor:pos)]
|
||||||
|
(if (> y 680)
|
||||||
|
(if (< x 70)
|
||||||
|
(kill-window)
|
||||||
|
(and (< 150 x) (< x 190))
|
||||||
|
(launch)
|
||||||
|
(and (< 285 x) (< x 330))
|
||||||
|
(carousel)
|
||||||
|
false))))))
|
||||||
|
|
||||||
|
|
||||||
(kiwmi:on "view"
|
(kiwmi:on "view"
|
||||||
(fn [view]
|
(fn [view]
|
||||||
|
Loading…
Reference in New Issue
Block a user