- added a scale parameter for encounter details plugin.
This commit is contained in:
+1
-1
@@ -930,7 +930,7 @@ end
|
||||
|
||||
function _detalhes:FastSwitch (button, bookmark, bookmark_number, select_new)
|
||||
|
||||
local UnknownPlugin = bookmark.atributo == "plugin" and not _detalhes:GetPlugin (bookmark.sub_atributo)
|
||||
local UnknownPlugin = bookmark and bookmark.atributo == "plugin" and not _detalhes:GetPlugin (bookmark.sub_atributo)
|
||||
|
||||
if (select_new or not bookmark.atributo or UnknownPlugin) then
|
||||
|
||||
|
||||
@@ -91,6 +91,7 @@ local function CreatePluginFrames (data)
|
||||
--> when main frame is shown on screen
|
||||
elseif (event == "SHOW") then --> plugin hidded, disabled
|
||||
self.open = true
|
||||
EncounterDetails:RefreshScale()
|
||||
|
||||
--> when details finish his startup and are ready to work
|
||||
elseif (event == "DETAILS_STARTED") then
|
||||
@@ -1818,6 +1819,7 @@ function EncounterDetails:OnEvent (_, event, ...)
|
||||
opened = 0,
|
||||
encounter_timers_dbm = {},
|
||||
encounter_timers_bw = {},
|
||||
window_scale = 1,
|
||||
}
|
||||
|
||||
--> Install
|
||||
|
||||
@@ -102,7 +102,17 @@ do
|
||||
name = "Emote Segments Amount",
|
||||
usedecimals = true,
|
||||
},
|
||||
|
||||
{
|
||||
type = "range",
|
||||
get = function() return EncounterDetails.db.window_scale end,
|
||||
set = function (self, fixedparam, value) EncounterDetails.db.window_scale = value; EncounterDetails:RefreshScale() end,
|
||||
min = 0.65,
|
||||
max = 1.50,
|
||||
step = 0.1,
|
||||
desc = "Set the window size",
|
||||
name = "Window Scale",
|
||||
usedecimals = true,
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
@@ -117,6 +127,13 @@ do
|
||||
EncounterDetailsOptionsWindow:Show()
|
||||
end
|
||||
|
||||
function EncounterDetails:RefreshScale()
|
||||
local scale = EncounterDetails.db.window_scale
|
||||
if (EncounterDetails.Frame) then
|
||||
EncounterDetails.Frame:SetScale (scale)
|
||||
end
|
||||
end
|
||||
|
||||
function EncounterDetails:CreateRowTexture (row)
|
||||
row.textura = CreateFrame ("StatusBar", nil, row)
|
||||
row.textura:SetAllPoints (row)
|
||||
|
||||
Reference in New Issue
Block a user