Documentation ¶
Index ¶
- type UIText
- func (t *UIText) DrawUI(gb interfaces.IGameBase, screen *ebiten.Image)
- func (t *UIText) DrawUIPriority() float64
- func (t *UIText) GetFontFace() *text.GoTextFace
- func (t *UIText) GetFontFaceSource() *text.GoTextFaceSource
- func (t *UIText) GetFontOptions() *interfaces.FontOptions
- func (t *UIText) GetID() string
- func (t *UIText) GetText() string
- func (t *UIText) GetTransform() interfaces.ITransform
- func (t *UIText) SetFontColor(fontColor color.Color)
- func (t *UIText) SetFontDirectly(font *text.GoTextFace)
- func (t *UIText) SetFontOptions(fontOptions *interfaces.FontOptions)
- func (t *UIText) SetFontSize(fontSize float64)
- func (t *UIText) SetLineSpacing(lineSpacing float64)
- func (t *UIText) SetLineSpacingMultiplier(multiplier float64)
- func (t *UIText) SetText(text string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UIText ¶
type UIText struct { ID string // contains filtered or unexported fields }
UI text. This can be used as a text in the world.
func New ¶
func New(tf interfaces.ITransform, text string, f *text.GoTextFaceSource, fontSize float64) *UIText
Returns a new UI text instance. This text can be as UI, as pinned to the world game object.
func (*UIText) DrawUI ¶
func (t *UIText) DrawUI(gb interfaces.IGameBase, screen *ebiten.Image)
func (*UIText) DrawUIPriority ¶
func (*UIText) GetFontFace ¶
func (t *UIText) GetFontFace() *text.GoTextFace
Returns GoTextFace object (see ebiten/v2/text/v2).
func (*UIText) GetFontFaceSource ¶
func (t *UIText) GetFontFaceSource() *text.GoTextFaceSource
Returns GoTextFaceSource object (see ebiten/v2/text/v2).
func (*UIText) GetFontOptions ¶
func (t *UIText) GetFontOptions() *interfaces.FontOptions
Returns the font options.
func (*UIText) GetTransform ¶
func (t *UIText) GetTransform() interfaces.ITransform
Returns the transform used by this text object.
func (*UIText) SetFontColor ¶
Changes the color of the text.
func (*UIText) SetFontDirectly ¶
func (t *UIText) SetFontDirectly(font *text.GoTextFace)
Directly install "font" value to the given font. It is bypasses "FontSize" parameter of the font options.
This function useful for UIText interfaces, such as RichText.
* BE CAREFUL!
func (*UIText) SetFontOptions ¶
func (t *UIText) SetFontOptions(fontOptions *interfaces.FontOptions)
Changes the font options.
func (*UIText) SetFontSize ¶
Sets a size of the font.
* IMPORTANT: This function changes the value of the line spacing.
func (*UIText) SetLineSpacingMultiplier ¶
Changes the multiplier of linespacing.