---@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) 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) self:SetObj(self.frame) --[[ for method, func in pairs(methods) do self[method] = func end ]] return self end DiesalGUI:RegisterObjectConstructor(Type, Constructor, Version)