Documentation
¶
Overview ¶
graphics.gd/classdb/TextServerManager is the API backend for loading, enumerating, and switching [graphics.gd/classdb/TextServer]s.
Note: Switching text server at runtime is possible, but will invalidate all fonts and text buffers. Make sure to unload all controls, fonts, and themes before doing so.
Index ¶
- func AddInterface(intf TextServer.Instance)
- func Advanced() class
- func FindInterface(name string) TextServer.Instance
- func GetInterface(idx int) TextServer.Instance
- func GetInterfaceCount() int
- func GetInterfaces() []map[int]string
- func GetPrimaryInterface() TextServer.Instance
- func OnInterfaceAdded(cb func(interface_name string), flags ...Signal.Flags)
- func OnInterfaceRemoved(cb func(interface_name string), flags ...Signal.Flags)
- func RemoveInterface(intf TextServer.Instance)
- func SetPrimaryInterface(index TextServer.Instance)
- type Extension
- type ID
- type Instance
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddInterface ¶
func AddInterface(intf TextServer.Instance)
Registers a graphics.gd/classdb/TextServer interface.
func Advanced ¶
func Advanced() class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
func FindInterface ¶
func FindInterface(name string) TextServer.Instance
Finds an interface by its 'name'.
func GetInterface ¶
func GetInterface(idx int) TextServer.Instance
Returns the interface registered at a given index.
func GetInterfaceCount ¶
func GetInterfaceCount() int
Returns the number of interfaces currently registered.
func GetInterfaces ¶
Returns a list of available interfaces, with the index and name of each interface.
func GetPrimaryInterface ¶
func GetPrimaryInterface() TextServer.Instance
Returns the primary graphics.gd/classdb/TextServer interface currently in use.
func OnInterfaceAdded ¶
func OnInterfaceRemoved ¶
func RemoveInterface ¶
func RemoveInterface(intf TextServer.Instance)
Removes an interface. All fonts and shaped text caches should be freed before removing an interface.
func SetPrimaryInterface ¶
func SetPrimaryInterface(index TextServer.Instance)
Sets the primary graphics.gd/classdb/TextServer interface.
Types ¶
type Extension ¶
Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension
type ID ¶
ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.
type Instance ¶
type Instance [1]gdclass.TextServerManager
Instance of the class with convieniently typed arguments and results.