engine

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BLACK  = NewColor2(0, 0, 0)
	WHITE  = NewColor2(255, 255, 255)
	RED    = NewColor2(255, 0, 0)
	GREEN  = NewColor2(0, 255, 0)
	BLUE   = NewColor2(0, 0, 255)
	YELLOW = NewColor2(255, 255, 0)
	PURPLE = NewColor2(87, 35, 100)
	ORANGE = NewColor2(255, 128, 0)
	BROWN  = NewColor2(138, 64, 0)
)
View Source
var (
	DOWN  = NewPosition(0, -1) // physics -> yes,draw ->UP
	UP    = NewPosition(0, 1)  // physics -> yes,draw ->DOWN
	LEFT  = NewPosition(-1, 0) // physics -> yes,draw ->yes
	RIGHT = NewPosition(1, 0)  // physics -> yes,draw ->yes
)
View Source
var (
	ErrGameNotRunning = errors.New("the game not running")
)
View Source
var (
	ErrShapeInvalid = errors.New("the shape is invalid")
)

Functions

func Clamp added in v0.1.9

func Clamp(value, max, min int) int

func Clampf32 added in v0.1.9

func Clampf32(value, max, min float32) float32

func Clampf64 added in v0.1.9

func Clampf64(value, max, min float64) float64

func ConvertColor

func ConvertColor(color Color) rl.Color

func ConvertPosition added in v0.1.9

func ConvertPosition(pos Position) rl.Vector2

func DrawRayCast added in v0.2.1

func DrawRayCast(initPos Position, dirreccion Position, long uint32, color Color)

func FPS added in v0.2.3

func FPS() float64

func FrameTime added in v0.2.3

func FrameTime() float32

func GreatestCommonDivisor added in v0.2.3

func GreatestCommonDivisor(a, b int) int

func InitGame

func InitGame(title string, size Size, start func(*GameEvent), update func(*GameEvent))

func IsRunning

func IsRunning() bool

func IsValidShape

func IsValidShape(shape Shape) bool

func PlaySound added in v0.2.1

func PlaySound(path string)

func RandomRange added in v0.2.4

func RandomRange(min, max int) int

-> RandomRange(0,1) -> 0 or 1 -> RandomRange(0,10) -> 0..10 -> 0,1,2,3,4,5,6,7,8,9,10

func SetBackgroundColor

func SetBackgroundColor(color_ Color)

func SetScene added in v0.2.0

func SetScene(s *Scene)

func ShowMessageBoxAlert added in v0.1.9

func ShowMessageBoxAlert(title, message string)

func ShowMessageBoxError added in v0.1.9

func ShowMessageBoxError(title, message string)

func ShowMessageBoxInfo added in v0.1.9

func ShowMessageBoxInfo(title, message string)

func Sleep added in v0.2.3

func Sleep(mil time.Duration)

func Time added in v0.2.3

func Time() float64

Types

type AnimationImage added in v0.1.7

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

func NewAnimationImage added in v0.1.7

func NewAnimationImage(images []*FuriaImage, fps int) *AnimationImage

func (*AnimationImage) Draw added in v0.1.7

func (ai *AnimationImage) Draw(color Color, pos Position, size Size)

func (*AnimationImage) Run added in v0.1.7

func (ai *AnimationImage) Run()

func (*AnimationImage) Stop added in v0.1.7

func (ai *AnimationImage) Stop()

type Camera added in v0.1.9

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

func NewCamera added in v0.1.9

func NewCamera(offset Position, target Position) *Camera

func (*Camera) Offset added in v0.1.9

func (c *Camera) Offset() Position

func (*Camera) RlCamera added in v0.1.9

func (c *Camera) RlCamera() rl.Camera2D

func (*Camera) Rotation added in v0.1.9

func (c *Camera) Rotation() float32

func (*Camera) SetOffset added in v0.1.9

func (c *Camera) SetOffset(o Position)

func (*Camera) SetRotation added in v0.1.9

func (c *Camera) SetRotation(r float32)

func (*Camera) SetTarget added in v0.1.9

func (c *Camera) SetTarget(target Position)

func (*Camera) SetZoom added in v0.1.9

func (c *Camera) SetZoom(nZoom float32)

func (*Camera) Target added in v0.1.9

