2020-11-23 00:44:56 +00:00
|
|
|
(local TileView (require :editor.tileedit))
|
|
|
|
(local tiledraw (require :editor.tiledraw))
|
|
|
|
(local tiles (require :game.tiles))
|
|
|
|
(local style (require :core.style))
|
|
|
|
|
|
|
|
(local FontEditView (TileView:extend))
|
|
|
|
|
|
|
|
(fn FontEditView.spritegen [self] tiledraw.char-to-sprite)
|
|
|
|
(fn FontEditView.tilesize [self] (values 8 8))
|
2020-12-30 17:47:07 +00:00
|
|
|
(fn FontEditView.tilekeys [self] [:gfx])
|
2020-11-23 00:44:56 +00:00
|
|
|
(fn FontEditView.map-bitxy [self x y] (values y x))
|
|
|
|
(fn FontEditView.draw-tile-flags [self x y]
|
|
|
|
(when self.itile
|
|
|
|
(local char (string.char (+ self.itile 0x20 -1)))
|
|
|
|
(renderer.draw_text style.big_font char x y style.text))
|
|
|
|
(love.graphics.setColor 1 1 1 1))
|
|
|
|
(fn FontEditView.filename [self] tiles.fn-font)
|
|
|
|
(fn FontEditView.get_name [self] "Font Editor")
|
|
|
|
|
|
|
|
FontEditView
|
|
|
|
|