Documentation ¶
Index ¶
- type Map
- type MemStore
- func (s *MemStore) Changed() <-chan bool
- func (s *MemStore) Dec()
- func (s *MemStore) Descs() (descs []string)
- func (s *MemStore) Get() int
- func (s *MemStore) GetName() string
- func (s *MemStore) GetValue(key string) string
- func (s *MemStore) Inc()
- func (s *MemStore) Len() int
- func (s *MemStore) List() (options []string)
- func (s *MemStore) Set(idx int)
- func (s *MemStore) SetValue(key, value string)
- func (s *MemStore) Values() map[string]string
- type Options
- type Select
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemStore ¶
type MemStore struct { Options []string Descriptions []string // contains filtered or unexported fields }
MemStore implements options.Options using slices and a map. MemStore is fully concurrency-safe and returns copies of all value when using any of the getters methods.
func NewMemStore ¶
type Options ¶
Options defines a map-slice interface for managing a single list of selectable options in combination with a key-value map for storing additional config values.
The game package uses this to access game options in a platform-independent way. A target platform can use this to implement platform specific options.
type Select ¶
type Select interface { Set(idx int) // Set sets the selected option according to the given options index. Get() int // Get returns the current index of the selected option. Inc() // Increase selected options index by 1 Dec() // Increase selected options index by 1 Len() int // Len returns the number of options. GetName() string // GetName returns the name/title of the current option. List() []string // List returns all names/titles for all possible options. Descs() []string // Descs returns descriptions for all possible options. }
Click to show internal directories.
Click to hide internal directories.