func (c *Camera) Target() Position

func (*Camera) Zoom added in v0.1.9

func (c *Camera) Zoom() float32

type CollisionArea added in v0.2.5

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

func NewCollisionArea added in v0.2.5

func NewCollisionArea(scene *Scene, pos Position, siz Size) *CollisionArea

func (*CollisionArea) Position added in v0.2.5

func (p *CollisionArea) Position() Position

func (*CollisionArea) QuitDebugColor added in v0.2.5

func (p *CollisionArea) QuitDebugColor()

func (*CollisionArea) Scene added in v0.2.5

func (p *CollisionArea) Scene() *Scene

func (*CollisionArea) SetDebugColor added in v0.2.5

func (p *CollisionArea) SetDebugColor(color Color)

func (*CollisionArea) SetOnCollision added in v0.2.5

func (p *CollisionArea) SetOnCollision(c func(*CollisionArea, *GameObject, *GameObjectEvent))

func (*CollisionArea) Size added in v0.2.5

func (p *CollisionArea) Size() Size

type CollisionRectangle

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

func NewCollisionRectagle

func NewCollisionRectagle(g *GameObject) CollisionRectangle

return a.X + a2.X > b.X &&

a.X < b.X + b2.X &&
a.Y + a2.Y > b.Y &&
a.Y < b.Y + b2.Y

func (*CollisionRectangle) OnCollision

func (cr *CollisionRectangle) OnCollision() *GameObject

func (*CollisionRectangle) OnCollisionInPosition added in v0.1.9

func (cr *CollisionRectangle) OnCollisionInPosition(other CollisionRectangle, pos Position) bool

func (*CollisionRectangle) OnCollisionInTheGroup added in v0.1.6

func (cr *CollisionRectangle) OnCollisionInTheGroup(group string) *GameObject

func (*CollisionRectangle) OnCollisionPos added in v0.1.9

func (cr *CollisionRectangle) OnCollisionPos(pos Position) *GameObject

func (*CollisionRectangle) OnCollisionTo

func (cr *CollisionRectangle) OnCollisionTo(other CollisionRectangle) bool

type Color

type Color struct {
	R uint8
	G uint8
	B uint8
	A uint8
}

func NewColor

func NewColor(r, g, b, a uint8) Color

func NewColor2

func NewColor2(r, g, b uint8) Color

type FuriaImage added in v0.1.7

type FuriaImage struct {
	Ignore bool
	// contains filtered or unexported fields
}

func NewImage

func NewImage(path string) *FuriaImage

func (*FuriaImage) Destroy added in v0.1.7

func (fi *FuriaImage) Destroy()

func (*FuriaImage) DrawImage added in v0.1.7

func (fi *FuriaImage) DrawImage(pos Position, color Color, size Size)

type GameEvent added in v0.1.6

