Versions in this module Expand all Collapse all v0 v0.0.1 Jun 7, 2026 Changes in this version + func TrackValue[T any](tracker *Tracker, signal *Signal[T]) T + type AcceptChild = AcceptChildTemplate[NodeBuilder] + func EmptyChild() *AcceptChild + func WithChild(builder NodeBuilder) *AcceptChild + type AcceptChildTemplate struct + func EmptyChildTemplate[B any]() *AcceptChildTemplate[B] + func WithChildTemplate[B any](builder B) *AcceptChildTemplate[B] + func (ac *AcceptChildTemplate[B]) Child(builder B) + func (ac *AcceptChildTemplate[B]) ClearChanged() + func (ac AcceptChildTemplate[B]) GetBuilders() []B + func (ac AcceptChildTemplate[B]) GetChanged() []uint + type AcceptChildren = AcceptChildrenTemplate[NodeBuilder] + func EmptyChildren() *AcceptChildren + func WithChildren(builders []NodeBuilder) *AcceptChildren + type AcceptChildrenTemplate struct + func EmptyChildrenTemplate[B any]() *AcceptChildrenTemplate[B] + func WithChildrenTemplate[B any](builders []B) *AcceptChildrenTemplate[B] + func (ac *AcceptChildrenTemplate[B]) Child(i uint, builder B) + func (ac *AcceptChildrenTemplate[B]) ClearChanged() + func (ac AcceptChildrenTemplate[B]) GetBuilders() []B + func (ac AcceptChildrenTemplate[B]) GetChanged() []uint + type AcceptNoChild = AcceptNoChildTemplate[NodeBuilder] + func EmptyNoChild() AcceptNoChild + type AcceptNoChildTemplate struct + func EmptyNoChildTemplate[B any]() AcceptNoChildTemplate[B] + func (anc AcceptNoChildTemplate[B]) ClearChanged() + func (anc AcceptNoChildTemplate[B]) GetBuilders() []B + func (anc AcceptNoChildTemplate[B]) GetChanged() []uint + type BuildContext struct + func (bc BuildContext) AssetManager() *paint.AssetManager + func (bc BuildContext) CopyWithNewUpdateQueue() *BuildContext + func (bc BuildContext) UpdateQueue() *UpdateQueue + type ChildProps interface + ClearChanged func() + GetBuilders func() []B + GetChanged func() []uint + type Context struct + func (c Context) Focused() bool + func (c Context) Handled(event EventId) + func (c Context) Height() float64 + func (c Context) IsHandled(event EventId) bool + func (c Context) Now() time.Time + func (c Context) TransitionFrame() scath.Timeframe + func (c Context) Width() float64 + type Event interface + EventID func() EventId + type EventId string + const EventIdMove + const EventIdScroll + const EventIdSizeChange + func EventIdKeyPress(key ebiten.Key) EventId + func EventIdKeyRelease(key ebiten.Key) EventId + func EventIdPress(button ebiten.MouseButton) EventId + func EventIdRelease(button ebiten.MouseButton) EventId + type Game struct + func NewGame() *Game + func (g *Game) Draw(screen *ebiten.Image) + func (g *Game) EmitEvent(contexts []*Context, event Event) + func (g *Game) EmitEventNoContext(event Event) + func (g *Game) GetSceneList() []Scene + func (g *Game) Goto(scene Scene) + func (g *Game) Height() float64 + func (g *Game) Layout(width, height int) (int, int) + func (g *Game) LayoutF(logicWinWidth, logicWinHeight float64) (float64, float64) + func (g *Game) Pop() + func (g *Game) PopUntil(id string) + func (g *Game) Push(scene Scene) + func (g *Game) Update() error + func (g *Game) Width() float64 + type Identifiable interface + ID func() string + type KeyPressEvent struct + Key ebiten.Key + func (kp KeyPressEvent) EventID() EventId + type KeyReleaseEvent struct + Key ebiten.Key + func (kr KeyReleaseEvent) EventID() EventId + type Loadable interface + Load func(parent T) + Unload func() + type MoveEvent struct + DeltaX int + DeltaY int + X int + Y int + func (me MoveEvent) EventID() EventId + func (me MoveEvent) Position() scath.Vec + type Node interface + Children func() []Node + Draw func(c *Context, image *ebiten.Image) + HandleEvent func(c *Context, event Event) TracedError + Parent func() Node + Update func(c *Context) TracedError + type NodeBuilder func(*BuildContext) Node + func Standard[P ChildProps[NodeBuilder]](create StandardCreate[P]) NodeBuilder + type PositionalEvent interface + Position func() scath.Vec + type PressEvent struct + Button ebiten.MouseButton + X int + Y int + func (de PressEvent) EventID() EventId + func (de PressEvent) Position() scath.Vec + type ReleaseEvent struct + Button ebiten.MouseButton + X int + Y int + func (re ReleaseEvent) EventID() EventId + func (re ReleaseEvent) Position() scath.Vec + type RootProps struct + type Scene interface + Draw func(c *Context, screen *ebiten.Image) + GetId func() string + HandleEvent func(c *Context, e Event) error + Update func(c *Context) error + type SceneTree struct + func NewSceneTree(id string, assetManager *paint.AssetManager) *SceneTree + func (st *SceneTree) Draw(c *Context, screen *ebiten.Image) + func (st *SceneTree) GetId() string + func (st *SceneTree) HandleEvent(c *Context, e Event) error + func (st *SceneTree) Load() + func (st *SceneTree) Mount(create func(t *Tracker, props *RootProps)) *SceneTree + func (st *SceneTree) SetTransitionProps(handler func(bool) TransitionProperties) *SceneTree + func (st *SceneTree) Transition(in bool) TransitionProperties + func (st *SceneTree) Unload() + func (st *SceneTree) Update(c *Context) error + type ScrollEvent struct + ScrollX float64 + ScrollY float64 + X int + Y int + func (se ScrollEvent) EventID() EventId + func (se ScrollEvent) Position() scath.Vec + type Signal struct + func NewSignal[T any](def T) *Signal[T] + func (s *Signal[T]) AddListener(listener func(T)) func() + func (s *Signal[T]) Refresh() + func (s *Signal[T]) Set(value T) + func (s *Signal[T]) Track(tracking Tracking) T + func (s *Signal[T]) Value() T + type SizeChangeEvent struct + func (sce SizeChangeEvent) EventID() EventId + type StandardCreate struct + Create func(methods *StandardMethods[P]) + DefaultProps P + ID string + PropsCreator func(t *Tracker, props *P) + type StandardMethods struct + OnDraw func(node *StandardNode[P], c *Context, image *ebiten.Image) + OnHandleEvent func(node *StandardNode[P], c *Context, event Event) error + OnLoad func(node *StandardNode[P], parent Node) + OnPropsChanged func(node *StandardNode[P]) + OnUnload func(node *StandardNode[P]) + OnUpdate func(node *StandardNode[P], c *Context) error + type StandardNode struct + func (s *StandardNode[P]) Children() []Node + func (s *StandardNode[P]) Context() *BuildContext + func (s *StandardNode[P]) Draw(c *Context, image *ebiten.Image) + func (s *StandardNode[P]) DrawChild(c *Context, image *ebiten.Image) + func (s *StandardNode[P]) HandleEvent(c *Context, event Event) TracedError + func (s *StandardNode[P]) HandleEventChild(c *Context, event Event) TracedError + func (s *StandardNode[P]) ID() string + func (s *StandardNode[P]) Load(parent Node) + func (s *StandardNode[P]) Parent() Node + func (s *StandardNode[P]) Props() P + func (s *StandardNode[P]) PropsChanged(new P) + func (s *StandardNode[P]) Tracker() *Tracker + func (s *StandardNode[P]) Unload() + func (s *StandardNode[P]) Update(c *Context) TracedError + type State struct + func DefaultState[O any, S any](state S) *State[O, S] + func NewState[O any, S any](state S, checker func(O) bool) *State[O, S] + func (s *State[O, S]) Load() + func (s *State[O, S]) Transition(in bool) TransitionProperties + func (s *State[O, S]) Unload() + type StateMachine struct + func NewStateMachine[O any, S comparable](create StateMachineCreate[O, S]) *StateMachine[O, S] + func (sm *StateMachine[O, S]) Draw(now time.Time, drawFunc func(state S, frame scath.Timeframe)) + func (sm *StateMachine[O, S]) Update(now time.Time, obj O) + type StateMachineCreate struct + Default *State[O, S] + States []*State[O, S] + Transition optional.O[TransitionProperties] + type TracedError interface + func NewTracedError(identifiable Identifiable, err error) TracedError + type Tracker struct + func NewTracker(context *BuildContext, onChange func()) *Tracker + func (t *Tracker) Clear() + func (t *Tracker) Effect(handler func()) + func (t *Tracker) OnChange(t2 *Tracker, handler func()) + func (t *Tracker) Tracker() *Tracker + type Tracking interface + Tracker func() *Tracker + type TransitionCapable interface + Load func() + Transition func(in bool) TransitionProperties + Unload func() + type TransitionProperties struct + Duration time.Duration + Isolated bool + func NoTransition() TransitionProperties + func (tp TransitionProperties) ToTimeframe(now time.Time, outTransition optional.O[TransitionProperties]) scath.Timeframe + type TransitioningState struct + func NewTransitioningState[T TransitionCapable](now time.Time, state T) *TransitioningState[T] + func (ts *TransitioningState[T]) GetCurrent() optional.O[T] + func (ts *TransitioningState[T]) Set(now time.Time, state optional.O[T]) + func (ts *TransitioningState[T]) SetEmpty(now time.Time) + func (ts *TransitioningState[T]) Update(now time.Time, update func(T, scath.Timeframe) error) error + type UpdateQueue struct + func NewUpdateQueue() *UpdateQueue + func (u *UpdateQueue) Clear() + func (u *UpdateQueue) Push(tracker *Tracker, effect int, callback func()) + func (u *UpdateQueue) Update()