screenManager

package
v0.0.0-...-126e10b Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: MIT Imports: 11 Imported by: 0

README

Template service

The purpose of this Service Mesh service is to provide a modal user interface, meaning that only one UI (mode) is rendering at any given time.

Dependencies

This service has dependencies on the following services:

Integration with other services

This service integrates with the following services:

Lua integration is optional, meaning that the lua service can be omitted at servicemesh.


This service exports an integration interface IsFoo with an alias Dependencncy which are intended to be used by other services for dependency resolution (see servicemesh.HasDependencies), and expose just the methods which other services should use.

type Dependency = Foo

type IsFoo interface {
    Foo()
}

Lua service integration

Describe how this service integrates with the lua service (this is just an example).

You should show an example of the lua API usage:

data = assets.load("/data/global/ui/Loading/loadingscreen.dc6")

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dependency

type Dependency = ManagesModalGameUI

type ManagesModalGameUI

type ManagesModalGameUI interface {
	Modes() []string
	Mode() string
	SetMode(string)
}

type ModalGameUI

type ModalGameUI interface {
	Mode() string
	Renderable() raylibRenderer.Renderable
	Update()
	OnUpdate(func())
}

ModalGameUI is an intergartion interface that other services can implement to be picked up by this service.

type Service

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

func (*Service) DependenciesResolved

func (s *Service) DependenciesResolved() bool

func (*Service) ExportToLua

func (s *Service) ExportToLua(state *lua.LState)

func (*Service) Init

func (s *Service) Init(mesh servicemesh.Mesh)

func (*Service) Logger

func (s *Service) Logger() *slog.Logger

func (*Service) Mode

func (s *Service) Mode() string

Mode returns the current mode string

func (*Service) Modes

func (s *Service) Modes() (modes []string)

Modes returns a list of strings which are the mode ID's for each modal

func (*Service) Name

func (s *Service) Name() string

func (*Service) OnServiceAdded

func (s *Service) OnServiceAdded(service servicemesh.Service)

func (*Service) Ready

func (s *Service) Ready() bool

func (*Service) ResolveDependencies

func (s *Service) ResolveDependencies(services []servicemesh.Service)

func (*Service) SetLogger

func (s *Service) SetLogger(logger *slog.Logger)

func (*Service) SetMode

func (s *Service) SetMode(mode string)

SetMode sets the current mode to be rendered

func (*Service) UnexportFromLua

func (s *Service) UnexportFromLua(state *lua.LState)

Jump to

Keyboard shortcuts

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