vortex

package module
v0.0.0-...-6376511 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FPS

func FPS() float64

Types

type App

type App struct {
	//Default: 1280x720
	Width, Height int
	//Default: Hello Vortex
	Title string
	//Default: 60
	TargetFPS int

	Body []Component
	// contains filtered or unexported fields
}

func (*App) Start

func (a *App) Start() error

func (*App) Stop

func (a *App) Stop()

type Component

type Component interface {
	// contains filtered or unexported methods
}

type Div

type Div base[[]Component, *Div]

type MouseEvent

type MouseEvent struct {
	X, Y int
	Type MouseEventType
}

type MouseEventType

type MouseEventType int
const (
	Hover MouseEventType = iota
	Click
)

type P

type P base[string, *P]

type Point

type Point struct {
	X int // X coordinate of the point
	Y int // Y coordinate of the point
}

Point represents a point with X and Y coordinates

type Rectangle

type Rectangle struct {
	X      int // X coordinate of the top-left corner
	Y      int // Y coordinate of the top-left corner
	Width  int // Width of the rectangle
	Height int // Height of the rectangle
}

func (Rectangle) IntersectsPoint

func (r Rectangle) IntersectsPoint(p Point) bool

type StyleField

type StyleField int
const (
	Margin StyleField = iota
	Mt
	Mb
	Ml
	Mr
	Padding
	Pt
	Pb
	Pl
	Pr
	W
	H
	X
	Y
	Bg
	Color
	Font
	Text
	All
)

type Styles

type Styles struct {
	//Margin
	Margin, Mt, Mb, Ml, Mr int
	//Padding
	Padding, Pt, Pb, Pl, Pr int

	//Width, Height
	W, H int
	//X, Y
	X, Y  int
	Bg    color.RGBA
	Color color.RGBA

	Font string
	Text int

	Transitions Transitions
	// contains filtered or unexported fields
}

type StylesModification

type StylesModification = func(start Styles) Styles

type TimingFunction

type TimingFunction int
const (
	Linear TimingFunction = iota
)

type TransitionProperty

type TransitionProperty struct {
	TimingFunction TimingFunction
	Delay          int //in ms
	Duration       int //in ms
}

type Transitions

type Transitions = map[StyleField]TransitionProperty

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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