view

package
v0.0.0-...-59ee81c Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Overview

Package view is the view of the game. It handles user input and presents the game to the user.

Index

Constants

View Source
const (

	// WindowWidthPx is the suggested window width
	WindowWidthPx = viewWidthPx
	// WindowHeightPx is the suggested window height
	WindowHeightPx = controlsHeightPx + viewHeightPx
)

Variables

This section is empty.

Functions

This section is empty.

Types

type View

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

View displays the game window and handles user input.

func New

func New(eng *engine.Engine, w *app.Window) *View

New returns a new View.

func (*View) Loop

func (v *View) Loop()

Loop starts handing user input and frame redraws. This function returns only if the user closes the app.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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