honeylisp/editor/portraitedit.fnl

19 lines
578 B
Plaintext
Raw Normal View History

2020-11-22 03:50:11 +00:00
(local util (require :lib.util))
(local TileView (require :editor.tileedit))
(local tiledraw (require :editor.tiledraw))
(local tiles (require :game.tiles))
2021-12-26 20:04:34 +00:00
(local {: textfield} (util.require :editor.imgui))
2020-11-22 03:50:11 +00:00
(local PortraitView (TileView:extend))
(fn PortraitView.tilekeys [self] [:gfx])
2021-12-26 21:37:30 +00:00
(fn PortraitView.initial-style [self] :portraits)
(fn PortraitView.draw-sidebar [self form]
2020-11-22 03:50:11 +00:00
(local tile (-?> self.tilecache.tiles (. self.itile)))
(when tile
2021-12-26 20:04:34 +00:00
(set tile.label (textfield form "Label" tile.label))))
2020-11-22 03:50:11 +00:00
(fn PortraitView.get_name [self] "Portrait Editor")
PortraitView