add some very professional icons
This commit is contained in:
parent
7c061624c7
commit
7ea1e9a0e7
BIN
carousel.png
Normal file
BIN
carousel.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.5 KiB |
BIN
close-window.png
Normal file
BIN
close-window.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.4 KiB |
BIN
launcher.png
Normal file
BIN
launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.5 KiB |
56
rc.fnl
56
rc.fnl
@ -1,32 +1,52 @@
|
|||||||
(local { : GdkPixbuf } (require :lgi))
|
(local { : GdkPixbuf } (require :lgi))
|
||||||
(local { : view } (require :fennel))
|
(local { : view } (require :fennel))
|
||||||
|
|
||||||
(var texture nil)
|
|
||||||
|
|
||||||
(local pixels
|
|
||||||
(let [(buf err) (GdkPixbuf.Pixbuf.new_from_file "globe.png")]
|
|
||||||
(if (not buf) (print :err err))
|
(fn texture-from-file [renderer filename]
|
||||||
buf))
|
(let [pixels
|
||||||
|
(let [(buf err) (GdkPixbuf.Pixbuf.new_from_file filename)]
|
||||||
|
(if (not buf) (print :err err))
|
||||||
|
buf)]
|
||||||
|
(renderer:texture_from_pixels
|
||||||
|
pixels.rowstride
|
||||||
|
pixels.width
|
||||||
|
pixels.height
|
||||||
|
(pixels:get_pixels))))
|
||||||
|
|
||||||
(kiwmi:on
|
(kiwmi:on
|
||||||
"output"
|
"output"
|
||||||
(fn [output]
|
(fn [output]
|
||||||
(output:set_mode 360 720 0)
|
(output:set_mode 360 720 0)
|
||||||
(let [r (output:renderer)]
|
(let [r (output:renderer)
|
||||||
(set texture (r:texture_from_pixels
|
kill (texture-from-file r "close-window.png")
|
||||||
pixels.rowstride
|
launch (texture-from-file r "launcher.png")
|
||||||
pixels.width
|
spinner (texture-from-file r "carousel.png")]
|
||||||
pixels.height
|
|
||||||
(pixels:get_pixels)))
|
|
||||||
(output:on "render"
|
(output:on "render"
|
||||||
(fn [{: output : renderer}]
|
(fn [{: output : renderer}]
|
||||||
(renderer:draw_texture
|
(let [bar-height 40
|
||||||
texture
|
matrix [1 0 0
|
||||||
[1 0 0
|
0 1 0
|
||||||
0 1 0
|
0 0 1]]
|
||||||
0 0 1]
|
(renderer:draw_rect :#00000077
|
||||||
150 150 0.7)))
|
0 (- 720 bar-height)
|
||||||
(print :texture texture))))
|
690 360 bar-height)
|
||||||
|
(renderer:draw_texture
|
||||||
|
kill
|
||||||
|
matrix
|
||||||
|
30 (- 720 bar-height)
|
||||||
|
0.7)
|
||||||
|
(renderer:draw_texture
|
||||||
|
launch matrix
|
||||||
|
(- 180 (/ bar-height 2)) (- 720 bar-height)
|
||||||
|
0.7)
|
||||||
|
(renderer:draw_texture
|
||||||
|
spinner
|
||||||
|
matrix
|
||||||
|
(- 360 30 bar-height) (- 720 bar-height)
|
||||||
|
0.7)))))))
|
||||||
|
|
||||||
|
|
||||||
(kiwmi:on "view"
|
(kiwmi:on "view"
|
||||||
(fn [view]
|
(fn [view]
|
||||||
|
Loading…
Reference in New Issue
Block a user