User interface toolkit for Go with support for SDL2 and HTML Canvas render targets.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
670 B

package ui
Glyph images as Base64 encoded PNGs.
import (
// List of available glyphs.
const (
// Downward pointed black arrow 9x9 pixels.
// GetGlyph loads a PNG image from a hard-coded glyph.
func GetGlyph(b64 string) (image.Image, error) {
data, err := base64.StdEncoding.DecodeString(b64)
if err != nil {
return nil, err
scanner := bytes.NewReader(data)
return png.Decode(scanner)