DefaultFunctions

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContinueGame

func ContinueGame(_ fyne.Window, _ map[string]interface{}) (map[string]interface{}, map[string]fyne.CanvasObject, error)

ContinueGame continues the game from the last save file

func CustomError

func CustomError(window fyne.Window, args map[string]interface{}) (results map[string]interface{}, widgets map[string]fyne.CanvasObject, err error)

CustomError creates a dialog window over the current game window The user is prompted if they would like to try and continue the game despite the error If they choose to continue, the error is not returned

func Import

func Import()

Import is a function that exists to allow importing of this package even if you don't directly use any of its functions, while still running the init function without disabling the unused import warning, You can also import a functions package for side effects by changing its alias to _ but this way allows you to still use the package

func LoadGame

func LoadGame(window fyne.Window, args map[string]interface{}) (map[string]interface{}, map[string]fyne.CanvasObject, error)

LoadGame loads a game save file and starts the game

func NewGame

func NewGame(window fyne.Window, args map[string]interface{}) (results map[string]interface{}, widgets map[string]fyne.CanvasObject, err error)

NewGame creates a new game save file and starts the game

func Quit

func Quit(window fyne.Window, _ map[string]interface{}) (map[string]interface{}, map[string]fyne.CanvasObject, error)

Quit simply closes the window after promting the user for confirmation

func SaveAs

func SaveAs(window fyne.Window, args map[string]interface{}) (map[string]interface{}, map[string]fyne.CanvasObject, error)

SaveAs saves the game as a new save file

Types

This section is empty.

Jump to

Keyboard shortcuts

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