- Polish on the Custom Display and Encounter Details windows.
- Fixed an issue on the segments and mode menus where the submenus wasn't anchoring correctly.
This commit is contained in:
+40
-24
@@ -5,6 +5,34 @@
|
||||
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
|
||||
local CONST_PLUGINWINDOW_MENU_X = -5
|
||||
local CONST_PLUGINWINDOW_MENU_Y = -26
|
||||
local CONST_PLUGINWINDOW_WIDTH = 925
|
||||
local CONST_PLUGINWINDOW_HEIGHT = 600
|
||||
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> details api functions
|
||||
function _detalhes:GetPlugin (PAN) --plugin absolute name
|
||||
@@ -431,14 +459,16 @@
|
||||
|
||||
f:Hide()
|
||||
|
||||
|
||||
|
||||
--> members
|
||||
f.MenuX = -5
|
||||
f.MenuY = -26
|
||||
f.MenuButtonWidth = 150
|
||||
f.MenuButtonHeight = 20
|
||||
f.MenuX = CONST_PLUGINWINDOW_MENU_X
|
||||
f.MenuY = CONST_PLUGINWINDOW_MENU_Y
|
||||
f.MenuButtonWidth = CONST_PLUGINWINDOW_MENU_WIDTH
|
||||
f.MenuButtonHeight = CONST_PLUGINWINDOW_MENU_HEIGHT
|
||||
f.FrameWidth = CONST_PLUGINWINDOW_WIDTH
|
||||
f.FrameHeight = CONST_PLUGINWINDOW_HEIGHT
|
||||
f.TitleHeight = 20
|
||||
f.FrameWidth = 925
|
||||
f.FrameHeight = 600
|
||||
|
||||
--> store button references for the left menu
|
||||
f.MenuButtons = {}
|
||||
@@ -519,23 +549,7 @@
|
||||
end
|
||||
end
|
||||
|
||||
--> 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, 1},
|
||||
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},
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
function f.OnMenuClick (_, _, pluginAbsName, callRefresh)
|
||||
|
||||
@@ -653,7 +667,9 @@
|
||||
|
||||
--> sort buttons alphabetically, put utilities at the end
|
||||
table.sort (f.MenuButtons, function (t1, t2)
|
||||
if (t1.IsUtility) then
|
||||
if (t1.IsUtility and t2.IsUtility) then
|
||||
return t1.PluginName < t2.PluginName
|
||||
elseif (t1.IsUtility) then
|
||||
return false
|
||||
elseif (t2.IsUtility) then
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user