mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- unified the behavior for configuration when a module is disabled. now the sub-configs (marker/text/icon settings) remain clickable but every element inside is disabled when the module is disabled. previously some sub-configs were not clickable at all and others were
This commit is contained in:
@ -482,9 +482,6 @@ end
|
|||||||
name = "|c"..self.configColor..L["Text Settings"].."|r",
|
name = "|c"..self.configColor..L["Text Settings"].."|r",
|
||||||
desc = L["Settings related to texts"],
|
desc = L["Settings related to texts"],
|
||||||
order = 32,
|
order = 32,
|
||||||
disabled = function()
|
|
||||||
return not self.moduleSettings.enabled
|
|
||||||
end,
|
|
||||||
args = {
|
args = {
|
||||||
fontsize = {
|
fontsize = {
|
||||||
type = 'range',
|
type = 'range',
|
||||||
@ -500,6 +497,9 @@ end
|
|||||||
min = 8,
|
min = 8,
|
||||||
max = 20,
|
max = 20,
|
||||||
step = 1,
|
step = 1,
|
||||||
|
disabled = function()
|
||||||
|
return not self.moduleSettings.enabled
|
||||||
|
end,
|
||||||
order = 11
|
order = 11
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -514,6 +514,9 @@ end
|
|||||||
self.moduleSettings.lockUpperTextAlpha = v
|
self.moduleSettings.lockUpperTextAlpha = v
|
||||||
self:Redraw()
|
self:Redraw()
|
||||||
end,
|
end,
|
||||||
|
disabled = function()
|
||||||
|
return not self.moduleSettings.enabled
|
||||||
|
end,
|
||||||
order = 13
|
order = 13
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -528,6 +531,9 @@ end
|
|||||||
self.moduleSettings.lockLowerTextAlpha = v
|
self.moduleSettings.lockLowerTextAlpha = v
|
||||||
self:Redraw()
|
self:Redraw()
|
||||||
end,
|
end,
|
||||||
|
disabled = function()
|
||||||
|
return not self.moduleSettings.enabled
|
||||||
|
end,
|
||||||
order = 13.1
|
order = 13.1
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -542,6 +548,9 @@ end
|
|||||||
self.moduleSettings.textVisible['upper'] = v
|
self.moduleSettings.textVisible['upper'] = v
|
||||||
self:Redraw()
|
self:Redraw()
|
||||||
end,
|
end,
|
||||||
|
disabled = function()
|
||||||
|
return not self.moduleSettings.enabled
|
||||||
|
end,
|
||||||
order = 14
|
order = 14
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -556,6 +565,9 @@ end
|
|||||||
self.moduleSettings.textVisible['lower'] = v
|
self.moduleSettings.textVisible['lower'] = v
|
||||||
self:Redraw()
|
self:Redraw()
|
||||||
end,
|
end,
|
||||||
|
disabled = function()
|
||||||
|
return not self.moduleSettings.enabled
|
||||||
|
end,
|
||||||
order = 15
|
order = 15
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -578,6 +590,9 @@ end
|
|||||||
self:RegisterFontStrings()
|
self:RegisterFontStrings()
|
||||||
self:Redraw()
|
self:Redraw()
|
||||||
end,
|
end,
|
||||||
|
disabled = function()
|
||||||
|
return not self.moduleSettings.enabled
|
||||||
|
end,
|
||||||
multiline = true,
|
multiline = true,
|
||||||
usage = "<upper text to display>"
|
usage = "<upper text to display>"
|
||||||
},
|
},
|
||||||
@ -601,6 +616,9 @@ end
|
|||||||
self:RegisterFontStrings()
|
self:RegisterFontStrings()
|
||||||
self:Redraw()
|
self:Redraw()
|
||||||
end,
|
end,
|
||||||
|
disabled = function()
|
||||||
|
return not self.moduleSettings.enabled
|
||||||
|
end,
|
||||||
multiline = true,
|
multiline = true,
|
||||||
usage = "<lower text to display>"
|
usage = "<lower text to display>"
|
||||||
},
|
},
|
||||||
@ -668,9 +686,6 @@ if not self.moduleSettings.bHideMarkerSettings then
|
|||||||
name = "|c"..self.configColor..L["Marker Settings"].."|r",
|
name = "|c"..self.configColor..L["Marker Settings"].."|r",
|
||||||
desc = L["Create or remove markers at various points along the bar here"],
|
desc = L["Create or remove markers at various points along the bar here"],
|
||||||
order = 32,
|
order = 32,
|
||||||
disabled = function()
|
|
||||||
return not self.moduleSettings.enabled
|
|
||||||
end,
|
|
||||||
args = {
|
args = {
|
||||||
markerPos = {
|
markerPos = {
|
||||||
type = "range",
|
type = "range",
|
||||||
@ -685,6 +700,9 @@ if not self.moduleSettings.bHideMarkerSettings then
|
|||||||
set = function(info, v)
|
set = function(info, v)
|
||||||
lastMarkerPosConfig = math.floor(v)
|
lastMarkerPosConfig = math.floor(v)
|
||||||
end,
|
end,
|
||||||
|
disabled = function()
|
||||||
|
return not self.moduleSettings.enabled
|
||||||
|
end,
|
||||||
order = 20,
|
order = 20,
|
||||||
},
|
},
|
||||||
markerColor = {
|
markerColor = {
|
||||||
@ -698,6 +716,9 @@ if not self.moduleSettings.bHideMarkerSettings then
|
|||||||
set = function(info, r, g, b, a)
|
set = function(info, r, g, b, a)
|
||||||
lastMarkerColorConfig = {r=r, g=g, b=b, a=a}
|
lastMarkerColorConfig = {r=r, g=g, b=b, a=a}
|
||||||
end,
|
end,
|
||||||
|
disabled = function()
|
||||||
|
return not self.moduleSettings.enabled
|
||||||
|
end,
|
||||||
order = 30,
|
order = 30,
|
||||||
},
|
},
|
||||||
markerHeight = {
|
markerHeight = {
|
||||||
@ -713,6 +734,9 @@ if not self.moduleSettings.bHideMarkerSettings then
|
|||||||
set = function(info, v)
|
set = function(info, v)
|
||||||
lastMarkerHeightConfig = v
|
lastMarkerHeightConfig = v
|
||||||
end,
|
end,
|
||||||
|
disabled = function()
|
||||||
|
return not self.moduleSettings.enabled
|
||||||
|
end,
|
||||||
order = 40,
|
order = 40,
|
||||||
},
|
},
|
||||||
createMarker = {
|
createMarker = {
|
||||||
@ -723,6 +747,9 @@ if not self.moduleSettings.bHideMarkerSettings then
|
|||||||
func = function()
|
func = function()
|
||||||
self:AddNewMarker(lastMarkerPosConfig / 100, lastMarkerColorConfig, lastMarkerHeightConfig)
|
self:AddNewMarker(lastMarkerPosConfig / 100, lastMarkerColorConfig, lastMarkerHeightConfig)
|
||||||
end,
|
end,
|
||||||
|
disabled = function()
|
||||||
|
return not self.moduleSettings.enabled
|
||||||
|
end,
|
||||||
order = 10,
|
order = 10,
|
||||||
},
|
},
|
||||||
listMarkers = {
|
listMarkers = {
|
||||||
@ -748,6 +775,9 @@ if not self.moduleSettings.bHideMarkerSettings then
|
|||||||
lastMarkerColorConfig = {r=color.r, g=color.g, b=color.b, a=color.a}
|
lastMarkerColorConfig = {r=color.r, g=color.g, b=color.b, a=color.a}
|
||||||
lastMarkerHeightConfig = self.moduleSettings.markers[v].height
|
lastMarkerHeightConfig = self.moduleSettings.markers[v].height
|
||||||
end,
|
end,
|
||||||
|
disabled = function()
|
||||||
|
return not self.moduleSettings.enabled
|
||||||
|
end,
|
||||||
order = 50,
|
order = 50,
|
||||||
},
|
},
|
||||||
editMarker = {
|
editMarker = {
|
||||||
@ -759,6 +789,9 @@ if not self.moduleSettings.bHideMarkerSettings then
|
|||||||
self:EditMarker(lastEditMarkerConfig, lastMarkerPosConfig / 100, lastMarkerColorConfig, lastMarkerHeightConfig)
|
self:EditMarker(lastEditMarkerConfig, lastMarkerPosConfig / 100, lastMarkerColorConfig, lastMarkerHeightConfig)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
disabled = function()
|
||||||
|
return not self.moduleSettings.enabled
|
||||||
|
end,
|
||||||
order = 60,
|
order = 60,
|
||||||
},
|
},
|
||||||
deleteMarker = {
|
deleteMarker = {
|
||||||
@ -770,6 +803,9 @@ if not self.moduleSettings.bHideMarkerSettings then
|
|||||||
self:RemoveMarker(lastEditMarkerConfig)
|
self:RemoveMarker(lastEditMarkerConfig)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
disabled = function()
|
||||||
|
return not self.moduleSettings.enabled
|
||||||
|
end,
|
||||||
order = 70,
|
order = 70,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -328,9 +328,6 @@ function PlayerHealth.prototype:GetOptions()
|
|||||||
type = 'group',
|
type = 'group',
|
||||||
name = "|c"..self.configColor..L["Icon Settings"].."|r",
|
name = "|c"..self.configColor..L["Icon Settings"].."|r",
|
||||||
desc = L["Settings related to icons"],
|
desc = L["Settings related to icons"],
|
||||||
disabled = function()
|
|
||||||
return not self.moduleSettings.enabled
|
|
||||||
end,
|
|
||||||
args = {
|
args = {
|
||||||
iconConfigMode = {
|
iconConfigMode = {
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
@ -343,6 +340,9 @@ function PlayerHealth.prototype:GetOptions()
|
|||||||
configMode = v
|
configMode = v
|
||||||
self:EnteringWorld()
|
self:EnteringWorld()
|
||||||
end,
|
end,
|
||||||
|
disabled = function()
|
||||||
|
return not self.moduleSettings.enabled
|
||||||
|
end,
|
||||||
order = 5
|
order = 5
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -357,6 +357,9 @@ function PlayerHealth.prototype:GetOptions()
|
|||||||
self.moduleSettings.lockIconAlpha = v
|
self.moduleSettings.lockIconAlpha = v
|
||||||
self:Redraw()
|
self:Redraw()
|
||||||
end,
|
end,
|
||||||
|
disabled = function()
|
||||||
|
return not self.moduleSettings.enabled
|
||||||
|
end,
|
||||||
order = 6
|
order = 6
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -186,9 +186,6 @@ end
|
|||||||
type = 'group',
|
type = 'group',
|
||||||
name = "|c"..self.configColor..L["Icon Settings"].."|r",
|
name = "|c"..self.configColor..L["Icon Settings"].."|r",
|
||||||
desc = L["Settings related to icons"],
|
desc = L["Settings related to icons"],
|
||||||
disabled = function()
|
|
||||||
return not self.moduleSettings.enabled
|
|
||||||
end,
|
|
||||||
args = {
|
args = {
|
||||||
iconConfigMode = {
|
iconConfigMode = {
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
@ -204,6 +201,9 @@ end
|
|||||||
self:CheckPartyRole()
|
self:CheckPartyRole()
|
||||||
self:Redraw()
|
self:Redraw()
|
||||||
end,
|
end,
|
||||||
|
disabled = function()
|
||||||
|
return not self.moduleSettings.enabled
|
||||||
|
end,
|
||||||
order = 5
|
order = 5
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -218,6 +218,9 @@ end
|
|||||||
self.moduleSettings.lockIconAlpha = v
|
self.moduleSettings.lockIconAlpha = v
|
||||||
self:Redraw()
|
self:Redraw()
|
||||||
end,
|
end,
|
||||||
|
disabled = function()
|
||||||
|
return not self.moduleSettings.enabled
|
||||||
|
end,
|
||||||
order = 6
|
order = 6
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user