Documentation ¶
Index ¶
- func Animate(num1 *int, num2, duration int)
- func ApplyChanges(w [][]Tile, changes []Ve2, centered bool)
- func Clear()
- func ColumnMargin(w [][]Tile, c, cPos int) [][]Tile
- func CompareWorlds(world1, world2 [][]Tile) bool
- func CutPix(pix [][]string, from Ve2, to Ve2) ([][]string, error)
- func CutWorld(world [][]Tile, from Ve2, to Ve2) ([][]Tile, error)
- func DrawCentered(w [][]Tile, additionalRow bool)
- func DrawWorld(w [][]Tile)
- func DrawWorldOld(world [][]Tile)
- func DuplicatePix(p1 [][]string) [][]string
- func DuplicateWorld(w [][]Tile) [][]Tile
- func EditTile(world [][]Tile, pos Ve2, t Tile) ([][]Tile, error)
- func EditWorld(world [][]Tile, from, to Ve2, tile Tile) ([][]Tile, error)
- func FlipPixMapV(pm [][]string) (tr [][]string)
- func GetColor(in string, bg bool) string
- func LoadFont(path string) map[string]interface{}
- func LoadPixMap(path string) [][]string
- func LoadWorld(path string) [][]Tile
- func LoadWorldJSON(path string) [][]Tile
- func PNGToPixMap(filename string) (tr [][]string, err error)
- func ParsePixMap(pix [][]string) [][]Tile
- func ReturnWithLayers(world [][]Tile, layers []Layer) ([][]Tile, error)
- func ReturnWithPixLayers(pixmap [][]string, layers []PixLayer) [][]string
- func SavePixMap(pm [][]string, path string)
- func SaveWorld(world [][]Tile, path string)
- func SaveWorldJSON(w [][]Tile, path string)
- func SetCursor(pos Ve2)
- func TermboxPalette() map[string]termbox.Attribute
- func TextToPixMap(font map[string]interface{}, color, bgcolor, text string, size Ve2) [][]string
- func WorldToPixMap(w [][]Tile) [][]string
- func WriteToTermbox(w [][]Tile)
- type Layer
- type PixLayer
- type Tile
- type Ve2
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Animate ¶
Animates an int. Still doesnt work when duration is smaller, than the difference between the two input numbers
func ApplyChanges ¶
Applies changes using termbox
func ColumnMargin ¶
Sets a world column to be drawn at specific terminal column
func CompareWorlds ¶
func DrawCentered ¶
Draws world on the center of the screen can get additional blank margin for user input in ui
func DuplicatePix ¶
func DuplicateWorld ¶
func EditTile ¶
Changes one specific tile in the world. Can append tiles, if the world is too small.
func FlipPixMapV ¶
func LoadPixMap ¶
func LoadWorld ¶
Loads world from file. This shouldn't be used anymore, but if you have old worlds, you can use this to convert them. Doesn't support background color!
func LoadWorldJSON ¶
func PNGToPixMap ¶
func ParsePixMap ¶
func ReturnWithLayers ¶
Adds world to a world as another layer. Will append tiles if needed.
func ReturnWithPixLayers ¶
func SavePixMap ¶
func SaveWorldJSON ¶
func TermboxPalette ¶
func TermboxPalette() map[string]termbox.Attribute
func TextToPixMap ¶
func WorldToPixMap ¶
func WriteToTermbox ¶
func WriteToTermbox(w [][]Tile)
Writes a world to Termbox buffer. You have to Init and Sync termbox yourself. If tile is longer than one character, cliw can deal with it.