Documentation ¶
Index ¶
- Variables
- func GetTypesString() []string
- type Copyable
- type CoupledArgs
- func (c *CoupledArgs) Add() interface{}
- func (c *CoupledArgs) Copy(key interface{})
- func (c *CoupledArgs) Delete(key interface{}, waitChan chan struct{}, window fyne.Window)
- func (c *CoupledArgs) Get(key interface{}) (interface{}, bool)
- func (c *CoupledArgs) Keys() []string
- func (c *CoupledArgs) Object() interface{}
- func (c *CoupledArgs) ParseValue(key interface{}, val string) (interface{}, error)
- func (c *CoupledArgs) Set(key interface{}, value interface{})
- func (c *CoupledArgs) SetKey(key interface{}, newKey interface{}) bool
- func (c *CoupledArgs) SetType(key interface{}, t ValueType)
- type CoupledMap
- func (cm *CoupledMap) Add() interface{}
- func (cm *CoupledMap) Copy(key interface{})
- func (cm *CoupledMap) Delete(key interface{}, waitChan chan struct{}, window fyne.Window)
- func (cm *CoupledMap) Get(key interface{}) (interface{}, bool)
- func (cm *CoupledMap) Keys() []string
- func (cm *CoupledMap) Object() interface{}
- func (cm *CoupledMap) ParseValue(key interface{}, val string) (interface{}, error)
- func (cm *CoupledMap) Set(key interface{}, v interface{})
- func (cm *CoupledMap) SetKey(key interface{}, newKey interface{}) bool
- func (cm *CoupledMap) SetType(key interface{}, t ValueType)
- type CoupledObject
- type CoupledSlice
- func (cs *CoupledSlice) Add() interface{}
- func (cs *CoupledSlice) Copy(key interface{})
- func (cs *CoupledSlice) Delete(key interface{}, waitChan chan struct{}, window fyne.Window)
- func (cs *CoupledSlice) Get(key interface{}) (interface{}, bool)
- func (cs *CoupledSlice) Keys() []string
- func (cs *CoupledSlice) Object() interface{}
- func (cs *CoupledSlice) ParseValue(key interface{}, val string) (interface{}, error)
- func (cs *CoupledSlice) Set(i interface{}, v interface{})
- func (cs *CoupledSlice) SetKey(key interface{}, newKey interface{}) bool
- func (cs *CoupledSlice) SetType(i interface{}, t ValueType)
- type CustomMap
- type CustomSlice
- type NFBindingMap
- func (nfb *NFBindingMap) CreateBinding(key string, value interface{}) error
- func (nfb *NFBindingMap) GetBinding(key string, bindingRef interface{}) error
- func (nfb *NFBindingMap) GetBoolBinding(key string) (binding.Bool, error)
- func (nfb *NFBindingMap) GetFloatBinding(key string) (binding.Float, error)
- func (nfb *NFBindingMap) GetIntBinding(key string) (binding.Int, error)
- func (nfb *NFBindingMap) GetStringBinding(key string) (binding.String, error)
- func (nfb *NFBindingMap) GetUntypedBinding(key string) (binding.Untyped, error)
- type NFInterfaceMap
- func (a *NFInterfaceMap) Add(key string, value interface{}) error
- func (a *NFInterfaceMap) AddMulti(args ...NFKeyVal) error
- func (a *NFInterfaceMap) Copy() Copyable
- func (a *NFInterfaceMap) Delete(key string) error
- func (a *NFInterfaceMap) DeleteMulti(keys ...string) error
- func (a *NFInterfaceMap) Export() map[string][]string
- func (a *NFInterfaceMap) Get(key string, ref interface{}) error
- func (a *NFInterfaceMap) HasAllKeys(b *NFInterfaceMap) (bool, []string)
- func (a *NFInterfaceMap) Merge(values *NFInterfaceMap) *NFInterfaceMap
- func (a *NFInterfaceMap) Set(key string, value interface{})
- func (a *NFInterfaceMap) SetMulti(args ...NFKeyVal)
- func (a *NFInterfaceMap) ToMap() CustomMap
- func (a *NFInterfaceMap) UnTypedGet(key string) (interface{}, bool)
- func (a *NFInterfaceMap) Update(key string, value interface{}) error
- func (a *NFInterfaceMap) UpdateMulti(args ...NFKeyVal) error
- type NFKeyVal
- type NFReference
- type NFSceneData
- type SupportedBindingType
- type Type
- type TypedMap
- type TypedSlice
- type ValueType
Constants ¶
This section is empty.
Variables ¶
var GlobalBindings = NewNFBindingMap()
var GlobalVars = NewRemoteNFInterfaceMap()
Functions ¶
func GetTypesString ¶
func GetTypesString() []string
Types ¶
type CoupledArgs ¶
type CoupledArgs struct { NfInterfaceMap *NFInterfaceMap // contains filtered or unexported fields }
func NewCoupledInterfaceMap ¶
func NewCoupledInterfaceMap(args *NFInterfaceMap) *CoupledArgs
func (*CoupledArgs) Add ¶
func (c *CoupledArgs) Add() interface{}
func (*CoupledArgs) Copy ¶
func (c *CoupledArgs) Copy(key interface{})
func (*CoupledArgs) Delete ¶
func (c *CoupledArgs) Delete(key interface{}, waitChan chan struct{}, window fyne.Window)
func (*CoupledArgs) Get ¶
func (c *CoupledArgs) Get(key interface{}) (interface{}, bool)
func (*CoupledArgs) Keys ¶
func (c *CoupledArgs) Keys() []string
func (*CoupledArgs) Object ¶
func (c *CoupledArgs) Object() interface{}
func (*CoupledArgs) ParseValue ¶
func (c *CoupledArgs) ParseValue(key interface{}, val string) (interface{}, error)
func (*CoupledArgs) Set ¶
func (c *CoupledArgs) Set(key interface{}, value interface{})
func (*CoupledArgs) SetKey ¶
func (c *CoupledArgs) SetKey(key interface{}, newKey interface{}) bool
func (*CoupledArgs) SetType ¶
func (c *CoupledArgs) SetType(key interface{}, t ValueType)
type CoupledMap ¶
type CoupledMap struct { Map CustomMap // contains filtered or unexported fields }
func NewCoupledMap ¶
func NewCoupledMap(args CustomMap) *CoupledMap
func (*CoupledMap) Add ¶
func (cm *CoupledMap) Add() interface{}
func (*CoupledMap) Copy ¶
func (cm *CoupledMap) Copy(key interface{})
func (*CoupledMap) Delete ¶
func (cm *CoupledMap) Delete(key interface{}, waitChan chan struct{}, window fyne.Window)
func (*CoupledMap) Get ¶
func (cm *CoupledMap) Get(key interface{}) (interface{}, bool)
func (*CoupledMap) Keys ¶
func (cm *CoupledMap) Keys() []string
func (*CoupledMap) Object ¶
func (cm *CoupledMap) Object() interface{}
func (*CoupledMap) ParseValue ¶
func (cm *CoupledMap) ParseValue(key interface{}, val string) (interface{}, error)
func (*CoupledMap) Set ¶
func (cm *CoupledMap) Set(key interface{}, v interface{})
func (*CoupledMap) SetKey ¶
func (cm *CoupledMap) SetKey(key interface{}, newKey interface{}) bool
func (*CoupledMap) SetType ¶
func (cm *CoupledMap) SetType(key interface{}, t ValueType)
type CoupledObject ¶
type CoupledObject interface { Keys() []string Add() interface{} Object() interface{} Get(key interface{}) (interface{}, bool) Set(key interface{}, value interface{}) SetType(key interface{}, t ValueType) SetKey(key interface{}, newKey interface{}) bool ParseValue(key interface{}, val string) (interface{}, error) Delete(key interface{}, waitChan chan struct{}, window fyne.Window) Copy(key interface{}) }
type CoupledSlice ¶
type CoupledSlice struct { Slice CustomSlice // contains filtered or unexported fields }
func NewCoupledSlice ¶
func NewCoupledSlice(args CustomSlice) *CoupledSlice
func (*CoupledSlice) Add ¶
func (cs *CoupledSlice) Add() interface{}
func (*CoupledSlice) Copy ¶
func (cs *CoupledSlice) Copy(key interface{})
func (*CoupledSlice) Delete ¶
func (cs *CoupledSlice) Delete(key interface{}, waitChan chan struct{}, window fyne.Window)
func (*CoupledSlice) Get ¶
func (cs *CoupledSlice) Get(key interface{}) (interface{}, bool)
func (*CoupledSlice) Keys ¶
func (cs *CoupledSlice) Keys() []string
func (*CoupledSlice) Object ¶
func (cs *CoupledSlice) Object() interface{}
func (*CoupledSlice) ParseValue ¶
func (cs *CoupledSlice) ParseValue(key interface{}, val string) (interface{}, error)
func (*CoupledSlice) Set ¶
func (cs *CoupledSlice) Set(i interface{}, v interface{})
func (*CoupledSlice) SetKey ¶
func (cs *CoupledSlice) SetKey(key interface{}, newKey interface{}) bool
func (*CoupledSlice) SetType ¶
func (cs *CoupledSlice) SetType(i interface{}, t ValueType)
type CustomSlice ¶
type CustomSlice []interface{}
func NewCustomSlice ¶
func NewCustomSlice(customSlice CustomSlice) CustomSlice
func (CustomSlice) Copy ¶
func (c CustomSlice) Copy() Copyable
type NFBindingMap ¶
type NFBindingMap struct {
// contains filtered or unexported fields
}
NFBindingMap is a struct that holds all the bindings to allow dynamic UI updates
Bindings should not be deleted as they are used to update the UI, and they should only be used where required ¶
The bindings are stored in a map with the key being the name of the binding and are split into different types
func NewNFBindingMap ¶
func NewNFBindingMap(args ...NFKeyVal) *NFBindingMap
NewNFBindingMap creates a new NFBindingMap struct
func (*NFBindingMap) CreateBinding ¶
func (nfb *NFBindingMap) CreateBinding(key string, value interface{}) error
CreateBinding creates a new binding based on the type of the value this DOES NOT update the value
func (*NFBindingMap) GetBinding ¶
func (nfb *NFBindingMap) GetBinding(key string, bindingRef interface{}) error
func (*NFBindingMap) GetBoolBinding ¶
func (nfb *NFBindingMap) GetBoolBinding(key string) (binding.Bool, error)
func (*NFBindingMap) GetFloatBinding ¶
func (nfb *NFBindingMap) GetFloatBinding(key string) (binding.Float, error)
func (*NFBindingMap) GetIntBinding ¶
func (nfb *NFBindingMap) GetIntBinding(key string) (binding.Int, error)
func (*NFBindingMap) GetStringBinding ¶
func (nfb *NFBindingMap) GetStringBinding(key string) (binding.String, error)
func (*NFBindingMap) GetUntypedBinding ¶
func (nfb *NFBindingMap) GetUntypedBinding(key string) (binding.Untyped, error)
type NFInterfaceMap ¶
type NFInterfaceMap struct { Data CustomMap `json:"Data"` // contains filtered or unexported fields }
NFInterfaceMap is the struct that holds all the information about the properties of a NF object.
it has GADUS(Get, Add, Delete, Update, Set) functions to manipulate the data.
Data should not be manipulated directly, but through the GADUS functions, as they handle the mutex locks.
func NewNFInterfaceFromMap ¶
func NewNFInterfaceFromMap(args CustomMap) *NFInterfaceMap
NewNFInterfaceFromMap creates a new NFInterfaceMap struct from a map
func NewNFInterfaceMap ¶
func NewNFInterfaceMap(args ...NFKeyVal) *NFInterfaceMap
NewNFInterfaceMap creates a new NFInterfaceMap struct
func NewRemoteNFInterfaceMap ¶
func NewRemoteNFInterfaceMap(args ...NFKeyVal) *NFInterfaceMap
NewRemoteNFInterfaceMap creates a new NFInterfaceMap struct that does not allow references
func (*NFInterfaceMap) Add ¶
func (a *NFInterfaceMap) Add(key string, value interface{}) error
Add adds a value to the interface by Key, errors if the Key already exists
func (*NFInterfaceMap) AddMulti ¶
func (a *NFInterfaceMap) AddMulti(args ...NFKeyVal) error
AddMulti adds multiple values to the interface, errors if a Key already exists
func (*NFInterfaceMap) Copy ¶
func (a *NFInterfaceMap) Copy() Copyable
Copy returns a new NFInterfaceMap with the same data as a Copyable
func (*NFInterfaceMap) Delete ¶
func (a *NFInterfaceMap) Delete(key string) error
Delete deletes a value in the interface, errors if the Key does not exist
func (*NFInterfaceMap) DeleteMulti ¶
func (a *NFInterfaceMap) DeleteMulti(keys ...string) error
DeleteMulti deletes multiple values in the interface, errors if the Key does not exist
func (*NFInterfaceMap) Export ¶
func (a *NFInterfaceMap) Export() map[string][]string
Export returns a map where the keys are the string representation of the type of the values in the NFInterfaceMap struct, and the values are slices of keys that correspond to that type.
func (*NFInterfaceMap) Get ¶
func (a *NFInterfaceMap) Get(key string, ref interface{}) error
Get gets an element from the interface by reference, it will return an error if the Key does not exist or if the type does not match
func (*NFInterfaceMap) HasAllKeys ¶
func (a *NFInterfaceMap) HasAllKeys(b *NFInterfaceMap) (bool, []string)
HasAllKeys compares a with b to see if all keys in b are in a
func (*NFInterfaceMap) Merge ¶
func (a *NFInterfaceMap) Merge(values *NFInterfaceMap) *NFInterfaceMap
Merge merges the values of a NFInterfaceMap into the NFInterfaceMap it is called on overwriting any existing values when there are conflicts
func (*NFInterfaceMap) Set ¶
func (a *NFInterfaceMap) Set(key string, value interface{})
Set sets a value in the interface does not care about the type
func (*NFInterfaceMap) SetMulti ¶
func (a *NFInterfaceMap) SetMulti(args ...NFKeyVal)
SetMulti sets multiple values in the interface,
func (*NFInterfaceMap) ToMap ¶
func (a *NFInterfaceMap) ToMap() CustomMap
ToMap returns the Data field of the NFInterfaceMap struct
func (*NFInterfaceMap) UnTypedGet ¶
func (a *NFInterfaceMap) UnTypedGet(key string) (interface{}, bool)
UnTypedGet gets an element from the interface if it exists
func (*NFInterfaceMap) Update ¶
func (a *NFInterfaceMap) Update(key string, value interface{}) error
Update updates a value in the interface, errors if the Key does not exist or if the type does not match
func (*NFInterfaceMap) UpdateMulti ¶
func (a *NFInterfaceMap) UpdateMulti(args ...NFKeyVal) error
UpdateMulti updates multiple values in the interface, errors if the Key does not exist or if the type does not match
type NFReference ¶
type NFReference struct { Location Type `json:"Location"` Key string `json:"Key"` IsBinding bool `json:"IsBinding"` BindingType SupportedBindingType `json:"BindingType"` }
func NewRefWithBinding ¶
func NewRefWithBinding(t Type, key string, bindingType SupportedBindingType) NFReference
NewRefWithBinding creates a new NFReference struct with a binding
func (*NFReference) Add ¶
func (r *NFReference) Add(ref interface{}) error
Add adds the reference to the Location
func (*NFReference) CreateBinding ¶
func (r *NFReference) CreateBinding(ref interface{}) error
CreateBinding creates a new binding for the reference
func (*NFReference) Delete ¶
func (r *NFReference) Delete() error
Delete deletes the reference from the Location
func (*NFReference) Get ¶
func (r *NFReference) Get(ref interface{}) error
Get gets the value of the reference
func (*NFReference) GetBinding ¶
func (r *NFReference) GetBinding() (interface{}, error)
func (*NFReference) Set ¶
func (r *NFReference) Set(ref interface{}) error
Set sets the value of the reference
type NFSceneData ¶
type NFSceneData struct { Layouts *NFInterfaceMap Variables *NFInterfaceMap Bindings *NFBindingMap // contains filtered or unexported fields }
var ActiveSceneData *NFSceneData
func NewSceneData ¶
func NewSceneData(sceneName string) *NFSceneData
func (*NFSceneData) GetSceneName ¶
func (s *NFSceneData) GetSceneName() string
func (*NFSceneData) GetSceneNameBinding ¶
func (s *NFSceneData) GetSceneNameBinding() binding.String
GetSceneNameBinding returns the binding.String for the scene name
func (*NFSceneData) SetSceneName ¶
func (s *NFSceneData) SetSceneName(sceneName string)
type SupportedBindingType ¶
type SupportedBindingType string
const ( BindingUntyped SupportedBindingType = "Untyped" BindingInt SupportedBindingType = "Int" BindingFloat SupportedBindingType = "Float" BindingBool SupportedBindingType = "Bool" BindingString SupportedBindingType = "String" )
type TypedMap ¶
func NewTypedMap ¶
type TypedSlice ¶
type TypedSlice []ValueType
func NewTypedSlice ¶
func NewTypedSlice(slice CustomSlice) TypedSlice
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package NFFS allows for grouping embedded filesystems into one multiFS, and provides a simple interface for reading from them and protections for reading from the local game filesystem
|
Package NFFS allows for grouping embedded filesystems into one multiFS, and provides a simple interface for reading from them and protections for reading from the local game filesystem |