type GameEvent struct {
	KeySpace        int32
	KeyEscape       int32
	KeyEnter        int32
	KeyTab          int32
	KeyBackspace    int32
	KeyInsert       int32
	KeyDelete       int32
	KeyRight        int32
	KeyLeft         int32
	KeyDown         int32
	KeyUp           int32
	KeyPageUp       int32
	KeyPageDown     int32
	KeyHome         int32
	KeyEnd          int32
	KeyCapsLock     int32
	KeyScrollLock   int32
	KeyNumLock      int32
	KeyPrintScreen  int32
	KeyPause        int32
	KeyF1           int32
	KeyF2           int32
	KeyF3           int32
	KeyF4           int32
	KeyF5           int32
	KeyF6           int32
	KeyF7           int32
	KeyF8           int32
	KeyF9           int32
	KeyF10          int32
	KeyF11          int32
	KeyF12          int32
	KeyLeftShift    int32
	KeyLeftControl  int32
	KeyLeftAlt      int32
	KeyLeftSuper    int32
	KeyRightShift   int32
	KeyRightControl int32
	KeyRightAlt     int32
	KeyRightSuper   int32
	KeyKbMenu       int32
	KeyLeftBracket  int32
	KeyBackSlash    int32
	KeyRightBracket int32
	KeyGrave        int32

	// Keyboard Number Pad Keys
	KeyKp0        int32
	KeyKp1        int32
	KeyKp2        int32
	KeyKp3        int32
	KeyKp4        int32
	KeyKp5        int32
	KeyKp6        int32
	KeyKp7        int32
	KeyKp8        int32
	KeyKp9        int32
	KeyKpDecimal  int32
	KeyKpDivide   int32
	KeyKpMultiply int32
	KeyKpSubtract int32
	KeyKpAdd      int32
	KeyKpEnter    int32
	KeyKpEqual    int32

	// Keyboard Alpha Numeric Keys
	KeyApostrophe int32
	KeyComma      int32
	KeyMinus      int32
	KeyPeriod     int32
	KeySlash      int32
	KeyZero       int32
	KeyOne        int32
	KeyTwo        int32
	KeyThree      int32
	KeyFour       int32
	KeyFive       int32
	KeySix        int32
	KeySeven      int32
	KeyEight      int32
	KeyNine       int32
	KeySemicolon  int32
	KeyEqual      int32
	KeyA          int32
	KeyB          int32
	KeyC          int32
	KeyD          int32
	KeyE          int32
	KeyF          int32
	KeyG          int32
	KeyH          int32
	KeyI          int32
	KeyJ          int32
	KeyK          int32
	KeyL          int32
	KeyM          int32
	KeyN          int32
	KeyO          int32
	KeyP          int32
	KeyQ          int32
	KeyR          int32
	KeyS          int32
	KeyT          int32
	KeyU          int32
	KeyV          int32
	KeyW          int32
	KeyX          int32
	KeyY          int32
	KeyZ          int32
	// Android keys
	KeyBack           int32
	KeyMenu           int32
	KeyVolumeUp       int32
	KeyVolumeDown     int32
	MouseLeftButton   int32
	MouseRightButton  int32
	MouseMiddleButton int32
	// Mouse Buttons
	MouseButtonLeft    int32
	MouseButtonRight   int32
	MouseButtonMiddle  int32
	MouseButtonSide    int32
	MouseButtonExtra   int32
	MouseButtonForward int32
	MouseButtonBack    int32
}

@copiar@ 10 20 sugerencia macro para Quick-lenguaje @ir@

func NewGameEvent added in v0.1.6

func NewGameEvent() *GameEvent

func (*GameEvent) IsKeyDown added in v0.1.6

func (k *GameEvent) IsKeyDown(key int32) bool

func (*GameEvent) IsKeyPressed added in v0.1.6

func (k *GameEvent) IsKeyPressed(key int32) bool

func (*GameEvent) IsKeyReleased added in v0.1.6

func (k *GameEvent) IsKeyReleased(key int32) bool

func (*GameEvent) IsKeyUp added in v0.1.6

func (k *GameEvent) IsKeyUp(key int32) bool

func (*GameEvent) IsMouseDown added in v0.1.6

func (k *GameEvent) IsMouseDown(mouse int32) bool

func (*GameEvent) IsMousePressed added in v0.1.6

func (k *GameEvent) IsMousePressed(mouse int32) bool

func (*GameEvent) IsMouseReleased added in v0.1.6

func (k *GameEvent) IsMouseReleased(mouse int32) bool

func (*GameEvent) IsMouseUp added in v0.1.6

func (k *GameEvent) IsMouseUp(mouse int32) bool

type GameObject

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

func CreateGameObject

func CreateGameObject(name string, shape Shape, size Size, position Position) (*GameObject, error)

func GetGameObjectsInTheGroup

func GetGameObjectsInTheGroup(gr string) []*GameObject
func (g *GameObject) PrintGameObject() {
	fmt.Printf(
		`
	-Game object Name: '%s' SHAPE: '%s'

-Position: X = %f | Y = %f -Color: R = %s | G = %s | B = %s | A(alpha) = %s `, g.Name(), g.Shape(), g.Pos().X, g.Pos().Y, g.Color().R, g.Color().G, g.Color().B, g.Color().A) }

func RayCast added in v0.1.9

func RayCast(idToIgnore int, initPos Position, dirreccion Position, long uint32, jump uint16) *GameObject

func (*GameObject) AddToGroup added in v0.1.5

func (g *GameObject) AddToGroup(groupName string)

func (*GameObject) AnimationImage added in v0.1.8

func (g *GameObject) AnimationImage() *AnimationImage

func (*GameObject) CollisionRect

