- Framework upated to v63 (template parenting support).

- General front end changes with template changes on plugins and other windows.
This commit is contained in:
Tercio
2018-01-18 14:58:35 -02:00
parent 5adc522454
commit 984db015fc
9 changed files with 154 additions and 74 deletions
+11 -19
View File
@@ -5,25 +5,6 @@
local _detalhes = _G._detalhes
DETAILSPLUGIN_ALWAYSENABLED = 0x1
--> templates
_detalhes.gump:InstallTemplate ("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE",
{
backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true},
backdropcolor = {0, 0, 0, .5},
backdropbordercolor = {0, 0, 0, .5},
onentercolor = {0.3, 0.3, 0.3, .5},
}
)
_detalhes.gump:InstallTemplate ("button", "DETAILS_PLUGINPANEL_BUTTONSELECTED_TEMPLATE",
{
backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true},
backdropcolor = {0, 0, 0, .5},
backdropbordercolor = {1, 1, 0, 1},
onentercolor = {0.3, 0.3, 0.3, .5},
}
)
--> consts
local CONST_PLUGINWINDOW_MENU_WIDTH = 150
local CONST_PLUGINWINDOW_MENU_HEIGHT = 22
@@ -629,6 +610,17 @@
--> add it to menu table
tinsert (f.MenuButtons, newButton)
if (#f.MenuButtons == 1) then
local teste = _detalhes.gump:NewButton (f, _, "$parentOpenFeedbackButton", nil, 160, 20, _detalhes.OpenFeedbackWindow, nil, nil, nil, "Hellow Woirld", 1)
teste:SetPoint ("top", menuBackground, "top", 0, f.MenuY + ( (1-1) * -f.MenuButtonHeight ) - 1 - 350)
teste:SetTemplate (_detalhes.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
teste.textalign = "left"
teste.textcolor = "white"
teste.textsize = 10
teste:SetIcon ("Interface\\FriendsFrame\\UI-Toast-BroadcastIcon", nil, nil, nil, {4/32, 27/32, 5/32, 25/32}, {1, 1, 1, 0.8}, 4, 2)
end
return newButton
end
+16 -2
View File
@@ -3831,11 +3831,24 @@
local f = DetailsAPIPanel or gump:CreateSimplePanel (UIParent, 700, 480, "Details! API", "DetailsAPIPanel")
DetailsAPIPanel.Initialized = true
local text_box = gump:NewSpecialLuaEditorEntry (f, 685, 540, "text", "$parentTextEntry", true)
text_box:SetPoint ("topleft", f, "topleft", 220, -40)
text_box:SetBackdrop (nil)
--background
f.bg1 = f:CreateTexture (nil, "background")
f.bg1:SetTexture ([[Interface\AddOns\Details\images\background]], true)
f.bg1:SetAlpha (0.8)
f.bg1:SetVertexColor (0.27, 0.27, 0.27)
f.bg1:SetVertTile (true)
f.bg1:SetHorizTile (true)
f.bg1:SetSize (790, 454)
f.bg1:SetAllPoints()
f:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
f:SetBackdropColor (.5, .5, .5, .7)
f:SetBackdropBorderColor (0, 0, 0, 1)
--> create a background area where the text editor is
local TextEditorBackground = gump:NewButton (f, nil, nil, nil, 1, 1, function()end)
TextEditorBackground:SetAllPoints (text_box)
@@ -3854,9 +3867,10 @@
local title = topics [i]
local button = gump:CreateButton (f, select_topic, 200, 20, title, i)
button:SetTemplate (gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
button:SetTemplate (gump:GetTemplate ("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
button:SetPoint ("topleft", f, "topleft", 5, (-i*22)-30)
button:SetIcon ([[Interface\Buttons\UI-GuildButton-PublicNote-Up]], nil, nil, nil, nil, nil, nil, 2)
button:SetWidth (200)
end
select_topic (nil, nil, 1)