110 lines
3.6 KiB
Lua
110 lines
3.6 KiB
Lua
---@meta
|
|
|
|
---@class FontInstance
|
|
FontInstance = {
|
|
--- Gets the font properties.
|
|
--- @return string fontFile, number height, string flags
|
|
--- @example
|
|
--- local fontFile, height, flags = myFontInstance:GetFont()
|
|
GetFont = function(self) end,
|
|
|
|
--- Gets the font object.
|
|
--- @return FontObject fontObject The font object.
|
|
--- @example
|
|
--- local fontObject = myFontInstance:GetFontObject()
|
|
GetFontObject = function(self) end,
|
|
|
|
--- Gets the horizontal text alignment.
|
|
--- @return string justifyH The horizontal alignment ("LEFT", "CENTER", "RIGHT").
|
|
--- @example
|
|
--- local justifyH = myFontInstance:GetJustifyH()
|
|
GetJustifyH = function(self) end,
|
|
|
|
--- Gets the vertical text alignment.
|
|
--- @return string justifyV The vertical alignment ("TOP", "MIDDLE", "BOTTOM").
|
|
--- @example
|
|
--- local justifyV = myFontInstance:GetJustifyV()
|
|
GetJustifyV = function(self) end,
|
|
|
|
--- Gets the shadow color.
|
|
--- @return number r, number g, number b, number a The color components.
|
|
--- @example
|
|
--- local r, g, b, a = myFontInstance:GetShadowColor()
|
|
GetShadowColor = function(self) end,
|
|
|
|
--- Gets the shadow offset.
|
|
--- @return number x, number y The shadow offset.
|
|
--- @example
|
|
--- local x, y = myFontInstance:GetShadowOffset()
|
|
GetShadowOffset = function(self) end,
|
|
|
|
--- Gets the spacing between lines.
|
|
--- @return number spacing The line spacing.
|
|
--- @example
|
|
--- local spacing = myFontInstance:GetSpacing()
|
|
GetSpacing = function(self) end,
|
|
|
|
--- Gets the text color.
|
|
--- @return number r, number g, number b, number a The color components.
|
|
--- @example
|
|
--- local r, g, b, a = myFontInstance:GetTextColor()
|
|
GetTextColor = function(self) end,
|
|
|
|
--- Sets the font properties.
|
|
--- @param fontFile string The path to the font file.
|
|
--- @param height number The font height.
|
|
--- @param flags string? Optional. The font flags.
|
|
--- @example
|
|
--- myFontInstance:SetFont("Fonts\\FRIZQT__.TTF", 12, "OUTLINE")
|
|
SetFont = function(self, fontFile, height, flags) end,
|
|
|
|
--- Sets the font object.
|
|
--- @param fontObject FontObject The font object to use.
|
|
--- @example
|
|
--- myFontInstance:SetFontObject(GameFontNormal)
|
|
SetFontObject = function(self, fontObject) end,
|
|
|
|
--- Sets the horizontal text alignment.
|
|
--- @param justifyH string The horizontal alignment ("LEFT", "CENTER", "RIGHT").
|
|
--- @example
|
|
--- myFontInstance:SetJustifyH("CENTER")
|
|
SetJustifyH = function(self, justifyH) end,
|
|
|
|
--- Sets the vertical text alignment.
|
|
--- @param justifyV string The vertical alignment ("TOP", "MIDDLE", "BOTTOM").
|
|
--- @example
|
|
--- myFontInstance:SetJustifyV("MIDDLE")
|
|
SetJustifyV = function(self, justifyV) end,
|
|
|
|
--- Sets the shadow color.
|
|
--- @param r number The red component.
|
|
--- @param g number The green component.
|
|
--- @param b number The blue component.
|
|
--- @param a number? Optional. The alpha component.
|
|
--- @example
|
|
--- myFontInstance:SetShadowColor(0, 0, 0, 1)
|
|
SetShadowColor = function(self, r, g, b, a) end,
|
|
|
|
--- Sets the shadow offset.
|
|
--- @param x number The horizontal offset.
|
|
--- @param y number The vertical offset.
|
|
--- @example
|
|
--- myFontInstance:SetShadowOffset(1, -1)
|
|
SetShadowOffset = function(self, x, y) end,
|
|
|
|
--- Sets the spacing between lines.
|
|
--- @param spacing number The line spacing.
|
|
--- @example
|
|
--- myFontInstance:SetSpacing(2)
|
|
SetSpacing = function(self, spacing) end,
|
|
|
|
--- Sets the text color.
|
|
--- @param r number The red component.
|
|
--- @param g number The green component.
|
|
--- @param b number The blue component.
|
|
--- @param a number? Optional. The alpha component.
|
|
--- @example
|
|
--- myFontInstance:SetTextColor(1, 1, 1, 1)
|
|
SetTextColor = function(self, r, g, b, a) end,
|
|
}
|