func (g *GameObject) CollisionRect() CollisionRectangle

func (*GameObject) Color added in v0.1.8

func (g *GameObject) Color() Color

func (*GameObject) DeleteGroup

func (g *GameObject) DeleteGroup(gr string)

func (*GameObject) Draw

func (g *GameObject) Draw()

func (*GameObject) Execute

func (g *GameObject) Execute(nameFunction string, params any)

func (*GameObject) Functions added in v0.1.8

func (g *GameObject) Functions() map[string]func(*GameObject, any)

func (*GameObject) GetVar

func (g *GameObject) GetVar(name string) any

func (*GameObject) Groups added in v0.1.8

func (g *GameObject) Groups() []string

func (*GameObject) Hide

func (g *GameObject) Hide()

func (*GameObject) Id added in v0.1.8

func (g *GameObject) Id() int

func (*GameObject) Image added in v0.1.8

func (g *GameObject) Image() *FuriaImage

func (*GameObject) Instance added in v0.1.8

func (g *GameObject) Instance(scene *Scene, params any) *GameObject

func (*GameObject) IsInGroup

func (g *GameObject) IsInGroup(gr string) bool

func (*GameObject) MoveTo added in v0.1.9

func (g *GameObject) MoveTo(npos Position) *GameObject

physics type: Colliders and collisions[ON]

func (*GameObject) Name

func (g *GameObject) Name() string

func (*GameObject) Pos added in v0.2.1

func (g *GameObject) Pos() Position

func (*GameObject) Position

func (g *GameObject) Position() Position

func (*GameObject) SetAnimationImage added in v0.1.7

func (g *GameObject) SetAnimationImage(ani *AnimationImage)

func (*GameObject) SetColor

func (g *GameObject) SetColor(color Color)

func (*GameObject) SetColor2

func (g3 *GameObject) SetColor2(r, g, b, a uint8)

func (*GameObject) SetColor3

func (g3 *GameObject) SetColor3(r, g, b uint8)

func (*GameObject) SetFunction added in v0.1.5

func (g *GameObject) SetFunction(nameFunction string, function func(*GameObject, any))

func (*GameObject) SetImage

func (g *GameObject) SetImage(img *FuriaImage)

func (*GameObject) SetPos added in v0.2.1

func (g *GameObject) SetPos(pos Position)

physics type: Colliders and collisions[OFF]

func (*GameObject) SetPos2 added in v0.2.1

func (g *GameObject) SetPos2(x, y float64)

physics type: Colliders and collisions[OFF]

func (*GameObject) SetPosition

func (g *GameObject) SetPosition(pos Position)

physics type: Colliders and collisions[OFF]

func (*GameObject) SetPosition2

func (g *GameObject) SetPosition2(x, y float64)

physics type: Colliders and collisions[OFF]

func (*GameObject) SetSize

func (g *GameObject) SetSize(siz Size)

func (*GameObject) SetSize2

func (g *GameObject) SetSize2(w, h uint)

func (*GameObject) SetStart added in v0.1.5

func (g *GameObject) SetStart(f func(*GameObject, any))

func (*GameObject) SetUpdate added in v0.1.5

func (g *GameObject) SetUpdate(f func(*GameObject, *GameObjectEvent))

func (*GameObject) SetVar

func (g *GameObject) SetVar(name string, value any)

func (*GameObject) Shape

func (g *GameObject) Shape() Shape

func (*GameObject) Show

func (g *GameObject) Show()

func (*GameObject) Size

func (g *GameObject) Size() Size

func (*GameObject) Vars added in v0.1.8

func (g *GameObject) Vars() map[string]any

type GameObjectEvent added in v0.1.6

type GameObjectEvent struct {
	MouseLeftButton   int32
	MouseRightButton  int32
	MouseMiddleButton int32

	MouseButtonLeft    int32
	MouseButtonRight   int32
	MouseButtonMiddle  int32
	MouseButtonSide    int32
	MouseButtonExtra   int32
	MouseButtonForward int32
	MouseButtonBack    int32
	// contains filtered or unexported fields
}

type Key struct

func NewGameObjectEvent added in v0.1.6

func NewGameObjectEvent(obj *GameObject) *GameObjectEvent

