ui

package
v0.0.0-...-c744f44 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InBounds

func InBounds(area sdl.Rect, point sdl.Point) bool

func Interpolate

func Interpolate(a, b sdl.Point) []sdl.Point

Interpolate returns all the points hit by the line connecting points a and b. The interpolated points are returned in random order. The returned points excludes a (beginning) and includes b (ending).

func RectToFRect

func RectToFRect(rect sdl.Rect) sdl.FRect

Types

type Component

type Component interface {
	InBoundary(sdl.Point) bool
	Render()
	Destroy()
	OnEnter()
	OnLeave()
	OnMotion(*sdl.MouseMotionEvent) bool
	OnScroll(*sdl.MouseWheelEvent) bool
	OnClick(*sdl.MouseButtonEvent) bool
	OnResize(x, y int32)
	fmt.Stringer
}

Component describes which functions a UI component must implement

Jump to

Keyboard shortcuts

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