19 lines
578 B
Fennel
19 lines
578 B
Fennel
(local util (require :lib.util))
|
|
(local TileView (require :editor.tileedit))
|
|
(local tiledraw (require :editor.tiledraw))
|
|
(local tiles (require :game.tiles))
|
|
(local {: textfield} (util.require :editor.imgui))
|
|
|
|
(local PortraitView (TileView:extend))
|
|
|
|
(fn PortraitView.tilekeys [self] [:gfx])
|
|
(fn PortraitView.initial-style [self] :portraits)
|
|
(fn PortraitView.draw-sidebar [self form]
|
|
(local tile (-?> self.tilecache.tiles (. self.itile)))
|
|
(when tile
|
|
(set tile.label (textfield form "Label" tile.label))))
|
|
|
|
(fn PortraitView.get_name [self] "Portrait Editor")
|
|
|
|
PortraitView
|