devtools

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2023 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// BgColor is used to draw background behind the text
	BgColor byte = 1
	// FgColor is used to print text, draw icons etc.
	FgColor byte = 7
)

Functions

func Export added in v0.22.0

func Export(name string, v any)

Export makes the v visible in terminal. v can be a variable or a function. It will be visible under the specified name.

If you want to be able to update the value of v in the terminal, please pass a pointer to v. For example:

v := 1
devtools.Export("v", &v)

Then in the terminal write:

v = 2

func ExportType added in v0.22.0

func ExportType[T any]()

ExportType makes the type T visible in terminal. It will be visible under the name "package.Name". For example type "github.com/a/b/c/pkg.SomeType" will be visible as "pkg.SomeType". This function also automatically imports the package.

func MustRun

func MustRun(runBackend func() error)

MustRun runs the game with devtools.

Any time you can pause them game by pressing F12. This will show screen inspector. F12 again resumes the game.

Types

This section is empty.

Directories

Path Synopsis
internal
lib
Package lib provides symbols to be used by Yaegi interpreter.
Package lib provides symbols to be used by Yaegi interpreter.
rgb

Jump to

Keyboard shortcuts

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