menu

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2025 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NONE = iota
	GB
	GBA
)
View Source
const (
	MENU_AUDIO_GOOD     = 0
	MENU_AUDIO_BAD      = 1
	MENU_AUDIO_REALGOOD = 2
)

Variables

This section is empty.

Functions

func LoadSfx

func LoadSfx(ch chan []byte, sound []byte)

func WriteGameData

func WriteGameData(gameData *[]GameData)

Types

type GameData

type GameData struct {
	RomPath string        `json:"RomPath"`
	ArtPath string        `json:"ArtPath"`
	Image   *ebiten.Image `json:"-"`
	Type    int           `json:"-"`
}

func LoadGameData

func LoadGameData() []GameData

func ReorderGameData

func ReorderGameData(gameData *[]GameData, idx int) []GameData
type Menu struct {
	SelectedIdx int
	Data        []GameData

	Splash *ebiten.Image
	// contains filtered or unexported fields
}

func NewMenu

func NewMenu(context *audio.Context) *Menu
func (m *Menu) DrawMenu(screen *ebiten.Image, frame uint64)
func (m *Menu) Image(screen *ebiten.Image, x, y, elementUnit float64, i int)
func (m *Menu) InputHandler(keys []ebiten.Key, buttons []ebiten.StandardGamepadButton, frame uint64) bool
func (m *Menu) SplashImage(screen *ebiten.Image)
type MenuPlayer struct {
	// contains filtered or unexported fields
}

func NewMenuPlayer

func NewMenuPlayer(audioContext *audio.Context) (*MenuPlayer, error)
func (p *MenuPlayer) Play(bytes []byte)

Jump to

Keyboard shortcuts

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