util

package
v0.0.0-...-c744f44 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const ErrNoImageChosen log.ConstErr = "no image chosen"

ErrNoImageChosen indicates that an image selection was cancelled

Variables

This section is empty.

Functions

func OpenFileDialog

func OpenFileDialog(win *sdl.Window) (string, error)

OpenFileDialog uses a system file picker to get a filename from the user

func SaveFileDialog

func SaveFileDialog(*sdl.Window) (string, error)

SaveFileDialog uses a system file picker to get a file path from the user for the purpose of saving an image

Types

type MenuAction uint32

MenuAction is an identifier for the event handling to know which menu button has been pressed.

const (
	MenuNone MenuAction = iota
	MenuExit
)

Constants for all possible menu actions.

type StopWatch

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

StopWatch is a time.Time with a stopping methods

func Start

func Start() StopWatch

Start returns a newly started stopwatch

func (StopWatch) Stop

func (sw StopWatch) Stop(str string)

Stop prints the time duration since the stopwatch start

func (StopWatch) StopGetNano

func (sw StopWatch) StopGetNano() int64

StopGetNano returns the nanoseconds from the stopwatch start

func (StopWatch) StopRecordAverage

func (sw StopWatch) StopRecordAverage(key string)

Jump to

Keyboard shortcuts

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