func (*GameObjectEvent) IsMouseDown added in v0.1.6

func (k *GameObjectEvent) IsMouseDown(mouse int32) bool

func (*GameObjectEvent) IsMousePressed added in v0.1.6

func (k *GameObjectEvent) IsMousePressed(mouse int32) bool

func (*GameObjectEvent) IsMouseReleased added in v0.1.6

func (k *GameObjectEvent) IsMouseReleased(mouse int32) bool

func (*GameObjectEvent) IsMouseUp added in v0.1.6

func (k *GameObjectEvent) IsMouseUp(mouse int32) bool

func (*GameObjectEvent) OnCollision added in v0.1.6

func (k *GameObjectEvent) OnCollision() *GameObject

func (*GameObjectEvent) OnCollisionInPosition added in v0.1.9

func (k *GameObjectEvent) OnCollisionInPosition(other *GameObject, pos Position) bool

func (*GameObjectEvent) OnCollisionInTheGroup added in v0.1.6

func (k *GameObjectEvent) OnCollisionInTheGroup(group string) *GameObject

func (*GameObjectEvent) OnCollisionPos added in v0.1.9

func (k *GameObjectEvent) OnCollisionPos(pos Position) *GameObject

func (*GameObjectEvent) OnCollisionTo added in v0.1.6

func (k *GameObjectEvent) OnCollisionTo(other *GameObject) bool

func (*GameObjectEvent) RayCast added in v0.1.9

func (k *GameObjectEvent) RayCast(initPos Position, dirreccion Position, long uint32, jump uint16) *GameObject

func (*GameObjectEvent) RayCastDefault added in v0.1.9

func (k *GameObjectEvent) RayCastDefault(initPos Position, dirreccion Position, long uint32) *GameObject

type LinealPath added in v0.2.3

type LinealPath struct {
	PointA Position
	PointB Position
}

func NewLinealPath added in v0.2.3

func NewLinealPath(a, b Position) *LinealPath

func (*LinealPath) IsDone added in v0.2.3

func (lp *LinealPath) IsDone(obj *GameObject) bool

func (*LinealPath) TeleportToPath added in v0.2.3

func (lp *LinealPath) TeleportToPath(obj *GameObject)

func (*LinealPath) Travel added in v0.2.3

func (lp *LinealPath) Travel(speed float64, obj *GameObject)

type Music added in v0.1.9

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

func NewMusic added in v0.1.9

func NewMusic(path string) *Music

func (*Music) MusicPath added in v0.1.9

func (m *Music) MusicPath() string

func (*Music) Play added in v0.1.9

func (m *Music) Play()

func (*Music) RlMusic added in v0.1.9

func (m *Music) RlMusic() rl.Music

func (*Music) Stop added in v0.1.9

func (m *Music) Stop()

type Position

type Position struct {
	X float64
	Y float64
}

func ClampPos added in v0.1.9

func ClampPos(value, max, min Position) Position

func GetMousePosition added in v0.1.9

func GetMousePosition() Position

func NewPos added in v0.1.9

func NewPos(x, y float64) Position

func NewPosition

func NewPosition(x, y float64) Position

func (Position) DistanceSqrTo added in v0.2.1

func (p Position) DistanceSqrTo(pos Position) float32

func (Position) DistanceTo added in v0.2.1

func (p Position) DistanceTo(pos Position) float32

func (Position) Normalize added in v0.2.1

func (p Position) Normalize() Position

type Scene added in v0.2.0

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

func GetCurrentScene added in v0.2.0

func GetCurrentScene() *Scene

func GetDefaultScene added in v0.2.1

func GetDefaultScene() *Scene

func NewScene added in v0.2.0

func NewScene() *Scene

func (*Scene) Buttons added in v0.2.1

func (s *Scene) Buttons() []*UiButton

func (*Scene) Camera added in v0.2.0

func (s *Scene) Camera() *Camera

func (*Scene) CollisionsAreas added in v0.2.5

func (s *Scene) CollisionsAreas() []*CollisionArea

func (*Scene) ColorZones added in v0.2.1

func (s *Scene) ColorZones() []*UiColorZone

func (*Scene) Draw added in v0.2.0

func (s *Scene) Draw()

func (*Scene) FirstGameObjectWithName added in v0.2.4

