You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.4 KiB

1 year ago
---@type Diesal.GUI
local DiesalGUI = LibStub("DiesalGUI-2.0")
---@type Diesal.Tools
local DiesalTools = LibStub("DiesalTools-2.0")
---@type Diesal.Style
local DiesalStyle = LibStub("DiesalStyle-2.0")
local Type = "DiesalText"
local Version = 1
---@class Diesal.GUI.Text.Methods : Diesal.GUI.ObjectBase
---@field OnAcquire fun(self:Diesal.GUI.Object.Text, ...)
---@field OnRelease fun(self:Diesal.GUI.Object.Text, ...)
local methods = {
OnAcquire = function(self, ...)
self:Show()
end,
OnRelease = function(self, ...)
--self.fontString:SetText("")
end,
}
---@class DiesalText : Diesal.GUI.Object.Text
local function Constructor()
---@class Diesal.GUI.Object.Text : Diesal.GUI.ObjectBase, Diesal.GUI.Text.Methods, Frame
---@field fontString FontString
local self = DiesalGUI:Create(Type, true)
self.defaults = {}
local frame = CreateFrame("Frame", nil, DiesalGUI.UIParent)
1 year ago
self.frame = frame
self:CreateRegion("FontString", "fontString", frame)
--local fontString = frame:CreateFontString(nil, "OVERLAY", "DiesalFontNormal")
--self.fontString = fontString
self.fontStrings[#self.fontStrings + 1] = self.fontString
self:SetMethods(methods)
8 months ago
self:SetObj(self.frame)
1 year ago
--[[ for method, func in pairs(methods) do
self[method] = func
end ]]
return self
end
DiesalGUI:RegisterObjectConstructor(Type, Constructor, Version)