Skip to content

Commit

Permalink
Added missing title header to multi-bar indicator configuration.
Browse files Browse the repository at this point in the history
Smalls appearance adjustements.
  • Loading branch information
michaelnpsp committed Dec 10, 2020
1 parent 8a59bca commit 5197b67
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 16 deletions.
4 changes: 2 additions & 2 deletions Options/GridCore.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ local Grid2Options = {
}

-- Declare some variables for fast access to main sections options.
-- generalOptions, themesOptions, indicatorsOptions, statusesOptions
-- generalOptions, themesOptions, indicatorsOptions, statusesOptions
for k,o in pairs(Grid2Options.options.args) do
Grid2Options[k..'Options'] = o.args
end
Expand All @@ -63,7 +63,7 @@ function Grid2Options:Initialize()
self:EnableLoadOnDemand(not Grid2.db.global.LoadOnDemandDisabled)
self:MakeOptions()
LibStub("AceConfig-3.0"):RegisterOptionsTable("Grid2", self.options)
LibStub("AceConfigDialog-3.0"):SetDefaultSize("Grid2", 735, 550)
LibStub("AceConfigDialog-3.0"):SetDefaultSize("Grid2", 735, 558)
self.Initialize = nil
end

Expand Down
2 changes: 1 addition & 1 deletion Options/GridUtils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ do
function Grid2Options:MakeTitleOptions(options, title, subtitle, desc, icon, coords, arg)
options.title = {
type = "description", order = 0, width = "full", fontSize = "large", dialogControl = "Grid2Title",
image = icon, imageWidth = 36, imageHeight = 36, imageCoords = coords or titleCoords,
image = icon, imageWidth = 34, imageHeight = 34, imageCoords = coords or titleCoords,
name = string.format(titleMask, title, subtitle),
desc = desc,
arg = arg, -- optional multipurpose argument
Expand Down
21 changes: 10 additions & 11 deletions Options/GridWidgets.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ do
tooltip:ClearAllPoints()
tooltip:SetPoint("TOP",frame,"BOTTOM", 0, -8)
tooltip:ClearLines()
-- tooltip:SetText( text , 1, .82, 0, 1, true)
tooltip:AddLine( text , 1, 1, 1, true)
tooltip:SetText( text , 1, 1, 1, 1, true)
tooltip:Show()
end

Expand All @@ -60,18 +59,16 @@ do
end

local function OnIconEnter(self)
local parent = self.frame:GetParent().obj
local option = parent.options[self.index]
local option = self.parentObj.options[self.index]
if option.tooltip then
ShowTooltip(self.frame, option.tooltip)
end
end

local function OnIconClick(self)
local parent = self.frame:GetParent().obj
local option = parent.options[self.index]
local option = self.parentObj.options[self.index]
if option.func then
option.func( parent.userdata, self.index )
option.func( self.parentObj.userdata, self.index )
end
end

Expand Down Expand Up @@ -102,6 +99,7 @@ do
end,
["OnRelease"] = function(self)
for _,icon in ipairs(self.icons) do
icon.index, icon.parentObj = nil, nil
icon:Release()
end
wipe(self.icons)
Expand All @@ -110,7 +108,7 @@ do
["SetImageSize"] = function(self, width, height)
self.image:SetWidth(width)
self.image:SetHeight(height)
self:SetHeight(height)
self:SetHeight(height+3)
end,
["SetImage"] = function(self, path,...)
self.image:SetTexture(path)
Expand Down Expand Up @@ -150,6 +148,7 @@ do
for i,option in ipairs(options) do
local icon = AceGUI:Create("Icon")
icon.index = i
icon.parentObj = self
icon:SetImage(option.image)
icon:SetImageSize(imgSize,imgSize)
icon:SetHeight(iconSize)
Expand Down Expand Up @@ -178,12 +177,12 @@ do
image:SetPoint("TOPLEFT")

local label = frame:CreateFontString(nil, "BACKGROUND", "GameFontHighlightSmall")
label:SetPoint("TOPLEFT", image, "TOPRIGHT", 4, 0)
label:SetPoint("LEFT", image, "RIGHT", 4, 0)

local line = frame:CreateTexture(nil, "BACKGROUND")
line:SetHeight(6)
line:SetPoint("BOTTOMLEFT", 0, -5)
line:SetPoint("BOTTOMRIGHT", 0, -5)
line:SetPoint("BOTTOMLEFT", 0, -4)
line:SetPoint("BOTTOMRIGHT", 0, -4)
line:SetTexture(137057) -- Interface\\Tooltips\\UI-Tooltip-Border
line:SetTexCoord(0.81, 0.94, 0.5, 1)

Expand Down
3 changes: 2 additions & 1 deletion Options/modules/indicators/IndicatorMultiBar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Grid2Options:RegisterIndicatorOptions("multibar", true, function(self, indicator
self:MakeIndicatorMultiBarAppearanceOptions(indicator,layout)
self:MakeIndicatorMultiBarTexturesOptions(indicator,bars)
local options = Grid2Options.indicatorsOptions[indicator.name].args; wipe(options)
self:MakeIndicatorTitleOptions(options, indicator)
options["bars"] = { type = "group", order = 10, name = L["Bars"], args = bars }
options["layout"] = { type = "group", order = 30, name = L["Layout"], args = layout }
if indicator.dbx.textureColor.r==nil then
Expand Down Expand Up @@ -413,7 +414,7 @@ do
name = L["Color"],
desc = L["Background Color"],
hasAlpha = true,
get = function() return self:UnpackColor( indicator.dbx.backColor ) end,
get = function() return self:UnpackColor( indicator.dbx.backColor ) end,
set = function(info,r,g,b,a)
self:PackColor( r,g,b,a, indicator.dbx, "backColor" )
self:RefreshIndicator(indicator, "Layout")
Expand Down
5 changes: 4 additions & 1 deletion RaidDebuffsOptions/OptionsGeneral.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ function RDO:InitGeneralOptions()
Grid2Options:MakeStatusTitleOptions( RDO.statuses[1], options)
end

-- separate content from title
options.separator0 = { type = "description", order = 9, name = "\n" }

-- raid-debuffs statuses
do
local statusColor = {
Expand Down Expand Up @@ -181,4 +184,4 @@ if not Grid2.isClassic then
[17] = PLAYER_DIFFICULTY3 -- LFR
},
}
end
end

0 comments on commit 5197b67

Please sign in to comment.