func (s *Scene) FirstGameObjectWithName(name string) *GameObject

func (*Scene) FistGameObject added in v0.2.4

func (s *Scene) FistGameObject() *GameObject

func (*Scene) FistGameObjectsInTheGroup added in v0.2.4

func (s *Scene) FistGameObjectsInTheGroup(gr string) *GameObject

func (*Scene) GameObjectWithName added in v0.2.4

func (s *Scene) GameObjectWithName(name string) []*GameObject

func (*Scene) GameObjectsInTheGroup added in v0.2.4

func (s *Scene) GameObjectsInTheGroup(gr string) []*GameObject

func (*Scene) GameObjectsObjects added in v0.2.0

func (s *Scene) GameObjectsObjects() []*GameObject

func (*Scene) IsCurrent added in v0.2.1

func (s *Scene) IsCurrent() bool

func (*Scene) LastGameObject added in v0.2.4

func (s *Scene) LastGameObject() *GameObject

func (*Scene) LastGameObjectWithName added in v0.2.4

func (s *Scene) LastGameObjectWithName(name string) *GameObject

func (*Scene) LastGameObjectsInTheGroup added in v0.2.4

func (s *Scene) LastGameObjectsInTheGroup(gr string) *GameObject

func (*Scene) SetCamera added in v0.2.0

func (s *Scene) SetCamera(c *Camera)

func (*Scene) Texts added in v0.2.1

func (s *Scene) Texts() []*UiText

type Shape

type Shape string
const (
	SHAPE_RECTANGLE       Shape = "rectangle"
	SHAPE_IMAGE           Shape = "image"
	SHAPE_ANIMATION_IMAGE Shape = "animationImage"
)

type Size

type Size struct {
	W uint
	H uint
}

func NewSize

func NewSize(w, h uint) Size

type Sound added in v0.2.1

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

func NewSound added in v0.2.1

func NewSound(path string) *Sound

func (*Sound) Play added in v0.2.1

func (s *Sound) Play()

func (*Sound) RlSound added in v0.2.1

func (s *Sound) RlSound() rl.Sound

func (*Sound) Stop added in v0.2.1

func (s *Sound) Stop()

type Timer added in v0.2.1

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

func NewTimer added in v0.2.1

func NewTimer(life float64) *Timer

func (*Timer) Elapsed added in v0.2.1

func (t *Timer) Elapsed() float64

func (*Timer) IsDone added in v0.2.1

func (t *Timer) IsDone() bool

func (*Timer) Reinitiate added in v0.2.1

func (t *Timer) Reinitiate()

func (*Timer) Start added in v0.2.1

func (t *Timer) Start()

type UiButton added in v0.1.9

type UiButton struct {
	Zone *UiColorZone
	Text *UiText
	// contains filtered or unexported fields
}

func NewUiButton added in v0.1.9

func NewUiButton(scene *Scene, txt string, color Color, pos Position, siz Size) *UiButton

func (*UiButton) Color added in v0.1.9

func (b *UiButton) Color() Color

func (*UiButton) Draw added in v0.1.9

func (b *UiButton) Draw()

func (*UiButton) Hide added in v0.1.9

func (b *UiButton) Hide()

func (*UiButton) IsPressed added in v0.1.9

func (b *UiButton) IsPressed() bool

func (*UiButton) Position added in v0.1.9

func (b *UiButton) Position() Position

func (*UiButton) SetColor added in v0.1.9

func (b *UiButton) SetColor(color Color)

func (*UiButton) SetPosition added in v0.1.9

func (b *UiButton) SetPosition(nPos Position)

func (*UiButton) SetSize added in v0.1.9

func (b *UiButton) SetSize(nsize Size)

func (*UiButton) Show added in v0.1.9

func (b *UiButton) Show()

func (*UiButton) Size added in v0.1.9

func (b *UiButton) Size() Size

type UiColorZone added in v0.1.9

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

func NewUiColorZone added in v0.1.9

func NewUiColorZone(scene *Scene, color Color, pos Position, size Size) *UiColorZone

func (*UiColorZone) Color added in v0.1.9

func (c *UiColorZone) Color() Color

func (*UiColorZone) Draw added in v0.1.9

func (c *UiColorZone) Draw()

func (*UiColorZone) Hide added in v0.1.9

