gui

package
v0.0.0-...-255f02d Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ScreenWidth  = 720
	ScreenHeight = 1024
)

Variables

This section is empty.

Functions

func CreateKeyController

func CreateKeyController(handler KeyHandler) *gtk.EventControllerKey

func NewGameWidget

func NewGameWidget(parent GJumpWindow, g gameCallbacks) gtk.Widgetter

func NewMenuWidget

func NewMenuWidget(parent GJumpWindow) gtk.Widgetter

Types

type GJumpWindow

type GJumpWindow interface {
	LoadWidget(widget gtk.Widgetter)
	ConnectKeyEvents(handler KeyHandler)
	QuitApp()
}

func NewWindow

func NewWindow(app *gtk.Application) GJumpWindow

type GameWidget

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

type KeyHandler

type KeyHandler interface {
	ProcessKeyPress(keyId uint, state gdk.ModifierType) (ok bool)
	ProcessKeyRelease(keyId uint, state gdk.ModifierType)
}

type Window

type Window struct {
	*gtk.ApplicationWindow
}

func (*Window) ConnectKeyEvents

func (window *Window) ConnectKeyEvents(handler KeyHandler)

func (*Window) LoadWidget

func (window *Window) LoadWidget(widget gtk.Widgetter)

func (*Window) QuitApp

func (window *Window) QuitApp()

Jump to

Keyboard shortcuts

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