io

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Entry

func Entry(ch chan EntryResult, title, text, def string)

func IsExist

func IsExist(path string) bool

func Pick

func Pick(ch chan PickResult, options ...func(*PickOption))

func PickMultiple

func PickMultiple(ch chan PickMultipleResult, options ...func(*PickOption))

func Question

func Question(ch chan QuestionResult, title, text string)

func Read

func Read(ch chan ReadResult, path string)

func ReadPng

func ReadPng(path string) (img image.Image, err error)

func ReadSprite

func ReadSprite(ch chan ReadSpriteResult, path string)

func ReadSpriteSheet

func ReadSpriteSheet(ch chan ReadSpriteSheetResult, path string)

func SelectDir

func SelectDir(ch chan SelectDirResult)

func WithName

func WithName(name string) func(*PickOption)

func WithPatterns

func WithPatterns(patterns []string) func(*PickOption)

func WithToSave

func WithToSave(defaultName string) func(*PickOption)

func Write

func Write(ch chan error, bytes []byte, path string)

func WritePng

func WritePng(img image.Image, path string) (err error)

func WriteSpriteSheet

func WriteSpriteSheet(ch chan WriteSpriteSheetResult, sprites []sprite.Sprite, path string)

Types

type EntryResult

type EntryResult struct {
	Input string
	Err   error
}

type PickMultipleResult

type PickMultipleResult struct {
	Paths []string
	Err   error
}

type PickOption

type PickOption struct {
	// contains filtered or unexported fields
}

type PickResult

type PickResult struct {
	Path string
	Err  error
}

type QuestionResult

type QuestionResult struct {
	Answer bool
}

type ReadResult

type ReadResult struct {
	Bytes []byte
	Path  string
	Err   error
}

type ReadSpriteResult

type ReadSpriteResult struct {
	Sprite sprite.Sprite
	Path   string
	Err    error
}

type ReadSpriteSheetResult

type ReadSpriteSheetResult struct {
	Sprites []sprite.Sprite
	Err     error
}

type SelectDirResult

type SelectDirResult struct {
	Path string
	Err  error
}

type WriteSpriteSheetResult

type WriteSpriteSheetResult struct {
	RectsMap map[string]image.Rectangle
	Err      error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL