utils

package
v1.36.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GamepadButtonMap = map[string]ebiten.GamepadButton{
	"GamepadButton0":  ebiten.GamepadButton0,
	"GamepadButton1":  ebiten.GamepadButton1,
	"GamepadButton2":  ebiten.GamepadButton2,
	"GamepadButton3":  ebiten.GamepadButton3,
	"GamepadButton4":  ebiten.GamepadButton4,
	"GamepadButton5":  ebiten.GamepadButton5,
	"GamepadButton6":  ebiten.GamepadButton6,
	"GamepadButton7":  ebiten.GamepadButton7,
	"GamepadButton8":  ebiten.GamepadButton8,
	"GamepadButton9":  ebiten.GamepadButton9,
	"GamepadButton10": ebiten.GamepadButton10,
	"GamepadButton11": ebiten.GamepadButton11,
	"GamepadButton12": ebiten.GamepadButton12,
	"GamepadButton13": ebiten.GamepadButton13,
	"GamepadButton14": ebiten.GamepadButton14,
	"GamepadButton15": ebiten.GamepadButton15,
	"GamepadButton16": ebiten.GamepadButton16,
	"GamepadButton17": ebiten.GamepadButton17,
	"GamepadButton18": ebiten.GamepadButton18,
	"GamepadButton19": ebiten.GamepadButton19,
	"GamepadButton20": ebiten.GamepadButton20,
	"GamepadButton21": ebiten.GamepadButton21,
	"GamepadButton22": ebiten.GamepadButton22,
	"GamepadButton23": ebiten.GamepadButton23,
	"GamepadButton24": ebiten.GamepadButton24,
	"GamepadButton25": ebiten.GamepadButton25,
	"GamepadButton26": ebiten.GamepadButton26,
	"GamepadButton27": ebiten.GamepadButton27,
	"GamepadButton28": ebiten.GamepadButton28,
	"GamepadButton29": ebiten.GamepadButton29,
	"GamepadButton30": ebiten.GamepadButton30,
	"GamepadButton31": ebiten.GamepadButton31,
}

GamepadButtonMap is a gamepad button mapping

View Source
var KeyMap = map[string]ebiten.Key{}/* 105 elements not displayed */

KeyMap is a US keyboard mapping

View Source
var MouseButtonMap = map[string]ebiten.MouseButton{
	"MouseButtonLeft":   ebiten.MouseButtonLeft,
	"MouseButtonRight":  ebiten.MouseButtonRight,
	"MouseButtonMiddle": ebiten.MouseButtonMiddle,
}

MouseButtonMap is a mouse button mapping

Functions

func LogError

func LogError(err error)

LogError prints error and exits if error is not nil

func LogFatalf

func LogFatalf(format string, args ...any)

LogFatalf prints a formatted error and exits

func Try

func Try[T any](out T, err error) T

Try prints error and exits if error is not nil, or return the original value otherwise

func Try2

func Try2[T, U any](out1 T, out2 U, err error) (T, U)

Try2 prints error and exits if error is not nil, or return the 2 original values otherwise

Types

This section is empty.

Jump to

Keyboard shortcuts

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