|
|
@ -48,22 +48,28 @@ local Stylesheet = { |
|
|
|
-- ~~| Spinner Methods |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
|
|
-- ~~| Spinner Methods |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
|
|
---@class Diesal.GUI.Input.Methods |
|
|
|
---@class Diesal.GUI.Input.Methods |
|
|
|
local methods = { |
|
|
|
local methods = { |
|
|
|
|
|
|
|
---@param self Diesal.GUI.Object.Input |
|
|
|
["OnAcquire"] = function(self) |
|
|
|
["OnAcquire"] = function(self) |
|
|
|
self:SetStylesheet(Stylesheet) |
|
|
|
self:SetStylesheet(Stylesheet) |
|
|
|
self:ApplySettings() |
|
|
|
self:ApplySettings() |
|
|
|
self:Show() |
|
|
|
self:Show() |
|
|
|
end, |
|
|
|
end, |
|
|
|
|
|
|
|
---@param self Diesal.GUI.Object.Input |
|
|
|
["OnRelease"] = function(self) end, |
|
|
|
["OnRelease"] = function(self) end, |
|
|
|
|
|
|
|
---@param self Diesal.GUI.Object.Input |
|
|
|
["ApplySettings"] = function(self) |
|
|
|
["ApplySettings"] = function(self) |
|
|
|
self:SetWidth(self.settings.width) |
|
|
|
self:SetWidth(self.settings.width) |
|
|
|
self:SetHeight(self.settings.height) |
|
|
|
self:SetHeight(self.settings.height) |
|
|
|
end, |
|
|
|
end, |
|
|
|
|
|
|
|
---@param self Diesal.GUI.Object.Input |
|
|
|
["GetText"] = function(self) |
|
|
|
["GetText"] = function(self) |
|
|
|
return self.editBox:GetText() |
|
|
|
return self.editBox:GetText() |
|
|
|
end, |
|
|
|
end, |
|
|
|
|
|
|
|
---@param self Diesal.GUI.Object.Input |
|
|
|
["SetText"] = function(self, txt) |
|
|
|
["SetText"] = function(self, txt) |
|
|
|
self.editBox:SetText(txt) |
|
|
|
self.editBox:SetText(txt) |
|
|
|
end, |
|
|
|
end, |
|
|
|
|
|
|
|
---@param self Diesal.GUI.Object.Input |
|
|
|
["SetTextColor"] = function(self, color, alpha) |
|
|
|
["SetTextColor"] = function(self, color, alpha) |
|
|
|
alpha = alpha or 1 |
|
|
|
alpha = alpha or 1 |
|
|
|
color = { DiesalTools.GetColor(color) } |
|
|
|
color = { DiesalTools.GetColor(color) } |
|
|
@ -76,6 +82,7 @@ local methods = { |
|
|
|
-- | Constructor |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
|
|
-- | Constructor |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
|
|
local function Constructor() |
|
|
|
local function Constructor() |
|
|
|
---@class Diesal.GUI.Object.Input : Diesal.GUI.ObjectBase, Diesal.GUI.Input.Methods |
|
|
|
---@class Diesal.GUI.Object.Input : Diesal.GUI.ObjectBase, Diesal.GUI.Input.Methods |
|
|
|
|
|
|
|
---@field editBox EditBox |
|
|
|
local self = DiesalGUI:Create(Type, true) |
|
|
|
local self = DiesalGUI:Create(Type, true) |
|
|
|
local frame = CreateFrame("Frame", nil, UIParent) |
|
|
|
local frame = CreateFrame("Frame", nil, UIParent) |
|
|
|
self.frame = frame |
|
|
|
self.frame = frame |
|
|
|