From a1c527711cae60ab57e1b7265446a45c29e5afda Mon Sep 17 00:00:00 2001 From: Tercio Date: Tue, 24 Jul 2018 13:56:44 -0300 Subject: [PATCH] - Removed bookmark tutorial popup. - Major Framework update to fix already existing XML warnings. - Added more alias for the basic api, old calls won't be changed: * Details:GetWindow -> GetInstance * Window:IsShown() -> Instance:IsActive() * Window:HideWindow() -> Instance:ShutDown() * Window:ShowWindow() -> Instance:EnableInstance() --- Libs/DF/button.lua | 28 +++- Libs/DF/button.xml | 39 ----- Libs/DF/cooltip.lua | 226 ++++++++++++++++++++++++- Libs/DF/cooltip.xml | 313 ----------------------------------- Libs/DF/dropdown.lua | 2 - Libs/DF/dropdown.xml | 248 --------------------------- Libs/DF/fw.lua | 57 ++----- Libs/DF/normal_bar.lua | 64 ++++++- Libs/DF/normal_bar.xml | 95 ----------- Libs/DF/panel.lua | 9 +- Libs/DF/panel.xml | 29 ---- Libs/DF/split_bar.lua | 47 +++++- Libs/DF/split_bar.xml | 79 --------- Libs/DF/textentry.lua | 26 ++- Libs/DF/textentry.xml | 59 ------- Libs/DF/tutorial_alert.xml | 247 +-------------------------- boot.lua | 4 +- classes/classe_instancia.lua | 15 ++ core/windows.lua | 45 +---- gumps/janela_principal.lua | 1 + startup.lua | 2 + 21 files changed, 424 insertions(+), 1211 deletions(-) diff --git a/Libs/DF/button.lua b/Libs/DF/button.lua index a405655b..17d2ce1a 100644 --- a/Libs/DF/button.lua +++ b/Libs/DF/button.lua @@ -966,6 +966,30 @@ end ------------------------------------------------------------------------------------------------------------ --> object constructor +local build_button = function (self) + self:SetSize (100, 20) + + self.text = self:CreateFontString ("$parent_Text", "ARTWORK", "GameFontNormal") + self.text:SetJustifyH ("CENTER") + DF:SetFontSize (self.text, 10) + self.text:SetPoint ("CENTER", self, "CENTER", 0, 0) + + self.texture_disabled = self:CreateTexture ("$parent_TextureDisabled", "OVERLAY") + self.texture_disabled:SetAllPoints() + self.texture_disabled:Hide() + self.texture_disabled:SetTexture ("Interface\\Tooltips\\UI-Tooltip-Background") + + self:SetScript ("OnDisable", function (self) + self.texture_disabled:Show() + self.texture_disabled:SetVertexColor (0, 0, 0) + self.texture_disabled:SetAlpha (.5) + end) + + self:SetScript ("OnEnable", function (self) + self.texture_disabled:Hide() + end) +end + function DF:CreateButton (parent, func, w, h, text, param1, param2, texture, member, name, short_method, button_template, text_template) return DF:NewButton (parent, parent, name, member, w, h, func, param1, param2, texture, text, short_method, button_template, text_template) end @@ -1006,7 +1030,9 @@ function DF:NewButton (parent, container, name, member, w, h, func, param1, para ButtonObject.container = container ButtonObject.options = {OnGrab = false} - ButtonObject.button = CreateFrame ("button", name, parent, "DetailsFrameworkButtonTemplate") + ButtonObject.button = CreateFrame ("button", name, parent) + build_button (ButtonObject.button) + ButtonObject.widget = ButtonObject.button --ButtonObject.button:SetBackdrop ({bgFile = DF.folder .. "background", tileSize = 64, edgeFile = DF.folder .. "border_2", edgeSize = 10, insets = {left = 1, right = 1, top = 1, bottom = 1}}) diff --git a/Libs/DF/button.xml b/Libs/DF/button.xml index ae375e7c..97dfbf42 100644 --- a/Libs/DF/button.xml +++ b/Libs/DF/button.xml @@ -1,42 +1,3 @@