func (c *UiColorZone) Hide()

func (*UiColorZone) Position added in v0.1.9

func (c *UiColorZone) Position() Position

func (*UiColorZone) Roundness added in v0.1.9

func (c *UiColorZone) Roundness() float32

func (*UiColorZone) Segments added in v0.1.9

func (c *UiColorZone) Segments() int

func (*UiColorZone) SetColor added in v0.1.9

func (c *UiColorZone) SetColor(nColor Color)

func (*UiColorZone) SetColor2 added in v0.1.9

func (c *UiColorZone) SetColor2(r, g, b, a uint8)

func (*UiColorZone) SetColor3 added in v0.1.9

func (c *UiColorZone) SetColor3(r, g, b uint8)

func (*UiColorZone) SetPosition added in v0.1.9

func (c *UiColorZone) SetPosition(nPos Position)

func (*UiColorZone) SetRoundness added in v0.1.9

func (c *UiColorZone) SetRoundness(r float32)

func (*UiColorZone) SetSegments added in v0.1.9

func (c *UiColorZone) SetSegments(s int)

func (*UiColorZone) SetSize added in v0.1.9

func (c *UiColorZone) SetSize(nSize Size)

func (*UiColorZone) Show added in v0.1.9

func (c *UiColorZone) Show()

func (*UiColorZone) Size added in v0.1.9

func (c *UiColorZone) Size() Size

type UiMessageBoxAlert added in v0.1.9

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

func NewMessageBoxAlert added in v0.1.9

func NewMessageBoxAlert(title, message string) *UiMessageBoxAlert

func (*UiMessageBoxAlert) Show added in v0.1.9

func (mb *UiMessageBoxAlert) Show()

type UiMessageBoxError added in v0.1.9

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

func NewMessageBoxError added in v0.1.9

func NewMessageBoxError(title, message string) *UiMessageBoxError

func (*UiMessageBoxError) Show added in v0.1.9

func (mb *UiMessageBoxError) Show()

type UiMessageBoxInfo added in v0.1.9

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

func NewMessageBoxInfo added in v0.1.9

func NewMessageBoxInfo(title, message string) *UiMessageBoxInfo

func (*UiMessageBoxInfo) Show added in v0.1.9

func (mb *UiMessageBoxInfo) Show()

type UiText added in v0.1.9

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

func NewUiText added in v0.1.9

func NewUiText(scene *Scene, text string, pos Position, size uint16) *UiText

func NewUiTextWithFont added in v0.1.9

func NewUiTextWithFont(scene *Scene, text string, font string, pos Position, size uint16) *UiText

func (*UiText) Color added in v0.1.9

func (text *UiText) Color() Color

func (*UiText) Draw added in v0.1.9

func (text *UiText) Draw()

func (*UiText) FontName added in v0.1.9

func (text *UiText) FontName() string

func (*UiText) Hide added in v0.1.9

func (text *UiText) Hide()

func (*UiText) Position added in v0.1.9

func (text *UiText) Position() Position

func (*UiText) SetColor added in v0.1.9

func (text *UiText) SetColor(nColor Color)

func (*UiText) SetColor2 added in v0.1.9

func (text *UiText) SetColor2(r, g, b, a uint8)

func (*UiText) SetColor3 added in v0.1.9

func (text *UiText) SetColor3(r, g, b uint8)

func (*UiText) SetFontName added in v0.1.9

func (text *UiText) SetFontName(font string)

func (*UiText) SetPosition added in v0.1.9

func (text *UiText) SetPosition(nPos Position)

func (*UiText) SetSize added in v0.1.9

func (text *UiText) SetSize(nSize uint16)

func (*UiText) SetText added in v0.1.9

func (text *UiText) SetText(nText string)

func (*UiText) SetTextAsFormat added in v0.1.9

func (text *UiText) SetTextAsFormat(format string, pa ...any)

func (*UiText) SetTextAsString added in v0.1.9

func (text *UiText) SetTextAsString(pa any)

func (*UiText) Show added in v0.1.9

func (text *UiText) Show()

func (*UiText) Size added in v0.1.9

func (text *UiText) Size() uint16

func (*UiText) Text added in v0.1.9

func (text *UiText) Text() string

Jump to

Keyboard shortcuts

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