- converted most of the mod to ace3. the only ace2 remaining is AceEvent-2 (probably easy to get away from) and AceOO-2 (not so easy)

- the ace3 conversion also broke the dependence on Waterfall and gave a much better configuration screen through AceConfigDialog; plus Waterfall is very broken in Cataclysm and it's unclear whether anyone will bother to fix it or not
- fixed a bug with the custom CD bar when changing profiles where it would generate endless errors until a reloadui
- removed DewDrop library as it was no longer in use
- temporarily removed FuBar plugin as it doesn't work as a mixin with AceAddon-3. i will eventually be bringing this back in some form (before the next full release version)
- removed an unused 'about' button on the config page and some empty headers...not sure why they were ever there
This commit is contained in:
Parnic
2010-09-05 20:11:33 +00:00
parent 5a7f8ffa38
commit 59344a134a
45 changed files with 676 additions and 749 deletions

View File

@ -2,20 +2,45 @@ package-as: IceHUD
externals:
libs/AceLibrary: svn://svn.wowace.com/wow/ace2/mainline/trunk/AceLibrary
libs/CallbackHandler-1.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/CallbackHandler-1.0
libs/CallbackHandler-1.0:
url: svn://svn.wowace.com/wow/ace3/mainline/trunk/CallbackHandler-1.0
tag: latest
libs/AceEvent-2.0: svn://svn.wowace.com/wow/ace2/mainline/trunk/AceEvent-2.0
libs/AceDB-2.0: svn://svn.wowace.com/wow/ace2/mainline/trunk/AceDB-2.0
libs/AceDB-3.0:
url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceDB-3.0
tag: latest
libs/AceDBOptions-3.0:
url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceDBOptions-3.0
tag: latest
libs/AceConfig-3.0:
url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceConfig-3.0
tag: latest
libs/AceGUI-3.0:
url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceGUI-3.0
tag: latest
libs/AceOO-2.0: svn://svn.wowace.com/wow/ace2/mainline/trunk/AceOO-2.0
libs/AceAddon-2.0: svn://svn.wowace.com/wow/ace2/mainline/trunk/AceAddon-2.0
libs/AceConsole-2.0: svn://svn.wowace.com/wow/ace2/mainline/trunk/AceConsole-2.0
libs/Deformat-2.0: svn://svn.wowace.com/wow/deformat/mainline/trunk/Deformat-2.0
libs/Dewdrop-2.0: svn://svn.wowace.com/wow/dewdroplib/mainline/trunk/Dewdrop-2.0
libs/AceAddon-3.0:
url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceAddon-3.0
tag: latest
libs/AceConsole-3.0:
url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceConsole-3.0
tag: latest
libs/Deformat-2.0:
url: svn://svn.wowace.com/wow/deformat/mainline/trunk/Deformat-2.0
tag: latest
libs/FuBarPlugin-2.0: svn://svn.wowace.com/wow/fubarplugin-2-0/mainline/trunk/FuBarPlugin-2.0
libs/LibDogTag-Unit-3.0: svn://svn.wowace.com/wow/libdogtag-unit-3-0/mainline/trunk
libs/LibRangeCheck-2.0: svn://svn.wowace.com/wow/librangecheck-2-0/mainline/trunk/LibRangeCheck-2.0
libs/LibSharedMedia-3.0: svn://svn.wowace.com/wow/libsharedmedia-3-0/mainline/trunk
libs/LibDogTag-3.0: svn://svn.wowace.com/wow/libdogtag-3-0/mainline/trunk
libs/Waterfall-1.0: svn://svn.wowace.com/wow/waterfall-1-0/mainline/trunk/Waterfall-1.0
libs/LibRangeCheck-2.0:
url: svn://svn.wowace.com/wow/librangecheck-2-0/mainline/trunk/LibRangeCheck-2.0
tag: latest
libs/LibSharedMedia-3.0:
url: svn://svn.wowace.com/wow/libsharedmedia-3-0/mainline/trunk
tag: latest
libs/LibDogTag-3.0:
url: svn://svn.wowace.com/wow/libdogtag-3-0/mainline/trunk
tag: latest
libs/LibDogTag-Unit-3.0:
url: svn://svn.wowace.com/wow/libdogtag-unit-3-0/mainline/trunk
tag: latest
optional-dependencies:
- libdogtag-3-0

View File

@ -111,25 +111,25 @@ function IceBarElement.prototype:GetOptions()
}
opts["side"] =
{
type = 'text',
type = 'select',
name = '|c' .. self.configColor .. 'Side|r',
desc = 'Side of the HUD where the bar appears',
get = function()
get = function(info)
if (self.moduleSettings.side == IceCore.Side.Right) then
return "Right"
return 2
else
return "Left"
return 1
end
end,
set = function(value)
if (value == "Right") then
set = function(info, value)
if (value == 2) then
self.moduleSettings.side = IceCore.Side.Right
else
self.moduleSettings.side = IceCore.Side.Left
end
self:Redraw()
end,
validate = { "Left", "Right" },
values = { "Left", "Right" },
disabled = function()
return not self.moduleSettings.enabled
end,
@ -147,7 +147,7 @@ function IceBarElement.prototype:GetOptions()
get = function()
return self.moduleSettings.offset
end,
set = function(value)
set = function(info, value)
self.moduleSettings.offset = value
self:Redraw()
end,
@ -169,7 +169,7 @@ function IceBarElement.prototype:GetOptions()
get = function()
return self.moduleSettings.scale
end,
set = function(value)
set = function(info, value)
self.moduleSettings.scale = value
self:Redraw()
end,
@ -187,7 +187,7 @@ function IceBarElement.prototype:GetOptions()
get = function()
return self.moduleSettings.inverse
end,
set = function(value)
set = function(info, value)
self.moduleSettings.inverse = value
self:SetBarFramePoints()
self:Redraw()
@ -206,7 +206,7 @@ function IceBarElement.prototype:GetOptions()
get = function()
return self.moduleSettings.reverse
end,
set = function(value)
set = function(info, value)
self.moduleSettings.reverse = value
self:SetBarFramePoints()
self:Redraw()
@ -229,7 +229,7 @@ function IceBarElement.prototype:GetOptions()
get = function()
return self.moduleSettings.barVisible['bar']
end,
set = function(v)
set = function(info, v)
self.moduleSettings.barVisible['bar'] = v
if v then
self.barFrame:Show()
@ -250,7 +250,7 @@ function IceBarElement.prototype:GetOptions()
get = function()
return self.moduleSettings.barVisible['bg']
end,
set = function(v)
set = function(info, v)
self.moduleSettings.barVisible['bg'] = v
if v then
self.frame.bg:Show()
@ -277,7 +277,7 @@ if not self.moduleSettings.hideAnimationSettings then
get = function()
return self.moduleSettings.shouldAnimate
end,
set = function(value)
set = function(info, value)
self.moduleSettings.shouldAnimate = value
self:Redraw()
end,
@ -298,7 +298,7 @@ if not self.moduleSettings.hideAnimationSettings then
get = function()
return self.moduleSettings.desiredLerpTime
end,
set = function(value)
set = function(info, value)
self.moduleSettings.desiredLerpTime = value
end,
disabled = function()
@ -319,7 +319,7 @@ end
get = function()
return self.moduleSettings.widthModifier
end,
set = function(v)
set = function(info, v)
self.moduleSettings.widthModifier = v
self:Redraw()
end,
@ -340,7 +340,7 @@ end
get = function()
return self.moduleSettings.barVerticalOffset
end,
set = function(v)
set = function(info, v)
self.moduleSettings.barVerticalOffset = v
self:Redraw()
end,
@ -358,9 +358,9 @@ end
get = function()
return self.moduleSettings.shouldUseOverride
end,
set = function(value)
set = function(info, value)
self.moduleSettings.shouldUseOverride = value
AceLibrary("Waterfall-1.0"):Refresh("IceHUD")
IceHUD:NotifyOptionsChange()
self:Redraw()
end,
disabled = function()
@ -371,20 +371,20 @@ end
opts["barTextureOverride"] =
{
type = 'text',
type = 'select',
name = 'Bar Texture Override',
desc = 'This will override the global bar texture setting for this bar.',
get = function()
return self.moduleSettings.barTextureOverride
get = function(info)
return IceHUD:GetSelectValue(info, self.moduleSettings.barTextureOverride)
end,
set = function(value)
self.moduleSettings.barTextureOverride = value
set = function(info, value)
self.moduleSettings.barTextureOverride = info.option.values[value]
self:Redraw()
end,
disabled = function()
return not self:IsEnabled() or not self.moduleSettings.shouldUseOverride
end,
validate = IceHUD.validBarList,
values = IceHUD.validBarList,
order = 36
}
@ -405,7 +405,7 @@ end
get = function()
return self.moduleSettings.barFontSize
end,
set = function(v)
set = function(info, v)
self.moduleSettings.barFontSize = v
self:Redraw()
end,
@ -422,7 +422,7 @@ end
get = function()
return self.moduleSettings.lockUpperTextAlpha
end,
set = function(v)
set = function(info, v)
self.moduleSettings.lockUpperTextAlpha = v
self:Redraw()
end,
@ -436,7 +436,7 @@ end
get = function()
return self.moduleSettings.lockLowerTextAlpha
end,
set = function(v)
set = function(info, v)
self.moduleSettings.lockLowerTextAlpha = v
self:Redraw()
end,
@ -450,7 +450,7 @@ end
get = function()
return self.moduleSettings.textVisible['upper']
end,
set = function(v)
set = function(info, v)
self.moduleSettings.textVisible['upper'] = v
self:Redraw()
end,
@ -464,7 +464,7 @@ end
get = function()
return self.moduleSettings.textVisible['lower']
end,
set = function(v)
set = function(info, v)
self.moduleSettings.textVisible['lower'] = v
self:Redraw()
end,
@ -472,7 +472,7 @@ end
},
upperTextString = {
type = 'text',
type = 'input',
name = 'Upper Text',
desc = 'The upper text to display under this bar (accepts LibDogTag formatting)\n\nSee http://www.wowace.com/wiki/LibDogTag-2.0/ or type /dogtag for tag info.\n\nRemember to press ENTER after filling out this box or it will not save.',
hidden = function()
@ -481,7 +481,7 @@ end
get = function()
return self.moduleSettings.upperText
end,
set = function(v)
set = function(info, v)
if DogTag ~= nil and v ~= '' and v ~= nil then
v = DogTag:CleanCode(v)
end
@ -490,11 +490,12 @@ end
self:RegisterFontStrings()
self:Redraw()
end,
multiline = true,
usage = "<upper text to display>"
},
lowerTextString = {
type = 'text',
type = 'input',
name = 'Lower Text',
desc = 'The lower text to display under this bar (accepts LibDogTag formatting)\n\nSee http://www.wowace.com/wiki/LibDogTag-2.0/ or type /dogtag for tag info.\n\nRemember to press ENTER after filling out this box or it will not save.',
hidden = function()
@ -503,7 +504,7 @@ end
get = function()
return self.moduleSettings.lowerText
end,
set = function(v)
set = function(info, v)
if DogTag ~= nil and v ~= '' and v ~= nil then
v = DogTag:CleanCode(v)
end
@ -512,21 +513,22 @@ end
self:RegisterFontStrings()
self:Redraw()
end,
multiline = true,
usage = "<lower text to display>"
},
forceJustifyText = {
type = 'text',
type = 'select',
name = 'Force Text Justification',
desc = 'This sets the alignment for the text on this bar',
get = function()
get = function(info)
return self.moduleSettings.forceJustifyText
end,
set = function(value)
set = function(info, value)
self.moduleSettings.forceJustifyText = value
self:Redraw()
end,
validate = { NONE = "None", LEFT = "Left", RIGHT = "Right" },
values = { NONE = "None", LEFT = "Left", RIGHT = "Right" },
disabled = function()
return not self.moduleSettings.enabled
end,
@ -542,7 +544,7 @@ end
get = function()
return self.moduleSettings.textVerticalOffset
end,
set = function(v)
set = function(info, v)
self.moduleSettings.textVerticalOffset = v
self:Redraw()
end,
@ -561,7 +563,7 @@ end
get = function()
return self.moduleSettings.textHorizontalOffset
end,
set = function(v)
set = function(info, v)
self.moduleSettings.textHorizontalOffset = v
self:Redraw()
end,

View File

@ -84,7 +84,7 @@ function IceCastBar.prototype:GetOptions()
get = function()
return self.moduleSettings.showCastTime
end,
set = function(value)
set = function(info, value)
self.moduleSettings.showCastTime = value
end,
disabled = function()
@ -101,7 +101,7 @@ function IceCastBar.prototype:GetOptions()
get = function()
return self.moduleSettings.showSpellRank
end,
set = function(value)
set = function(info, value)
self.moduleSettings.showSpellRank = value
end,
disabled = function()
@ -123,7 +123,7 @@ function IceCastBar.prototype:GetOptions()
get = function()
return self.moduleSettings.displayAuraIcon
end,
set = function(v)
set = function(info, v)
self.moduleSettings.displayAuraIcon = v
if self.barFrame.icon then
if v then
@ -136,7 +136,6 @@ function IceCastBar.prototype:GetOptions()
disabled = function()
return not self.moduleSettings.enabled
end,
usage = "<whether or not to display an icon for this bar's tracked spell>",
order = 51,
}
@ -150,14 +149,13 @@ function IceCastBar.prototype:GetOptions()
get = function()
return self.moduleSettings.auraIconXOffset
end,
set = function(v)
set = function(info, v)
self.moduleSettings.auraIconXOffset = v
self:PositionIcons()
end,
disabled = function()
return not self.moduleSettings.enabled or not self.moduleSettings.displayAuraIcon
end,
usage = "<adjusts the spell icon's horizontal position>",
order = 52,
}
@ -171,14 +169,13 @@ function IceCastBar.prototype:GetOptions()
get = function()
return self.moduleSettings.auraIconYOffset
end,
set = function(v)
set = function(info, v)
self.moduleSettings.auraIconYOffset = v
self:PositionIcons()
end,
disabled = function()
return not self.moduleSettings.enabled or not self.moduleSettings.displayAuraIcon
end,
usage = "<adjusts the spell icon's vertical position>",
order = 53,
}
@ -192,14 +189,13 @@ function IceCastBar.prototype:GetOptions()
get = function()
return self.moduleSettings.auraIconScale
end,
set = function(v)
set = function(info, v)
self.moduleSettings.auraIconScale = v
self:PositionIcons()
end,
disabled = function()
return not self.moduleSettings.enabled or not self.moduleSettings.displayAuraIcon
end,
usage = "<adjusts the spell icon's size>",
order = 54,
}
@ -210,13 +206,12 @@ function IceCastBar.prototype:GetOptions()
get = function()
return self.moduleSettings.reverseChannel
end,
set = function(v)
set = function(info, v)
self.moduleSettings.reverseChannel = v
end,
disabled = function()
return not self.moduleSettings.enabled
end,
usage = "<whether or not to reverse the direction of a channel's castbar>",
order = 32.5,
}

View File

@ -1,6 +1,6 @@
local AceOO = AceLibrary("AceOO-2.0")
IceCore = AceOO.Class("AceEvent-2.0", "AceDB-2.0")
IceCore = AceOO.Class("AceEvent-2.0")
IceCore.Side = { Left = "LEFT", Right = "RIGHT" }
@ -25,8 +25,6 @@ IceCore.prototype.presets = {}
IceCore.prototype.settingsHash = nil
IceCore.prototype.bConfigMode = false
local waterfall = AceLibrary("Waterfall-1.0")
-- Constructor --
function IceCore.prototype:init()
IceCore.super.prototype.init(self)
@ -47,6 +45,7 @@ function IceCore.prototype:SetupDefaults()
-- DEFAULT SETTINGS
local defaultPreset = "RoundBar"
self.defaults = {
profile = {
gap = 150,
verticalPos = -110,
horizontalPos = 0,
@ -76,21 +75,22 @@ function IceCore.prototype:SetupDefaults()
updatePeriod = 0.1
}
}
self:LoadPresets()
for k, v in pairs(self.presets[defaultPreset]) do
self.defaults[k] = v
self.defaults.profile[k] = v
end
-- get default settings from the modules
self.defaults.modules = {}
self.defaults.profile.modules = {}
for i = 1, table.getn(self.elements) do
local name = self.elements[i]:GetElementName()
self.defaults.modules[name] = self.elements[i]:GetDefaultSettings()
self.defaults.profile.modules[name] = self.elements[i]:GetDefaultSettings()
end
if (table.getn(self.elements) > 0) then
self.defaults.colors = self.elements[1].defaultColors
self.defaults.profile.colors = self.elements[1].defaultColors
end
end
@ -256,6 +256,7 @@ function IceCore.prototype:Disable()
end
self.IceHUDFrame:Hide()
self:EmptyUpdates()
self.enabled = false
end
@ -315,7 +316,7 @@ function IceCore.prototype:GetColorOptions()
get = function()
return IceHUD.IceCore:GetColor(kk)
end,
set = function(r, g, b)
set = function(info, r, g, b)
local color = k
IceHUD.IceCore:SetColor(kk, r, g, b)
end
@ -529,7 +530,7 @@ function IceCore.prototype:ChangePreset(value)
self:SetBarBlendMode(self.presets[value].barBlendMode)
self:SetBarBgBlendMode(self.presets[value].barBgBlendMode)
waterfall:Refresh("IceHUD")
IceHUD:NotifyOptionsChange()
end
@ -655,6 +656,12 @@ function IceCore.prototype:IsUpdateSubscribed(frame)
return self.updatees[frame] ~= nil
end
function IceCore.prototype:EmptyUpdates()
self.IceHUDFrame:SetScript("OnUpdate", nil)
self.updatees = {}
self.updatee_count = 0
end
-------------------------------------------------------------------------------
-- Presets --
-------------------------------------------------------------------------------

View File

@ -121,7 +121,7 @@ function IceElement.prototype:GetOptions()
get = function()
return self.moduleSettings.enabled
end,
set = function(value)
set = function(info, value)
self.moduleSettings.enabled = value
if (value) then
self:Enable(true)
@ -145,7 +145,7 @@ function IceElement.prototype:GetOptions()
get = function()
return self.moduleSettings.scale
end,
set = function(value)
set = function(info, value)
self.moduleSettings.scale = value
self:Redraw()
end,
@ -163,7 +163,7 @@ function IceElement.prototype:GetOptions()
get = function()
return self.moduleSettings.alwaysFullAlpha
end,
set = function(value)
set = function(info, value)
self.moduleSettings.alwaysFullAlpha = value
self:Update(self.unit)
self:Redraw()

View File

@ -1,7 +1,8 @@
IceHUD = AceLibrary("AceAddon-2.0"):new("AceConsole-2.0", "AceDB-2.0", "FuBarPlugin-2.0")
IceHUD = LibStub("AceAddon-3.0"):NewAddon("IceHUD", "AceConsole-3.0")
local waterfall = AceLibrary("Waterfall-1.0")
local SML = AceLibrary("LibSharedMedia-3.0")
local ACR = LibStub("AceConfigRegistry-3.0")
local ConfigDialog = LibStub("AceConfigDialog-3.0")
IceHUD.CurrTagVersion = 3
IceHUD.debugging = false
@ -38,7 +39,7 @@ IceHUD.options =
get = function()
return IceHUD.IceCore:GetVerticalPos()
end,
set = function(v)
set = function(info, v)
IceHUD.IceCore:SetVerticalPos(v)
end,
min = -700,
@ -54,7 +55,7 @@ IceHUD.options =
get = function()
return IceHUD.IceCore:GetHorizontalPos()
end,
set = function(v)
set = function(info, v)
IceHUD.IceCore:SetHorizontalPos(v)
end,
min = -2000,
@ -70,7 +71,7 @@ IceHUD.options =
get = function()
return IceHUD.IceCore:GetGap()
end,
set = function(v)
set = function(info, v)
IceHUD.IceCore:SetGap(v)
end,
min = 50,
@ -86,7 +87,7 @@ IceHUD.options =
get = function()
return IceHUD.IceCore:GetScale()
end,
set = function(v)
set = function(info, v)
IceHUD.IceCore:SetScale(v)
end,
min = 0.5,
@ -118,7 +119,7 @@ IceHUD.options =
get = function()
return IceHUD.IceCore:GetAlpha("IC")
end,
set = function(v)
set = function(info, v)
IceHUD.IceCore:SetAlpha("IC", v)
end,
min = 0,
@ -135,7 +136,7 @@ IceHUD.options =
get = function()
return IceHUD.IceCore:GetAlpha("OOC")
end,
set = function(v)
set = function(info, v)
IceHUD.IceCore:SetAlpha("OOC", v)
end,
min = 0,
@ -152,7 +153,7 @@ IceHUD.options =
get = function()
return IceHUD.IceCore:GetAlpha("Target")
end,
set = function(v)
set = function(info, v)
IceHUD.IceCore:SetAlpha("Target", v)
end,
min = 0,
@ -169,7 +170,7 @@ IceHUD.options =
get = function()
return IceHUD.IceCore:GetAlpha("NotFull")
end,
set = function(v)
set = function(info, v)
IceHUD.IceCore:SetAlpha("NotFull", v)
end,
min = 0,
@ -180,8 +181,6 @@ IceHUD.options =
},
headerAlphaBackgroundBlank = { type = 'header', name = " ", order = 20 },
headerAlphaBackground = {
type = 'header',
name = "Background Alpha",
@ -195,7 +194,7 @@ IceHUD.options =
get = function()
return IceHUD.IceCore:GetAlphaBG("IC")
end,
set = function(v)
set = function(info, v)
IceHUD.IceCore:SetAlphaBG("IC", v)
end,
min = 0,
@ -212,7 +211,7 @@ IceHUD.options =
get = function()
return IceHUD.IceCore:GetAlphaBG("OOC")
end,
set = function(v)
set = function(info, v)
IceHUD.IceCore:SetAlphaBG("OOC", v)
end,
min = 0,
@ -229,7 +228,7 @@ IceHUD.options =
get = function()
return IceHUD.IceCore:GetAlphaBG("Target")
end,
set = function(v)
set = function(info, v)
IceHUD.IceCore:SetAlphaBG("Target", v)
end,
min = 0,
@ -246,7 +245,7 @@ IceHUD.options =
get = function()
return IceHUD.IceCore:GetAlphaBG("NotFull")
end,
set = function(v)
set = function(info, v)
IceHUD.IceCore:SetAlphaBG("NotFull", v)
end,
min = 0,
@ -257,7 +256,6 @@ IceHUD.options =
},
headerBarAdvancedBlank = { type = 'header', name = " ", order = 30 },
headerBarAdvanced = {
type = 'header',
name = "Other",
@ -271,7 +269,7 @@ IceHUD.options =
get = function()
return IceHUD.IceCore:GetBackgroundToggle()
end,
set = function(value)
set = function(info, value)
IceHUD.IceCore:SetBackgroundToggle(value)
end,
order = 31
@ -284,7 +282,7 @@ IceHUD.options =
get = function()
return IceHUD.IceCore:GetBackgroundColor()
end,
set = function(r, g, b)
set = function(info, r, g, b)
IceHUD.IceCore:SetBackgroundColor(r, g, b)
end,
order = 32,
@ -294,17 +292,17 @@ IceHUD.options =
textSettings = {
type = 'text',
type = 'select',
name = 'Font',
desc = 'IceHUD Font',
order = 19,
get = function()
return IceHUD.IceCore:GetFontFamily()
get = function(info)
return IceHUD:GetSelectValue(info, IceHUD.IceCore:GetFontFamily())
end,
set = function(value)
IceHUD.IceCore:SetFontFamily(value)
set = function(info, value)
IceHUD.IceCore:SetFontFamily(info.option.values[value])
end,
validate = SML:List('font'),
values = SML:List('font'),
},
barSettings = {
@ -314,21 +312,20 @@ IceHUD.options =
order = 20,
args = {
barPresets = {
type = 'text',
type = 'select',
name = 'Presets',
desc = 'Predefined settings for different bars',
get = function()
return IceHUD.IceCore:GetBarPreset()
get = function(info)
return IceHUD:GetSelectValue(info, IceHUD.IceCore:GetBarPreset())
end,
set = function(value)
IceHUD.IceCore:SetBarPreset(value)
set = function(info, value)
IceHUD.IceCore:SetBarPreset(info.option.values[value])
end,
validate = IceHUD.validBarList,
values = IceHUD.validBarList,
order = 9
},
headerBarAdvancedBlank = { type = 'header', name = " ", order = 10 },
headerBarAdvanced = {
type = 'header',
name = "Advanced Bar Settings",
@ -336,16 +333,16 @@ IceHUD.options =
},
barTexture = {
type = 'text',
type = 'select',
name = 'Bar Texture',
desc = 'IceHUD Bar Texture',
get = function()
return IceHUD.IceCore:GetBarTexture()
get = function(info)
return IceHUD:GetSelectValue(info, IceHUD.IceCore:GetBarTexture())
end,
set = function(value)
IceHUD.IceCore:SetBarTexture(value)
set = function(info, value)
IceHUD.IceCore:SetBarTexture(IceHUD.validBarList[value])
end,
validate = IceHUD.validBarList,
values = IceHUD.validBarList,
order = 11
},
@ -356,7 +353,7 @@ IceHUD.options =
get = function()
return IceHUD.IceCore:GetBarWidth()
end,
set = function(v)
set = function(info, v)
IceHUD.IceCore:SetBarWidth(v)
end,
min = 20,
@ -372,7 +369,7 @@ IceHUD.options =
get = function()
return IceHUD.IceCore:GetBarHeight()
end,
set = function(v)
set = function(info, v)
IceHUD.IceCore:SetBarHeight(v)
end,
min = 100,
@ -388,7 +385,7 @@ IceHUD.options =
get = function()
return IceHUD.IceCore:GetBarProportion()
end,
set = function(v)
set = function(info, v)
IceHUD.IceCore:SetBarProportion(v)
end,
min = 0.01,
@ -405,7 +402,7 @@ IceHUD.options =
get = function()
return IceHUD.IceCore:GetBarSpace()
end,
set = function(v)
set = function(info, v)
IceHUD.IceCore:SetBarSpace(v)
end,
min = -10,
@ -415,30 +412,30 @@ IceHUD.options =
},
bgBlendMode = {
type = 'text',
type = 'select',
name = 'Bar Background Blend Mode',
desc = 'IceHUD Bar Background Blend mode',
get = function()
get = function(info)
return IceHUD.IceCore:GetBarBgBlendMode()
end,
set = function(value)
set = function(info, value)
IceHUD.IceCore:SetBarBgBlendMode(value)
end,
validate = { BLEND = "Blend", ADD = "Additive" }, --"Disable", "Alphakey", "Mod" },
values = { BLEND = "Blend", ADD = "Additive" }, --"Disable", "Alphakey", "Mod" },
order = 16
},
barBlendMode = {
type = 'text',
type = 'select',
name = 'Bar Blend Mode',
desc = 'IceHUD Bar Blend mode',
get = function()
get = function(info)
return IceHUD.IceCore:GetBarBlendMode()
end,
set = function(value)
set = function(info, value)
IceHUD.IceCore:SetBarBlendMode(value)
end,
validate = { BLEND = "Blend", ADD = "Additive" }, --"Disable", "Alphakey", "Mod" },
values = { BLEND = "Blend", ADD = "Additive" }, --"Disable", "Alphakey", "Mod" },
order = 17
},
}
@ -461,7 +458,6 @@ IceHUD.options =
order = 42
},
headerOtherBlank = { type = 'header', name = ' ', order = 90 },
headerOther = {
type = 'header',
name = 'Other',
@ -475,7 +471,7 @@ IceHUD.options =
get = function()
return IceHUD.IceCore:IsEnabled()
end,
set = function(value)
set = function(info, value)
if (value) then
IceHUD.IceCore:Enable()
else
@ -492,7 +488,7 @@ IceHUD.options =
get = function()
return IceHUD.IceCore:GetDebug()
end,
set = function(value)
set = function(info, value)
IceHUD.IceCore:SetDebug(value)
end,
order = 92
@ -508,16 +504,6 @@ IceHUD.options =
order = 93
},
about = {
type = 'execute',
name = 'About',
desc = "Prints info about IceHUD",
func = function()
IceHUD:PrintAddonInfo()
end,
order = 94
},
customBar = {
type = 'execute',
name = 'Create custom bar',
@ -586,7 +572,7 @@ IceHUD.options =
get = function()
return IceHUD.IceCore:IsInConfigMode()
end,
set = function(value)
set = function(info, value)
IceHUD.IceCore:ConfigModeToggle(value)
end,
order = 95
@ -599,7 +585,7 @@ IceHUD.options =
get = function()
return IceHUD.IceCore:ShouldUseDogTags()
end,
set = function(v)
set = function(info, v)
StaticPopupDialogs["ICEHUD_CHANGED_DOGTAG"] = {
text = "This option requires the UI to be reloaded. Do you wish to reload it now?",
button1 = "Yes",
@ -627,7 +613,7 @@ IceHUD.options =
get = function()
return IceHUD.IceCore:UpdatePeriod()
end,
set = function(v)
set = function(info, v)
IceHUD.IceCore:SetUpdatePeriod(v)
end,
min = 0.01,
@ -639,22 +625,6 @@ IceHUD.options =
}
IceHUD.slashMenu =
{
type = 'execute',
func = function()
if waterfall:IsOpen("IceHUD") then
waterfall:Close("IceHUD")
elseif not (UnitAffectingCombat("player")) then
waterfall:Open("IceHUD")
else
DEFAULT_CHAT_FRAME:AddMessage("|cff8888ffIceHUD|r: Combat lockdown restriction." ..
" Leave combat and try again.")
end
end
}
StaticPopupDialogs["ICEHUD_RESET"] =
{
text = "Are you sure you want to reset IceHUD settings?",
@ -731,22 +701,24 @@ function IceHUD:OnInitialize()
self:SetDebugging(false)
self:Debug("IceHUD:OnInitialize()")
self:RegisterDB("IceCoreDB")
self.IceCore = IceCore:new()
self:RegisterDefaults('profile', self.IceCore.defaults)
self.db = LibStub("AceDB-3.0"):New("IceCoreDB", self.IceCore.defaults, "Default")
self.db.RegisterCallback(self, "OnProfileShutdown", "PreProfileChanged")
self.db.RegisterCallback(self, "OnProfileChanged", "PostProfileChanged")
self.db.RegisterCallback(self, "OnProfileReset", "ProfileReset")
self.db.RegisterCallback(self, "OnProfileCopied", "ProfileCopied")
self.IceCore.settings = self.db.profile
self.IceCore:SetModuleDatabases()
self:NotifyNewDb()
self:GenerateModuleOptions(true)
self.options.args.colors.args = self.IceCore:GetColorOptions()
self.options.args.profiles = LibStub("AceDBOptions-3.0"):GetOptionsTable(self.db)
waterfall:Register("IceHUD", 'aceOptions', IceHUD.options)
LibStub("AceConfig-3.0"):RegisterOptionsTable("IceHUD", self.options, "/icehudcl")
-- Parnic - added /icehudcl to make rock config pick this up
self:RegisterChatCommand({"/icehudcl"}, IceHUD.options)
self:RegisterChatCommand({ "/icehud" }, IceHUD.slashMenu)
ConfigDialog:SetDefaultSize("IceHUD", 750, 650)
self:RegisterChatCommand("icehud", function() IceHUD:OpenConfig() end)
self:RegisterChatCommand("rl", function() ReloadUI() end)
self:SyncSettingsVersions()
@ -754,13 +726,23 @@ function IceHUD:OnInitialize()
end
function IceHUD:NotifyNewDb()
self.IceCore.settings = self.db.profile
self.IceCore:SetModuleDatabases()
end
function IceHUD:GenerateModuleOptions(firstLoad)
self.options.args.modules.args = self.IceCore:GetModuleOptions()
if not firstLoad then
waterfall:Refresh("IceHUD")
if not firstLoad and ACR ~= nil then
IceHUD:NotifyOptionsChange()
end
end
function IceHUD:NotifyOptionsChange()
ACR:NotifyChange("IceHUD")
end
function IceHUD:OnEnable(isFirst)
self:Debug("IceHUD:OnEnable()")
@ -773,11 +755,6 @@ function IceHUD:OnEnable(isFirst)
end
end
function IceHUD:ResetSettings()
self:ResetDB()
ReloadUI()
end
-- add settings changes/updates here so that existing users don't lose their settings
function IceHUD:SyncSettingsVersions()
if not self.IceCore.settings.updatedOocNotFull then
@ -798,7 +775,7 @@ function IceHUD:InitLDB()
icon = "Interface\\Icons\\Spell_Frost_Frost",
OnClick = function(_, msg)
if not (UnitAffectingCombat("player")) then
waterfall:Open("IceHUD")
IceHUD:OpenConfig()
else
DEFAULT_CHAT_FRAME:AddMessage("|cff8888ffIceHUD|r: Combat lockdown restriction. Leave combat and try again.")
end
@ -813,13 +790,7 @@ IceHUD.hasIcon = "Interface\\Icons\\Spell_Frost_Frost"
IceHUD.hideWithoutStandby = true
IceHUD.independentProfile = true
function IceHUD.OnClick()
if not waterfall then return end
if waterfall:IsOpen("IceHUD") then
waterfall:Close("IceHUD")
else
waterfall:Open("IceHUD")
end
IceHUD:OpenConfig()
end
-- blizzard interface options
@ -829,10 +800,15 @@ blizOptionsPanel.button = CreateFrame("BUTTON", "IceHUDOpenConfigButton", blizOp
blizOptionsPanel.button:SetText("Open IceHUD configuration")
blizOptionsPanel.button:SetWidth(240)
blizOptionsPanel.button:SetHeight(30)
blizOptionsPanel.button:SetScript("OnClick", function(self) HideUIPanel(InterfaceOptionsFrame) HideUIPanel(GameMenuFrame) waterfall:Open("IceHUD") end)
blizOptionsPanel.button:SetScript("OnClick", function(self) HideUIPanel(InterfaceOptionsFrame) HideUIPanel(GameMenuFrame) IceHUD:OpenConfig() end)
blizOptionsPanel.button:SetPoint('TOPLEFT', blizOptionsPanel, 'TOPLEFT', 20, -20)
InterfaceOptions_AddCategory(blizOptionsPanel)
function IceHUD:OpenConfig()
if not ConfigDialog then return end
ConfigDialog:Open("IceHUD")
end
function IceHUD:Debug(msg)
if self.debugging then
self.debugFrame:AddMessage(msg)
@ -894,16 +870,22 @@ function IceHUD:OnDisable()
IceHUD.IceCore:Disable()
end
function IceHUD:OnProfileDisable()
function IceHUD:PreProfileChanged(db)
self.IceCore:Disable()
end
function IceHUD:OnProfileEnable(oldName, oldData)
self.IceCore.settings = self.db.profile
self.IceCore:SetModuleDatabases()
function IceHUD:PostProfileChanged(db, newProfile)
self:NotifyNewDb()
self.IceCore:Enable()
end
function IceHUD:ProfileReset()
ReloadUI()
end
function IceHUD:ProfileCopied()
ReloadUI()
end
function IceHUD:Clamp(value, min, max)
if value < min then
value = min
@ -933,3 +915,13 @@ end
function IceHUD:xor(val1, val2)
return val1 and not val2 or val2 and not val1
end
function IceHUD:GetSelectValue(info, val)
for k,v in pairs(info.option.values) do
if v == val then
return k
end
end
return 1
end

View File

@ -1,11 +1,11 @@
## Interface: 30300
## Author: Parnic, originally created by Iceroth
## Name: IceHUD
## Title: IceHUD |cff7fff7f -Ace2-|r
## Title: IceHUD |cff7fff7f -Ace2/3-|r
## Notes: Another HUD addon
## Version: @project-version@ (Revision: @project-revision@)
## SavedVariables: IceCoreDB
## OptionalDeps: Ace2, LibSharedMedia-3.0, Waterfall-1.0, Deformat, DewdropLib, LibDogTag-3.0, LibDogTag-Unit-3.0, FuBarPlugin-2.0, LibDruidMana-1.0, LibRangeCheck-2.0, LibHealComm-4.0
## OptionalDeps: Ace2, Ace3, LibSharedMedia-3.0, Deformat, LibDogTag-3.0, LibDogTag-Unit-3.0, FuBarPlugin-2.0, LibRangeCheck-2.0, LibHealComm-4.0
## X-Category: HUDs
## X-Website: http://www.wowace.com/projects/ice-hud/

View File

@ -77,7 +77,7 @@ function IceUnitBar.prototype:GetOptions()
get = function()
return self.moduleSettings.lowThreshold
end,
set = function(value)
set = function(info, value)
self.moduleSettings.lowThreshold = value
self:Redraw()
end,
@ -97,7 +97,7 @@ function IceUnitBar.prototype:GetOptions()
get = function()
return self.moduleSettings.lowThresholdFlash
end,
set = function(v)
set = function(info, v)
self.moduleSettings.lowThresholdFlash = v
end,
disabled = function()
@ -112,7 +112,7 @@ function IceUnitBar.prototype:GetOptions()
get = function()
return self.moduleSettings.lowThresholdColor
end,
set = function(value)
set = function(info, value)
self.moduleSettings.lowThresholdColor = value
self:Redraw()
end,

View File

@ -4,17 +4,16 @@
<Script file="libs\AceLibrary\AceLibrary.lua"/>
<Script file="libs\CallbackHandler-1.0\CallbackHandler-1.0.lua"/>
<Script file="libs\AceOO-2.0\AceOO-2.0.lua"/>
<Script file="libs\AceDB-2.0\AceDB-2.0.lua"/>
<Include file="libs\AceDB-3.0\AceDB-3.0.xml"/>
<Include file="libs\AceDBOptions-3.0\AceDBOptions-3.0.xml"/>
<Include file="libs\AceGUI-3.0\AceGUI-3.0.xml"/>
<Include file="libs\AceConfig-3.0\AceConfig-3.0.xml"/>
<Script file="libs\AceEvent-2.0\AceEvent-2.0.lua"/>
<Script file="libs\AceConsole-2.0\AceConsole-2.0.lua"/>
<Script file="libs\AceAddon-2.0\AceAddon-2.0.lua"/>
<Script file="libs\Dewdrop-2.0\Dewdrop-2.0.lua"/>
<Script file="libs\FuBarPlugin-2.0\FuBarPlugin-2.0.lua"/>
<Include file="libs\AceConsole-3.0\AceConsole-3.0.xml"/>
<Include file="libs\AceAddon-3.0\AceAddon-3.0.xml"/>
<Include file="libs\LibDogTag-3.0\lib.xml"/>
<Include file="libs\LibDogTag-Unit-3.0\lib.xml"/>
<Script file="libs\LibRangeCheck-2.0\LibRangeCheck-2.0.lua"/>
<Include file="libs\LibSharedMedia-3.0\lib.xml"/>
<Script file="libs\Deformat-2.0\Deformat-2.0.lua"/>
<Script file="libs\Waterfall-1.0\Waterfall-1.0.lua"/>
</Ui>

View File

@ -43,16 +43,16 @@ function CastBar.prototype:GetOptions()
opts["flashInstants"] =
{
type = 'text',
type = 'select',
name = "Flash Instant Spells",
desc = "Defines when cast bar should flash on instant spells",
get = function()
return self.moduleSettings.flashInstants
get = function(info)
return IceHUD:GetSelectValue(info, self.moduleSettings.flashInstants)
end,
set = function(value)
self.moduleSettings.flashInstants = value
set = function(info, value)
self.moduleSettings.flashInstants = info.option.values[value]
end,
validate = { "Always", "Caster", "Never" },
values = { "Always", "Caster", "Never" },
disabled = function()
return not self.moduleSettings.enabled
end,
@ -61,19 +61,19 @@ function CastBar.prototype:GetOptions()
opts["flashFailures"] =
{
type = "text",
type = 'select',
name = "Flash on Spell Failures",
desc = "Defines when cast bar should flash on failed spells",
get = function()
return self.moduleSettings.flashFailures
get = function(info)
return IceHUD:GetSelectValue(info, self.moduleSettings.flashFailures)
end,
set = function(value)
self.moduleSettings.flashFailures = value
set = function(info, value)
self.moduleSettings.flashFailures = info.option.values[value]
end,
disabled = function()
return not self.moduleSettings.enabled
end,
validate = { "Always", "Caster", "Never" },
values = { "Always", "Caster", "Never" },
order = 41
}
@ -88,7 +88,7 @@ function CastBar.prototype:GetOptions()
get = function()
return self.moduleSettings.lagAlpha
end,
set = function(value)
set = function(info, value)
self.moduleSettings.lagAlpha = value
self:Redraw()
end,
@ -106,7 +106,7 @@ function CastBar.prototype:GetOptions()
get = function()
return self.moduleSettings.showBlizzCast
end,
set = function(value)
set = function(info, value)
self.moduleSettings.showBlizzCast = value
self:ToggleBlizzCast(self.moduleSettings.showBlizzCast)
end,
@ -148,7 +148,7 @@ function CastBar.prototype:GetOptions()
get = function()
return self.moduleSettings.barVisible['bar']
end,
set = function(v)
set = function(info, v)
self.moduleSettings.barVisible['bar'] = v
if v then
self.barFrame:Show()
@ -169,7 +169,7 @@ function CastBar.prototype:GetOptions()
get = function()
return self.moduleSettings.barVisible['bg']
end,
set = function(v)
set = function(info, v)
self.moduleSettings.barVisible['bg'] = v
if v then
self.frame.bg:Show()
@ -190,7 +190,7 @@ function CastBar.prototype:GetOptions()
get = function()
return self.moduleSettings.rangeColor
end,
set = function(v)
set = function(info, v)
self.moduleSettings.rangeColor = v
end,
disabled = function()
@ -216,7 +216,7 @@ function CastBar.prototype:GetOptions()
get = function()
return self.moduleSettings.barFontSize
end,
set = function(v)
set = function(info, v)
self.moduleSettings.barFontSize = v
self:Redraw()
end,
@ -233,7 +233,7 @@ function CastBar.prototype:GetOptions()
get = function()
return self.moduleSettings.lockUpperTextAlpha
end,
set = function(v)
set = function(info, v)
self.moduleSettings.lockUpperTextAlpha = v
self:Redraw()
end,
@ -247,7 +247,7 @@ function CastBar.prototype:GetOptions()
get = function()
return self.moduleSettings.textVisible['upper']
end,
set = function(v)
set = function(info, v)
self.moduleSettings.textVisible['upper'] = v
self:Redraw()
end,
@ -264,7 +264,7 @@ function CastBar.prototype:GetOptions()
get = function()
return self.moduleSettings.textVerticalOffset
end,
set = function(v)
set = function(info, v)
self.moduleSettings.textVerticalOffset = v
self:Redraw()
end,
@ -283,7 +283,7 @@ function CastBar.prototype:GetOptions()
get = function()
return self.moduleSettings.textHorizontalOffset
end,
set = function(v)
set = function(info, v)
self.moduleSettings.textHorizontalOffset = v
self:Redraw()
end,
@ -293,17 +293,17 @@ function CastBar.prototype:GetOptions()
},
forceJustifyText = {
type = 'text',
type = 'select',
name = 'Force Text Justification',
desc = 'This sets the alignment for the text on this bar',
get = function()
return self.moduleSettings.forceJustifyText
end,
set = function(value)
set = function(info, value)
self.moduleSettings.forceJustifyText = value
self:Redraw()
end,
validate = { NONE = "None", LEFT = "Left", RIGHT = "Right" },
values = { NONE = "None", LEFT = "Left", RIGHT = "Right" },
disabled = function()
return not self.moduleSettings.enabled
end,

View File

@ -1,7 +1,6 @@
local AceOO = AceLibrary("AceOO-2.0")
local ComboPoints = AceOO.Class(IceElement)
local waterfall = AceLibrary("Waterfall-1.0")
ComboPoints.prototype.comboSize = 20
@ -29,7 +28,7 @@ function ComboPoints.prototype:GetOptions()
get = function()
return self.moduleSettings.vpos
end,
set = function(v)
set = function(info, v)
self.moduleSettings.vpos = v
self:Redraw()
end,
@ -49,7 +48,7 @@ function ComboPoints.prototype:GetOptions()
get = function()
return self.moduleSettings.hpos
end,
set = function(v)
set = function(info, v)
self.moduleSettings.hpos = v
self:Redraw()
end,
@ -69,7 +68,7 @@ function ComboPoints.prototype:GetOptions()
get = function()
return self.moduleSettings.comboFontSize
end,
set = function(v)
set = function(info, v)
self.moduleSettings.comboFontSize = v
self:Redraw()
end,
@ -83,19 +82,19 @@ function ComboPoints.prototype:GetOptions()
}
opts["comboMode"] = {
type = "text",
type = 'select',
name = "Display Mode",
desc = "Show graphical or numeric combo points",
get = function()
return self.moduleSettings.comboMode
get = function(info)
return IceHUD:GetSelectValue(info, self.moduleSettings.comboMode)
end,
set = function(v)
self.moduleSettings.comboMode = v
set = function(info, v)
self.moduleSettings.comboMode = info.option.values[v]
self:CreateComboFrame(true)
self:Redraw()
waterfall:Refresh("IceHUD")
IceHUD:NotifyOptionsChange()
end,
validate = { "Numeric", "Graphical Bar", "Graphical Circle", "Graphical Glow", "Graphical Clean Circle" },
values = { "Numeric", "Graphical Bar", "Graphical Circle", "Graphical Glow", "Graphical Clean Circle" },
disabled = function()
return not self.moduleSettings.enabled
end,
@ -103,20 +102,20 @@ function ComboPoints.prototype:GetOptions()
}
opts["graphicalLayout"] = {
type = 'text',
type = 'select',
name = 'Layout',
desc = 'How the graphical combo points should be displayed',
get = function()
return self.moduleSettings.graphicalLayout
get = function(info)
return IceHUD:GetSelectValue(info, self.moduleSettings.graphicalLayout)
end,
set = function(v)
self.moduleSettings.graphicalLayout = v
set = function(info, v)
self.moduleSettings.graphicalLayout = info.option.values[v]
self:Redraw()
end,
disabled = function()
return not self.moduleSettings.enabled or self.moduleSettings.comboMode == "Numeric"
end,
validate = {"Horizontal", "Vertical"},
values = {"Horizontal", "Vertical"},
order = 33.1
}
@ -130,7 +129,7 @@ function ComboPoints.prototype:GetOptions()
get = function()
return self.moduleSettings.comboGap
end,
set = function(v)
set = function(info, v)
self.moduleSettings.comboGap = v
self:Redraw()
end,
@ -147,7 +146,7 @@ function ComboPoints.prototype:GetOptions()
get = function()
return self.moduleSettings.gradient
end,
set = function(v)
set = function(info, v)
self.moduleSettings.gradient = v
self:Redraw()
end,

View File

@ -19,7 +19,7 @@ function ComboPointsBar.prototype:GetOptions()
get = function()
return self.moduleSettings.alwaysDisplay
end,
set = function(v)
set = function(info, v)
self.moduleSettings.alwaysDisplay = v
self:UpdateComboPoints()
end,

View File

@ -160,13 +160,13 @@ function IceCustomBar.prototype:GetOptions()
}
opts["name"] = {
type = 'text',
type = 'input',
name = 'Bar name',
desc = 'The name of this bar (must be unique!).\n\nRemember to press ENTER after filling out this box with the name you want or it will not save.',
get = function()
return self.elementName
end,
set = function(v)
set = function(info, v)
if v~= "" then
IceHUD.IceCore:RenameDynamicModule(self, v)
end
@ -179,20 +179,20 @@ function IceCustomBar.prototype:GetOptions()
}
opts["unitToTrack"] = {
type = 'text',
validate = validUnits,
type = 'select',
values = validUnits,
name = 'Unit to track',
desc = 'Select which unit that this bar should be looking for buffs/debuffs on',
get = function()
return self.moduleSettings.myUnit
get = function(info)
return IceHUD:GetSelectValue(info, self.moduleSettings.myUnit)
end,
set = function(v)
self.moduleSettings.myUnit = v
self.unit = v
set = function(info, v)
self.moduleSettings.myUnit = info.option.values[v]
self.unit = info.option.values[v]
self:CheckShouldSubscribe()
self:Redraw()
self:UpdateCustomBar(self.unit)
AceLibrary("Waterfall-1.0"):Refresh("IceHUD")
IceHUD:NotifyOptionsChange()
end,
disabled = function()
return not self.moduleSettings.enabled
@ -201,15 +201,15 @@ function IceCustomBar.prototype:GetOptions()
}
opts["buffOrDebuff"] = {
type = 'text',
validate = buffOrDebuff,
type = 'select',
values = buffOrDebuff,
name = 'Buff or debuff?',
desc = 'Whether we are tracking a buff or debuff',
get = function()
return self.moduleSettings.buffOrDebuff
get = function(info)
return IceHUD:GetSelectValue(info, self.moduleSettings.buffOrDebuff)
end,
set = function(v)
self.moduleSettings.buffOrDebuff = v
set = function(info, v)
self.moduleSettings.buffOrDebuff = info.option.values[v]
self:Redraw()
self:UpdateCustomBar(self.unit)
end,
@ -220,13 +220,13 @@ function IceCustomBar.prototype:GetOptions()
}
opts["buffToTrack"] = {
type = 'text',
type = 'input',
name = "Aura to track",
desc = "Which buff/debuff this bar will be tracking.\n\nRemember to press ENTER after filling out this box with the name you want or it will not save.",
get = function()
return self.moduleSettings.buffToTrack
end,
set = function(v)
set = function(info, v)
if self.moduleSettings.buffToTrack == self.moduleSettings.upperText then
self.moduleSettings.upperText = v
end
@ -248,7 +248,7 @@ function IceCustomBar.prototype:GetOptions()
get = function()
return self.moduleSettings.exactMatch
end,
set = function(v)
set = function(info, v)
self.moduleSettings.exactMatch = v
self:Redraw()
self:UpdateCustomBar(self.unit)
@ -266,7 +266,7 @@ function IceCustomBar.prototype:GetOptions()
get = function()
return self.moduleSettings.trackOnlyMine
end,
set = function(v)
set = function(info, v)
self.moduleSettings.trackOnlyMine = v
self:Redraw()
self:UpdateCustomBar(self.unit)
@ -284,7 +284,7 @@ function IceCustomBar.prototype:GetOptions()
get = function()
return self:GetBarColor()
end,
set = function(r,g,b)
set = function(info, r,g,b)
self.moduleSettings.barColor.r = r
self.moduleSettings.barColor.g = g
self.moduleSettings.barColor.b = b
@ -303,7 +303,7 @@ function IceCustomBar.prototype:GetOptions()
get = function()
return self.moduleSettings.displayWhenEmpty
end,
set = function(v)
set = function(info, v)
self.moduleSettings.displayWhenEmpty = v
self:UpdateCustomBar()
end,
@ -314,31 +314,31 @@ function IceCustomBar.prototype:GetOptions()
}
opts["buffTimerDisplay"] = {
type = 'text',
type = 'select',
name = 'Buff timer display',
desc = 'How to display the buff timer next to the name of the buff on the bar',
get = function()
return self.moduleSettings.buffTimerDisplay
get = function(info)
return IceHUD:GetSelectValue(info, self.moduleSettings.buffTimerDisplay)
end,
set = function(v)
self.moduleSettings.buffTimerDisplay = v
set = function(info, v)
self.moduleSettings.buffTimerDisplay = info.option.values[v]
self:UpdateCustomBar()
end,
disabled = function()
return not self.moduleSettings.enabled
end,
validate = validBuffTimers,
values = validBuffTimers,
order = 21
}
opts["maxDuration"] = {
type = 'text',
type = 'input',
name = "Maximum duration",
desc = "Maximum Duration for the bar (the bar will remained full if it has longer than maximum remaining). Leave 0 for spell duration.\n\nRemember to press ENTER after filling out this box with the name you want or it will not save.",
get = function()
return self.moduleSettings.maxDuration
end,
set = function(v)
set = function(info, v)
if not v or not tonumber(v) then
v = 0
end
@ -365,7 +365,7 @@ function IceCustomBar.prototype:GetOptions()
get = function()
return self.moduleSettings.displayAuraIcon
end,
set = function(v)
set = function(info, v)
self.moduleSettings.displayAuraIcon = v
if self.barFrame.icon then
if v then
@ -378,7 +378,6 @@ function IceCustomBar.prototype:GetOptions()
disabled = function()
return not self.moduleSettings.enabled
end,
usage = "<whether or not to display an icon for this bar's tracked spell>",
order = 40.1,
}
@ -392,14 +391,13 @@ function IceCustomBar.prototype:GetOptions()
get = function()
return self.moduleSettings.auraIconXOffset
end,
set = function(v)
set = function(info, v)
self.moduleSettings.auraIconXOffset = v
self:PositionIcons()
end,
disabled = function()
return not self.moduleSettings.enabled or not self.moduleSettings.displayAuraIcon
end,
usage = "<adjusts the spell icon's horizontal position>",
order = 40.2,
}
@ -413,14 +411,13 @@ function IceCustomBar.prototype:GetOptions()
get = function()
return self.moduleSettings.auraIconYOffset
end,
set = function(v)
set = function(info, v)
self.moduleSettings.auraIconYOffset = v
self:PositionIcons()
end,
disabled = function()
return not self.moduleSettings.enabled or not self.moduleSettings.displayAuraIcon
end,
usage = "<adjusts the spell icon's vertical position>",
order = 40.3,
}
@ -434,14 +431,13 @@ function IceCustomBar.prototype:GetOptions()
get = function()
return self.moduleSettings.auraIconScale
end,
set = function(v)
set = function(info, v)
self.moduleSettings.auraIconScale = v
self:PositionIcons()
end,
disabled = function()
return not self.moduleSettings.enabled or not self.moduleSettings.displayAuraIcon
end,
usage = "<adjusts the spell icon's size>",
order = 40.4,
}

View File

@ -151,13 +151,13 @@ function IceCustomCDBar.prototype:GetOptions()
}
opts["name"] = {
type = 'text',
type = 'input',
name = 'Bar name',
desc = 'The name of this bar (must be unique!).\n\nRemember to press ENTER after filling out this box with the name you want or it will not save.',
get = function()
return self.elementName
end,
set = function(v)
set = function(info, v)
if v ~= "" then
IceHUD.IceCore:RenameDynamicModule(self, v)
end
@ -170,13 +170,13 @@ function IceCustomCDBar.prototype:GetOptions()
}
opts["cooldownToTrack"] = {
type = 'text',
type = 'input',
name = "Spell to track",
desc = "Which spell cooldown this bar will be tracking.\n\nRemember to press ENTER after filling out this box with the name you want or it will not save.",
get = function()
return self.moduleSettings.cooldownToTrack
end,
set = function(v)
set = function(info, v)
if self.moduleSettings.cooldownToTrack == self.moduleSettings.upperText then
self.moduleSettings.upperText = v
end
@ -199,7 +199,7 @@ function IceCustomCDBar.prototype:GetOptions()
get = function()
return self:GetBarColor()
end,
set = function(r,g,b)
set = function(info, r,g,b)
self.moduleSettings.barColor.r = r
self.moduleSettings.barColor.g = g
self.moduleSettings.barColor.b = b
@ -212,49 +212,49 @@ function IceCustomCDBar.prototype:GetOptions()
}
opts["displayMode"] = {
type = 'text',
type = 'select',
name = 'Display mode',
desc = 'When to display this bar.',
get = function()
return self.moduleSettings.displayMode
get = function(info)
return IceHUD:GetSelectValue(info, self.moduleSettings.displayMode)
end,
set = function(v)
self.moduleSettings.displayMode = v
set = function(info, v)
self.moduleSettings.displayMode = info.option.values[v]
self:UpdateCustomBar()
end,
disabled = function()
return not self.moduleSettings.enabled
end,
validate = validDisplayModes,
values = validDisplayModes,
order = 20.9
}
opts["cooldownTimerDisplay"] = {
type = 'text',
type = 'select',
name = 'Cooldown timer display',
desc = 'How to display the buff timer next to the name of the buff on the bar',
get = function()
return self.moduleSettings.cooldownTimerDisplay
get = function(info)
return IceHUD:GetSelectValue(info, self.moduleSettings.cooldownTimerDisplay)
end,
set = function(v)
self.moduleSettings.cooldownTimerDisplay = v
set = function(info, v)
self.moduleSettings.cooldownTimerDisplay = info.option.values[v]
self:UpdateCustomBar()
end,
disabled = function()
return not self.moduleSettings.enabled
end,
validate = validBuffTimers,
values = validBuffTimers,
order = 21
}
opts["maxDuration"] = {
type = 'text',
type = 'input',
name = "Maximum duration",
desc = "Maximum Duration for the bar (the bar will remained full if it has longer than maximum remaining). Leave 0 for spell duration.\n\nRemember to press ENTER after filling out this box with the name you want or it will not save.",
get = function()
return self.moduleSettings.maxDuration
end,
set = function(v)
set = function(info, v)
if not v or not tonumber(v) then
v = 0
end
@ -281,14 +281,13 @@ function IceCustomCDBar.prototype:GetOptions()
get = function()
return self.moduleSettings.displayAuraIcon
end,
set = function(v)
set = function(info, v)
self.moduleSettings.displayAuraIcon = v
self:UpdateIcon()
end,
disabled = function()
return not self.moduleSettings.enabled
end,
usage = "<whether or not to display an icon for this bar's tracked spell>",
order = 40.1,
}
@ -302,14 +301,13 @@ function IceCustomCDBar.prototype:GetOptions()
get = function()
return self.moduleSettings.auraIconXOffset
end,
set = function(v)
set = function(info, v)
self.moduleSettings.auraIconXOffset = v
self:PositionIcons()
end,
disabled = function()
return not self.moduleSettings.enabled or not self.moduleSettings.displayAuraIcon
end,
usage = "<adjusts the spell icon's horizontal position>",
order = 40.2,
}
@ -323,14 +321,13 @@ function IceCustomCDBar.prototype:GetOptions()
get = function()
return self.moduleSettings.auraIconYOffset
end,
set = function(v)
set = function(info, v)
self.moduleSettings.auraIconYOffset = v
self:PositionIcons()
end,
disabled = function()
return not self.moduleSettings.enabled or not self.moduleSettings.displayAuraIcon
end,
usage = "<adjusts the spell icon's vertical position>",
order = 40.3,
}
@ -344,14 +341,13 @@ function IceCustomCDBar.prototype:GetOptions()
get = function()
return self.moduleSettings.auraIconScale
end,
set = function(v)
set = function(info, v)
self.moduleSettings.auraIconScale = v
self:PositionIcons()
end,
disabled = function()
return not self.moduleSettings.enabled or not self.moduleSettings.displayAuraIcon
end,
usage = "<adjusts the spell icon's size>",
order = 40.4,
}

View File

@ -1,7 +1,6 @@
local AceOO = AceLibrary("AceOO-2.0")
IceCustomCount = AceOO.Class(IceElement)
local waterfall = AceLibrary("Waterfall-1.0")
IceCustomCount.prototype.countSize = 20
@ -40,13 +39,13 @@ function IceCustomCount.prototype:GetOptions()
}
opts["name"] = {
type = 'text',
type = 'input',
name = 'Counter name',
desc = 'The name of this counter (must be unique!). \n\nRemember to press ENTER after filling out this box with the name you want or it will not save.',
get = function()
return self.elementName
end,
set = function(v)
set = function(info, v)
if v ~= "" then
IceHUD.IceCore:RenameDynamicModule(self, v)
end
@ -59,18 +58,18 @@ function IceCustomCount.prototype:GetOptions()
}
opts["auraTarget"] = {
type = 'text',
validate = validUnits,
type = 'select',
values = validUnits,
name = 'Unit to track',
desc = 'Select which unit that this bar should be looking for buffs/debuffs on',
get = function()
return self.moduleSettings.auraTarget
get = function(info)
return IceHUD:GetSelectValue(info, self.moduleSettings.auraTarget)
end,
set = function(v)
self.moduleSettings.auraTarget = v
self.unit = v
set = function(info, v)
self.moduleSettings.auraTarget = info.option.values[v]
self.unit = info.option.values[v]
self:Redraw()
AceLibrary("Waterfall-1.0"):Refresh("IceHUD")
IceHUD:NotifyOptionsChange()
end,
disabled = function()
return not self.moduleSettings.enabled
@ -79,15 +78,15 @@ function IceCustomCount.prototype:GetOptions()
}
opts["auraType"] = {
type = 'text',
validate = buffOrDebuff,
type = 'select',
values = buffOrDebuff,
name = 'Buff or debuff?',
desc = 'Whether we are tracking a buff or debuff',
get = function()
return self.moduleSettings.auraType
get = function(info)
return IceHUD:GetSelectValue(info, self.moduleSettings.auraType)
end,
set = function(v)
self.moduleSettings.auraType = v
set = function(info, v)
self.moduleSettings.auraType = info.option.values[v]
self:Redraw()
end,
disabled = function()
@ -97,13 +96,13 @@ function IceCustomCount.prototype:GetOptions()
}
opts["auraName"] = {
type = 'text',
type = 'input',
name = "Aura to track",
desc = "Which buff/debuff this counter will be tracking. \n\nRemember to press ENTER after filling out this box with the name you want or it will not save.",
get = function()
return self.moduleSettings.auraName
end,
set = function(v)
set = function(info, v)
self.moduleSettings.auraName = v
self:Redraw()
end,
@ -121,7 +120,7 @@ function IceCustomCount.prototype:GetOptions()
get = function()
return self.moduleSettings.onlyMine
end,
set = function(v)
set = function(info, v)
self.moduleSettings.onlyMine = v
self:Redraw()
end,
@ -138,7 +137,7 @@ function IceCustomCount.prototype:GetOptions()
get = function()
return self:GetCustomColor()
end,
set = function(r,g,b)
set = function(info, r,g,b)
self.moduleSettings.countColor.r = r
self.moduleSettings.countColor.g = g
self.moduleSettings.countColor.b = b
@ -157,7 +156,7 @@ function IceCustomCount.prototype:GetOptions()
get = function()
return self:GetCustomMinColor()
end,
set = function(r,g,b)
set = function(info, r,g,b)
self.moduleSettings.countMinColor.r = r
self.moduleSettings.countMinColor.g = g
self.moduleSettings.countMinColor.b = b
@ -170,13 +169,13 @@ function IceCustomCount.prototype:GetOptions()
}
opts["maxCount"] = {
type = 'text',
type = 'input',
name = "Maximum applications",
desc = "How many total applications of this buff/debuff can be applied. For example, only 5 sunders can ever be on a target, so this would be set to 5 for tracking Sunder.\n\nRemember to press ENTER after filling out this box with the name you want or it will not save.",
get = function()
return self.moduleSettings.maxCount
end,
set = function(v)
set = function(info, v)
if not v or not tonumber(v) then
v = 0
end
@ -203,7 +202,7 @@ function IceCustomCount.prototype:GetOptions()
get = function()
return self.moduleSettings.vpos
end,
set = function(v)
set = function(info, v)
self.moduleSettings.vpos = v
self:Redraw()
end,
@ -223,7 +222,7 @@ function IceCustomCount.prototype:GetOptions()
get = function()
return self.moduleSettings.hpos
end,
set = function(v)
set = function(info, v)
self.moduleSettings.hpos = v
self:Redraw()
end,
@ -243,7 +242,7 @@ function IceCustomCount.prototype:GetOptions()
get = function()
return self.moduleSettings.countFontSize
end,
set = function(v)
set = function(info, v)
self.moduleSettings.countFontSize = v
self:Redraw()
end,
@ -257,19 +256,19 @@ function IceCustomCount.prototype:GetOptions()
}
opts["CustomMode"] = {
type = "text",
type = 'select',
name = "Display Mode",
desc = "Show graphical or numeric counts",
get = function()
return self.moduleSettings.countMode
get = function(info)
return IceHUD:GetSelectValue(info, self.moduleSettings.countMode)
end,
set = function(v)
self.moduleSettings.countMode = v
set = function(info, v)
self.moduleSettings.countMode = info.option.values[v]
self:CreateCustomFrame(true)
self:Redraw()
waterfall:Refresh("IceHUD")
IceHUD:NotifyOptionsChange()
end,
validate = { "Numeric", "Graphical Bar", "Graphical Circle", "Graphical Glow", "Graphical Clean Circle" },
values = { "Numeric", "Graphical Bar", "Graphical Circle", "Graphical Glow", "Graphical Clean Circle" },
disabled = function()
return not self.moduleSettings.enabled
end,
@ -277,20 +276,20 @@ function IceCustomCount.prototype:GetOptions()
}
opts["graphicalLayout"] = {
type = 'text',
type = 'select',
name = 'Layout',
desc = 'How the graphical counter should be displayed',
get = function()
return self.moduleSettings.graphicalLayout
get = function(info)
return IceHUD:GetSelectValue(info, self.moduleSettings.graphicalLayout)
end,
set = function(v)
self.moduleSettings.graphicalLayout = v
set = function(info, v)
self.moduleSettings.graphicalLayout = info.option.values[v]
self:Redraw()
end,
disabled = function()
return not self.moduleSettings.enabled or self.moduleSettings.countMode == "Numeric"
end,
validate = {"Horizontal", "Vertical"},
values = {"Horizontal", "Vertical"},
order = 33.1
}
@ -304,7 +303,7 @@ function IceCustomCount.prototype:GetOptions()
get = function()
return self.moduleSettings.countGap
end,
set = function(v)
set = function(info, v)
self.moduleSettings.countGap = v
self:Redraw()
end,
@ -321,7 +320,7 @@ function IceCustomCount.prototype:GetOptions()
get = function()
return self.moduleSettings.gradient
end,
set = function(v)
set = function(info, v)
self.moduleSettings.gradient = v
self:Redraw()
end,

View File

@ -54,13 +54,13 @@ function IceCustomHealth.prototype:GetOptions()
}
opts["name"] = {
type = 'text',
type = 'input',
name = 'Bar name',
desc = 'The name of this bar (must be unique!).\n\nRemember to press ENTER after filling out this box with the name you want or it will not save.',
get = function()
return self.elementName
end,
set = function(v)
set = function(info, v)
if v~= "" then
IceHUD.IceCore:RenameDynamicModule(self, v)
end
@ -73,13 +73,13 @@ function IceCustomHealth.prototype:GetOptions()
}
opts["unitToTrack"] = {
type = 'text',
type = 'input',
name = 'Unit to track',
desc = 'Enter which unit that this bar should be monitoring the health of (e.g.: focustarget, pettarget, etc.)\n\nRemember to press ENTER after filling out this box with the name you want or it will not save.',
get = function()
return self.moduleSettings.unitToTrack
end,
set = function(v)
set = function(info, v)
v = string.lower(v)
self.moduleSettings.unitToTrack = v
self:SetUnit(v)

View File

@ -55,13 +55,13 @@ function IceCustomMana.prototype:GetOptions()
}
opts["name"] = {
type = 'text',
type = 'input',
name = 'Bar name',
desc = 'The name of this bar (must be unique!).\n\nRemember to press ENTER after filling out this box with the name you want or it will not save.',
get = function()
return self.elementName
end,
set = function(v)
set = function(info, v)
if v~= "" then
IceHUD.IceCore:RenameDynamicModule(self, v)
end
@ -74,13 +74,13 @@ function IceCustomMana.prototype:GetOptions()
}
opts["unitToTrack"] = {
type = 'text',
type = 'input',
name = 'Unit to track',
desc = 'Enter which unit that this bar should be monitoring the mana of (e.g.: focustarget, pettarget, etc.)\n\nRemember to press ENTER after filling out this box with the name you want or it will not save.',
get = function()
return self.moduleSettings.unitToTrack
end,
set = function(v)
set = function(info, v)
v = string.lower(v)
self.moduleSettings.unitToTrack = v
self:SetUnit(v)

View File

@ -95,7 +95,7 @@ function FocusCast.prototype:GetOptions()
get = function()
return self.moduleSettings.barVisible['bar']
end,
set = function(v)
set = function(info, v)
self.moduleSettings.barVisible['bar'] = v
if v then
self.barFrame:Show()
@ -116,7 +116,7 @@ function FocusCast.prototype:GetOptions()
get = function()
return self.moduleSettings.barVisible['bg']
end,
set = function(v)
set = function(info, v)
self.moduleSettings.barVisible['bg'] = v
if v then
self.frame.bg:Show()

View File

@ -54,7 +54,7 @@ function FocusHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.mobhealth
end,
set = function(value)
set = function(info, value)
self.moduleSettings.mobhealth = value
self:Update(self.unit)
end,
@ -71,7 +71,7 @@ function FocusHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.classColor
end,
set = function(value)
set = function(info, value)
self.moduleSettings.classColor = value
self:Update(self.unit)
end,
@ -88,7 +88,7 @@ function FocusHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.hideBlizz
end,
set = function(value)
set = function(info, value)
self.moduleSettings.hideBlizz = value
if (value) then
self:HideBlizz()
@ -109,7 +109,7 @@ function FocusHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.scaleHealthColor
end,
set = function(value)
set = function(info, value)
self.moduleSettings.scaleHealthColor = value
self:Redraw()
end,
@ -126,7 +126,7 @@ function FocusHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.showRaidIcon
end,
set = function(value)
set = function(info, value)
self.moduleSettings.showRaidIcon = value
self:UpdateRaidFocusIcon()
end,
@ -143,7 +143,7 @@ function FocusHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.lockIconAlpha
end,
set = function(value)
set = function(info, value)
self.moduleSettings.lockIconAlpha = value
self:Redraw()
end,
@ -160,7 +160,7 @@ function FocusHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.raidIconOnTop
end,
set = function(value)
set = function(info, value)
self.moduleSettings.raidIconOnTop = value
self:UpdateRaidFocusIcon()
end,
@ -180,7 +180,7 @@ function FocusHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.raidIconXOffset
end,
set = function(value)
set = function(info, value)
self.moduleSettings.raidIconXOffset = value
self:SetRaidIconPlacement()
self:Redraw()
@ -201,7 +201,7 @@ function FocusHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.raidIconYOffset
end,
set = function(value)
set = function(info, value)
self.moduleSettings.raidIconYOffset = value
self:SetRaidIconPlacement()
self:Redraw()
@ -219,7 +219,7 @@ function FocusHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.abbreviateHealth
end,
set = function(v)
set = function(info, v)
self.moduleSettings.abbreviateHealth = v
end,
disabled = function()
@ -235,14 +235,13 @@ function FocusHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.allowMouseInteraction
end,
set = function(v)
set = function(info, v)
self.moduleSettings.allowMouseInteraction = v
self:Redraw()
end,
disabled = function()
return not self.moduleSettings.enabled
end,
usage = '',
order = 43,
}

View File

@ -108,7 +108,7 @@ function FocusMana.prototype:GetOptions()
get = function()
return self.moduleSettings.scaleManaColor
end,
set = function(value)
set = function(info, value)
self.moduleSettings.scaleManaColor = value
self:Redraw()
end,

View File

@ -81,7 +81,7 @@ function HungerForBlood.prototype:GetOptions()
get = function()
return self.moduleSettings.allowMouseInteraction
end,
set = function(v)
set = function(info, v)
self.moduleSettings.allowMouseInteraction = v
self:CreateFrame()
end,

View File

@ -1,7 +1,6 @@
local AceOO = AceLibrary("AceOO-2.0")
local LacerateCount = AceOO.Class(IceElement)
local waterfall = AceLibrary("Waterfall-1.0")
LacerateCount.prototype.lacerateSize = 20
@ -29,7 +28,7 @@ function LacerateCount.prototype:GetOptions()
get = function()
return self.moduleSettings.vpos
end,
set = function(v)
set = function(info, v)
self.moduleSettings.vpos = v
self:Redraw()
end,
@ -49,7 +48,7 @@ function LacerateCount.prototype:GetOptions()
get = function()
return self.moduleSettings.hpos
end,
set = function(v)
set = function(info, v)
self.moduleSettings.hpos = v
self:Redraw()
end,
@ -69,7 +68,7 @@ function LacerateCount.prototype:GetOptions()
get = function()
return self.moduleSettings.lacerateFontSize
end,
set = function(v)
set = function(info, v)
self.moduleSettings.lacerateFontSize = v
self:Redraw()
end,
@ -83,19 +82,19 @@ function LacerateCount.prototype:GetOptions()
}
opts["lacerateMode"] = {
type = "text",
type = 'select',
name = "Display Mode",
desc = "Show graphical or numeric lacerates",
get = function()
return self.moduleSettings.lacerateMode
get = function(info)
return IceHUD:GetSelectValue(info, self.moduleSettings.lacerateMode)
end,
set = function(v)
self.moduleSettings.lacerateMode = v
set = function(info, v)
self.moduleSettings.lacerateMode = info.option.values[v]
self:CreateLacerateFrame(true)
self:Redraw()
waterfall:Refresh("IceHUD")
IceHUD:NotifyOptionsChange()
end,
validate = { "Numeric", "Graphical Bar", "Graphical Circle", "Graphical Glow", "Graphical Clean Circle" },
values = { "Numeric", "Graphical Bar", "Graphical Circle", "Graphical Glow", "Graphical Clean Circle" },
disabled = function()
return not self.moduleSettings.enabled
end,
@ -112,7 +111,7 @@ function LacerateCount.prototype:GetOptions()
get = function()
return self.moduleSettings.lacerateGap
end,
set = function(v)
set = function(info, v)
self.moduleSettings.lacerateGap = v
self:Redraw()
end,
@ -129,7 +128,7 @@ function LacerateCount.prototype:GetOptions()
get = function()
return self.moduleSettings.gradient
end,
set = function(v)
set = function(info, v)
self.moduleSettings.gradient = v
self:Redraw()
end,

View File

@ -1,7 +1,6 @@
local AceOO = AceLibrary("AceOO-2.0")
local MaelstromCount = AceOO.Class(IceElement)
local waterfall = AceLibrary("Waterfall-1.0")
MaelstromCount.prototype.maelstromSize = 20
@ -29,7 +28,7 @@ function MaelstromCount.prototype:GetOptions()
get = function()
return self.moduleSettings.vpos
end,
set = function(v)
set = function(info, v)
self.moduleSettings.vpos = v
self:Redraw()
end,
@ -49,7 +48,7 @@ function MaelstromCount.prototype:GetOptions()
get = function()
return self.moduleSettings.maelstromFontSize
end,
set = function(v)
set = function(info, v)
self.moduleSettings.maelstromFontSize = v
self:Redraw()
end,
@ -63,19 +62,19 @@ function MaelstromCount.prototype:GetOptions()
}
opts["maelstromMode"] = {
type = "text",
type = 'select',
name = "Display Mode",
desc = "Show graphical or numeric maelstroms",
get = function()
return self.moduleSettings.maelstromMode
get = function(info)
return IceHUD:GetSelectValue(info, self.moduleSettings.maelstromMode)
end,
set = function(v)
self.moduleSettings.maelstromMode = v
set = function(info, v)
self.moduleSettings.maelstromMode = info.option.values[v]
self:CreateMaelstromFrame(true)
self:Redraw()
waterfall:Refresh("IceHUD")
IceHUD:NotifyOptionsChange()
end,
validate = { "Numeric", "Graphical Bar", "Graphical Circle", "Graphical Glow", "Graphical Clean Circle" },
values = { "Numeric", "Graphical Bar", "Graphical Circle", "Graphical Glow", "Graphical Clean Circle" },
disabled = function()
return not self.moduleSettings.enabled
end,
@ -92,7 +91,7 @@ function MaelstromCount.prototype:GetOptions()
get = function()
return self.moduleSettings.maelstromGap
end,
set = function(v)
set = function(info, v)
self.moduleSettings.maelstromGap = v
self:Redraw()
end,
@ -109,7 +108,7 @@ function MaelstromCount.prototype:GetOptions()
get = function()
return self.moduleSettings.gradient
end,
set = function(v)
set = function(info, v)
self.moduleSettings.gradient = v
self:Redraw()
end,

View File

@ -198,25 +198,25 @@ function MirrorBarHandler.prototype:GetOptions()
opts["side"] =
{
type = 'text',
type = 'select',
name = '|c' .. self.configColor .. 'Side|r',
desc = 'Side of the HUD where the bar appears',
get = function()
get = function(info)
if (self.moduleSettings.side == IceCore.Side.Right) then
return "Right"
return 2
else
return "Left"
return 1
end
end,
set = function(value)
if (value == "Right") then
set = function(info, value)
if (value == 2) then
self.moduleSettings.side = IceCore.Side.Right
else
self.moduleSettings.side = IceCore.Side.Left
end
self:Redraw()
end,
validate = { "Left", "Right" },
values = { "Left", "Right" },
order = 30
}
@ -231,7 +231,7 @@ function MirrorBarHandler.prototype:GetOptions()
get = function()
return self.moduleSettings.offset
end,
set = function(value)
set = function(info, value)
self.moduleSettings.offset = value
self:Redraw()
end,
@ -245,7 +245,7 @@ function MirrorBarHandler.prototype:GetOptions()
get = function()
return self.moduleSettings.barVisible['bar']
end,
set = function(v)
set = function(info, v)
self.moduleSettings.barVisible['bar'] = v
self:Redraw()
end,
@ -262,7 +262,7 @@ function MirrorBarHandler.prototype:GetOptions()
get = function()
return self.moduleSettings.barVisible['bg']
end,
set = function(v)
set = function(info, v)
self.moduleSettings.barVisible['bg'] = v
self:Redraw()
end,
@ -283,7 +283,7 @@ function MirrorBarHandler.prototype:GetOptions()
get = function()
return self.moduleSettings.barVerticalOffset
end,
set = function(v)
set = function(info, v)
self.moduleSettings.barVerticalOffset = v
self:Redraw()
end,
@ -307,7 +307,7 @@ function MirrorBarHandler.prototype:GetOptions()
get = function()
return self.moduleSettings.barFontSize
end,
set = function(v)
set = function(info, v)
self.moduleSettings.barFontSize = v
self:Redraw()
end,
@ -324,7 +324,7 @@ function MirrorBarHandler.prototype:GetOptions()
get = function()
return self.moduleSettings.barFontBold
end,
set = function(v)
set = function(info, v)
self.moduleSettings.barFontBold = v
self:Redraw()
end,
@ -338,7 +338,7 @@ function MirrorBarHandler.prototype:GetOptions()
get = function()
return self.moduleSettings.lockTextAlpha
end,
set = function(v)
set = function(info, v)
self.moduleSettings.lockTextAlpha = v
self:Redraw()
end,
@ -352,7 +352,7 @@ function MirrorBarHandler.prototype:GetOptions()
get = function()
return self.moduleSettings.textVisible['upper']
end,
set = function(v)
set = function(info, v)
self.moduleSettings.textVisible['upper'] = v
self:Redraw()
end,
@ -366,7 +366,7 @@ function MirrorBarHandler.prototype:GetOptions()
get = function()
return self.moduleSettings.textVisible['lower']
end,
set = function(v)
set = function(info, v)
self.moduleSettings.textVisible['lower'] = v
self:Redraw()
end,
@ -383,7 +383,7 @@ function MirrorBarHandler.prototype:GetOptions()
get = function()
return self.moduleSettings.textVerticalOffset
end,
set = function(v)
set = function(info, v)
self.moduleSettings.textVerticalOffset = v
self:Redraw()
end,
@ -402,7 +402,7 @@ function MirrorBarHandler.prototype:GetOptions()
get = function()
return self.moduleSettings.textHorizontalOffset
end,
set = function(v)
set = function(info, v)
self.moduleSettings.textHorizontalOffset = v
self:Redraw()
end,

View File

@ -144,7 +144,7 @@ function PetHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.scaleHealthColor
end,
set = function(value)
set = function(info, value)
self.moduleSettings.scaleHealthColor = value
self:Redraw()
end,
@ -161,14 +161,13 @@ function PetHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.allowMouseInteraction
end,
set = function(v)
set = function(info, v)
self.moduleSettings.allowMouseInteraction = v
self:Redraw()
end,
disabled = function()
return not self.moduleSettings.enabled
end,
usage = '',
order = 42,
}

View File

@ -199,7 +199,7 @@ function PetMana.prototype:GetOptions()
get = function()
return self.moduleSettings.scaleManaColor
end,
set = function(value)
set = function(info, value)
self.moduleSettings.scaleManaColor = value
self:Redraw()
end,

View File

@ -147,7 +147,7 @@ function PlayerHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.classColor
end,
set = function(value)
set = function(info, value)
self.moduleSettings.classColor = value
self:Update(self.unit)
end,
@ -164,7 +164,7 @@ function PlayerHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.hideBlizz
end,
set = function(value)
set = function(info, value)
self.moduleSettings.hideBlizz = value
if (value) then
self:HideBlizz()
@ -185,7 +185,7 @@ function PlayerHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.hideBlizzParty
end,
set = function(value)
set = function(info, value)
self.moduleSettings.hideBlizzParty = value
if (value) then
self:HideBlizzardParty()
@ -206,7 +206,7 @@ function PlayerHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.scaleHealthColor
end,
set = function(value)
set = function(info, value)
self.moduleSettings.scaleHealthColor = value
self:Redraw()
end,
@ -223,14 +223,13 @@ function PlayerHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.allowMouseInteraction
end,
set = function(v)
set = function(info, v)
self.moduleSettings.allowMouseInteraction = v
self:CreateBackground(true)
end,
disabled = function()
return not self.moduleSettings.enabled
end,
usage = '',
order = 43
}
@ -241,14 +240,13 @@ function PlayerHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.allowMouseInteractionCombat
end,
set = function(v)
set = function(info, v)
self.moduleSettings.allowMouseInteractionCombat = v
self:CreateBackground(true)
end,
disabled = function()
return not self.moduleSettings.enabled or not self.moduleSettings.allowMouseInteraction
end,
usage = '',
order = 43.5
}
@ -260,7 +258,7 @@ function PlayerHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.showIncomingHeals
end,
set = function(v)
set = function(info, v)
if not v then
self.healFrame.bar:Hide()
else
@ -275,7 +273,6 @@ function PlayerHealth.prototype:GetOptions()
disabled = function()
return not self.moduleSettings.enabled or not HealComm
end,
usage = '',
order = 43.6
}
@ -290,7 +287,7 @@ function PlayerHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.healAlpha * 100
end,
set = function(v)
set = function(info, v)
self.moduleSettings.healAlpha = v / 100.0
self:Redraw()
end,
@ -316,7 +313,7 @@ function PlayerHealth.prototype:GetOptions()
get = function()
return configMode
end,
set = function(v)
set = function(info, v)
configMode = v
self:EnteringWorld()
end,
@ -330,7 +327,7 @@ function PlayerHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.lockIconAlpha
end,
set = function(v)
set = function(info, v)
self.moduleSettings.lockIconAlpha = v
self:Redraw()
end,
@ -349,7 +346,7 @@ function PlayerHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.showStatusIcon
end,
set = function(value)
set = function(info, value)
self.moduleSettings.showStatusIcon = value
self:Resting()
self:CheckCombat()
@ -366,7 +363,7 @@ function PlayerHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.showStatusCombat
end,
set = function(value)
set = function(info, value)
self.moduleSettings.showStatusCombat = value
self:Resting()
self:CheckCombat()
@ -383,7 +380,7 @@ function PlayerHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.showStatusResting
end,
set = function(value)
set = function(info, value)
self.moduleSettings.showStatusResting = value
self:Resting()
self:CheckCombat()
@ -403,7 +400,7 @@ function PlayerHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.statusIconOffset['x']
end,
set = function(v)
set = function(info, v)
self.moduleSettings.statusIconOffset['x'] = v
self:SetTexLoc(self.frame.statusIcon, self.moduleSettings.statusIconOffset['x'], self.moduleSettings.statusIconOffset['y'])
end,
@ -422,7 +419,7 @@ function PlayerHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.statusIconOffset['y']
end,
set = function(v)
set = function(info, v)
self.moduleSettings.statusIconOffset['y'] = v
self:SetTexLoc(self.frame.statusIcon, self.moduleSettings.statusIconOffset['x'], self.moduleSettings.statusIconOffset['y'])
end,
@ -441,7 +438,7 @@ function PlayerHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.statusIconScale
end,
set = function(v)
set = function(info, v)
self.moduleSettings.statusIconScale = v
self:SetTexScale(self.frame.statusIcon, 20, 20, v)
end,
@ -463,7 +460,7 @@ function PlayerHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.showLeaderIcon
end,
set = function(value)
set = function(info, value)
self.moduleSettings.showLeaderIcon = value
self:CheckLeader()
end,
@ -482,7 +479,7 @@ function PlayerHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.leaderIconOffset['x']
end,
set = function(v)
set = function(info, v)
self.moduleSettings.leaderIconOffset['x'] = v
self:SetTexLoc(self.frame.leaderIcon, self.moduleSettings.leaderIconOffset['x'], self.moduleSettings.leaderIconOffset['y'])
end,
@ -501,7 +498,7 @@ function PlayerHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.leaderIconOffset['y']
end,
set = function(v)
set = function(info, v)
self.moduleSettings.leaderIconOffset['y'] = v
self:SetTexLoc(self.frame.leaderIcon, self.moduleSettings.leaderIconOffset['x'], self.moduleSettings.leaderIconOffset['y'])
end,
@ -520,7 +517,7 @@ function PlayerHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.leaderIconScale
end,
set = function(v)
set = function(info, v)
self.moduleSettings.leaderIconScale = v
self:SetTexScale(self.frame.leaderIcon, 20, 20, v)
end,
@ -542,7 +539,7 @@ function PlayerHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.showLootMasterIcon
end,
set = function(value)
set = function(info, value)
self.moduleSettings.showLootMasterIcon = value
self:CheckLootMaster()
end,
@ -561,7 +558,7 @@ function PlayerHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.lootMasterIconOffset['x']
end,
set = function(v)
set = function(info, v)
self.moduleSettings.lootMasterIconOffset['x'] = v
self:SetTexLoc(self.frame.lootMasterIcon, self.moduleSettings.lootMasterIconOffset['x'], self.moduleSettings.lootMasterIconOffset['y'])
end,
@ -580,7 +577,7 @@ function PlayerHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.lootMasterIconOffset['y']
end,
set = function(v)
set = function(info, v)
self.moduleSettings.lootMasterIconOffset['y'] = v
self:SetTexLoc(self.frame.lootMasterIcon, self.moduleSettings.lootMasterIconOffset['x'], self.moduleSettings.lootMasterIconOffset['y'])
end,
@ -599,7 +596,7 @@ function PlayerHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.lootMasterIconScale
end,
set = function(v)
set = function(info, v)
self.moduleSettings.lootMasterIconScale = v
self:SetTexScale(self.frame.lootMasterIcon, 20, 20, v)
end,
@ -621,7 +618,7 @@ function PlayerHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.showPvPIcon
end,
set = function(value)
set = function(info, value)
self.moduleSettings.showPvPIcon = value
self:CheckPvP()
end,
@ -640,7 +637,7 @@ function PlayerHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.PvPIconOffset['x']
end,
set = function(v)
set = function(info, v)
self.moduleSettings.PvPIconOffset['x'] = v
self:SetTexLoc(self.frame.PvPIcon, self.moduleSettings.PvPIconOffset['x'], self.moduleSettings.PvPIconOffset['y'])
end,
@ -659,7 +656,7 @@ function PlayerHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.PvPIconOffset['y']
end,
set = function(v)
set = function(info, v)
self.moduleSettings.PvPIconOffset['y'] = v
self:SetTexLoc(self.frame.PvPIcon, self.moduleSettings.PvPIconOffset['x'], self.moduleSettings.PvPIconOffset['y'])
end,
@ -678,7 +675,7 @@ function PlayerHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.PvPIconScale
end,
set = function(v)
set = function(info, v)
self.moduleSettings.PvPIconScale = v
self:SetTexScale(self.frame.PvPIcon, 20, 20, v)
end,
@ -699,7 +696,7 @@ function PlayerHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.showPartyRoleIcon
end,
set = function(value)
set = function(info, value)
self.moduleSettings.showPartyRoleIcon = value
self:CheckPartyRole()
end,
@ -718,7 +715,7 @@ function PlayerHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.PartyRoleIconOffset['x']
end,
set = function(v)
set = function(info, v)
self.moduleSettings.PartyRoleIconOffset['x'] = v
self:SetTexLoc(self.frame.PartyRoleIcon, self.moduleSettings.PartyRoleIconOffset['x'], self.moduleSettings.PartyRoleIconOffset['y'])
end,
@ -737,7 +734,7 @@ function PlayerHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.PartyRoleIconOffset['y']
end,
set = function(v)
set = function(info, v)
self.moduleSettings.PartyRoleIconOffset['y'] = v
self:SetTexLoc(self.frame.PartyRoleIcon, self.moduleSettings.PartyRoleIconOffset['x'], self.moduleSettings.PartyRoleIconOffset['y'])
end,
@ -756,7 +753,7 @@ function PlayerHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.PartyRoleIconScale
end,
set = function(v)
set = function(info, v)
self.moduleSettings.PartyRoleIconScale = v
self:SetTexScale(self.frame.PartyRoleIcon, 20, 20, v)
end,

View File

@ -33,7 +33,7 @@ function PlayerInfo.prototype:GetOptions()
get = function()
return self.moduleSettings.hideBlizz
end,
set = function(value)
set = function(info, value)
self.moduleSettings.hideBlizz = value
if (value) then
self:HideBlizz()

View File

@ -44,7 +44,7 @@ if self:ShouldUseTicker() then
get = function()
return self.moduleSettings.tickerEnabled
end,
set = function(value)
set = function(info, value)
self.moduleSettings.tickerEnabled = value
self:ManaType(self.unit)
end,
@ -65,7 +65,7 @@ if self:ShouldUseTicker() then
get = function()
return self.moduleSettings.tickerAlpha
end,
set = function(value)
set = function(info, value)
self.moduleSettings.tickerAlpha = value
self.tickerFrame.spark:SetVertexColor(self:GetColor("PlayerEnergy", self.moduleSettings.tickerAlpha))
end,
@ -82,7 +82,7 @@ end
get = function()
return self.moduleSettings.scaleManaColor
end,
set = function(value)
set = function(info, value)
self.moduleSettings.scaleManaColor = value
self:Redraw()
end,

View File

@ -58,7 +58,7 @@ function RangeCheck.prototype:GetOptions()
get = function()
return self.moduleSettings.vpos
end,
set = function(v)
set = function(info, v)
self.moduleSettings.vpos = v
self:Redraw()
end,
@ -78,7 +78,7 @@ function RangeCheck.prototype:GetOptions()
get = function()
return self.moduleSettings.hpos
end,
set = function(v)
set = function(info, v)
self.moduleSettings.hpos = v
self:Redraw()
end,
@ -92,13 +92,13 @@ function RangeCheck.prototype:GetOptions()
}
opts["rangeString"] = {
type = 'text',
type = 'input',
name = 'Range string',
desc = 'DogTag-formatted string to use for the range display (only available if LibDogTag is being used)\n\nType /dogtag for a list of available tags',
get = function()
return self.moduleSettings.rangeString
end,
set = function(v)
set = function(info, v)
v = DogTag:CleanCode(v)
self.moduleSettings.rangeString = v
self:RegisterFontStrings()

View File

@ -48,7 +48,7 @@ function Runes.prototype:GetOptions()
get = function()
return self.moduleSettings.vpos
end,
set = function(v)
set = function(info, v)
self.moduleSettings.vpos = v
self:Redraw()
end,
@ -68,7 +68,7 @@ function Runes.prototype:GetOptions()
get = function()
return self.moduleSettings.hpos
end,
set = function(v)
set = function(info, v)
self.moduleSettings.hpos = v
self:Redraw()
end,
@ -88,7 +88,7 @@ function Runes.prototype:GetOptions()
get = function()
return self.moduleSettings.hideBlizz
end,
set = function(value)
set = function(info, value)
self.moduleSettings.hideBlizz = value
if (value) then
self:HideBlizz()
@ -103,17 +103,17 @@ function Runes.prototype:GetOptions()
}
opts["displayMode"] = {
type = 'text',
type = 'select',
name = 'Rune orientation',
desc = 'Whether the runes should draw side-by-side or on top of one another',
get = function()
return self.moduleSettings.displayMode
get = function(info)
return IceHUD:GetSelectValue(info, self.moduleSettings.displayMode)
end,
set = function(v)
self.moduleSettings.displayMode = v
set = function(info, v)
self.moduleSettings.displayMode = info.option.values[v]
self:Redraw()
end,
validate = { "Horizontal", "Vertical" },
values = { "Horizontal", "Vertical" },
disabled = function()
return not self.moduleSettings.enabled
end,
@ -121,62 +121,23 @@ function Runes.prototype:GetOptions()
}
opts["cooldownMode"] = {
type = 'text',
type = 'select',
name = 'Rune cooldown mode',
desc = 'Choose whether the runes use a cooldown-style wipe, simply an alpha fade to show availability or both.',
get = function()
return self.moduleSettings.cooldownMode
get = function(info)
return IceHUD:GetSelectValue(info, self.moduleSettings.cooldownMode)
end,
set = function(v)
self.moduleSettings.cooldownMode = v
set = function(info, v)
self.moduleSettings.cooldownMode = info.option.values[v]
self:Redraw()
end,
validate = { "Cooldown", "Alpha", "Both" },
values = { "Cooldown", "Alpha", "Both" },
disabled = function()
return not self.moduleSettings.enabled
end,
order = 36
}
-- todo: numeric mode isn't supported just yet...so these options are removed for now
--[[
opts["runeFontSize"] = {
type = "range",
name = "Runes Font Size",
desc = "Runes Font Size",
get = function()
return self.moduleSettings.runeFontSize
end,
set = function(v)
self.moduleSettings.runeFontSize = v
self:Redraw()
end,
min = 10,
max = 40,
step = 1,
disabled = function()
return not self.moduleSettings.enabled
end,
order = 33
}
opts["runeMode"] = {
type = "text",
name = "Display Mode",
desc = "Show graphical or numeric runes",
get = function()
return self.moduleSettings.runeMode
end,
set = function(v)
self.moduleSettings.runeMode = v
self:Redraw()
end,
validate = { "Numeric", "Graphical" },
disabled = function()
return not self.moduleSettings.enabled
end,
order = 34
}
]]--
opts["runeGap"] = {
type = 'range',
name = 'Rune gap',
@ -187,7 +148,7 @@ function Runes.prototype:GetOptions()
get = function()
return self.moduleSettings.runeGap
end,
set = function(v)
set = function(info, v)
self.moduleSettings.runeGap = v
self:Redraw()
end,

View File

@ -105,7 +105,7 @@ function SliceAndDice.prototype:GetOptions()
get = function()
return self.moduleSettings.showAsPercentOfMax
end,
set = function(v)
set = function(info, v)
self.moduleSettings.showAsPercentOfMax = v
end,
disabled = function()
@ -124,7 +124,7 @@ function SliceAndDice.prototype:GetOptions()
get = function()
return self.moduleSettings.durationAlpha * 100
end,
set = function(v)
set = function(info, v)
self.moduleSettings.durationAlpha = v / 100.0
self:Redraw()
end,

View File

@ -1,7 +1,6 @@
local AceOO = AceLibrary("AceOO-2.0")
local SunderCount = AceOO.Class(IceElement)
local waterfall = AceLibrary("Waterfall-1.0")
SunderCount.prototype.sunderSize = 20
@ -29,7 +28,7 @@ function SunderCount.prototype:GetOptions()
get = function()
return self.moduleSettings.vpos
end,
set = function(v)
set = function(info, v)
self.moduleSettings.vpos = v
self:Redraw()
end,
@ -49,7 +48,7 @@ function SunderCount.prototype:GetOptions()
get = function()
return self.moduleSettings.sunderFontSize
end,
set = function(v)
set = function(info, v)
self.moduleSettings.sunderFontSize = v
self:Redraw()
end,
@ -63,19 +62,19 @@ function SunderCount.prototype:GetOptions()
}
opts["sunderMode"] = {
type = "text",
type = 'select',
name = "Display Mode",
desc = "Show graphical or numeric sunders",
get = function()
return self.moduleSettings.sunderMode
get = function(info)
return IceHUD:GetSelectValue(info, self.moduleSettings.sunderMode)
end,
set = function(v)
self.moduleSettings.sunderMode = v
set = function(info, v)
self.moduleSettings.sunderMode = info.option.values[v]
self:CreateSunderFrame(true)
self:Redraw()
waterfall:Refresh("IceHUD")
IceHUD:NotifyOptionsChange()
end,
validate = { "Numeric", "Graphical Bar", "Graphical Circle", "Graphical Glow", "Graphical Clean Circle" },
values = { "Numeric", "Graphical Bar", "Graphical Circle", "Graphical Glow", "Graphical Clean Circle" },
disabled = function()
return not self.moduleSettings.enabled
end,
@ -92,7 +91,7 @@ function SunderCount.prototype:GetOptions()
get = function()
return self.moduleSettings.sunderGap
end,
set = function(v)
set = function(info, v)
self.moduleSettings.sunderGap = v
self:Redraw()
end,
@ -109,7 +108,7 @@ function SunderCount.prototype:GetOptions()
get = function()
return self.moduleSettings.gradient
end,
set = function(v)
set = function(info, v)
self.moduleSettings.gradient = v
self:Redraw()
end,

View File

@ -280,7 +280,7 @@ function TargetCC.prototype:GetOptions()
get = function()
return self.moduleSettings.alertParty
end,
set = function(v)
set = function(info, v)
self.moduleSettings.alertParty = v
end,
disabled = function()
@ -295,7 +295,7 @@ function TargetCC.prototype:GetOptions()
get = function()
return self.moduleSettings.onlyShowForMyDebuffs
end,
set = function(v)
set = function(info, v)
self.moduleSettings.onlyShowForMyDebuffs = v
end,
disabled = function()

View File

@ -120,7 +120,7 @@ function TargetCast.prototype:GetOptions()
get = function()
return self.moduleSettings.barVisible['bar']
end,
set = function(v)
set = function(info, v)
self.moduleSettings.barVisible['bar'] = v
if v then
self.barFrame:Show()
@ -141,7 +141,7 @@ function TargetCast.prototype:GetOptions()
get = function()
return self.moduleSettings.barVisible['bg']
end,
set = function(v)
set = function(info, v)
self.moduleSettings.barVisible['bg'] = v
if v then
self.frame.bg:Show()
@ -162,7 +162,7 @@ function TargetCast.prototype:GetOptions()
get = function()
return self.moduleSettings.displayNonInterruptible
end,
set = function(v)
set = function(info, v)
self.moduleSettings.displayNonInterruptible = v
self:Redraw()
end,

View File

@ -76,7 +76,7 @@ function IceTargetHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.classColor
end,
set = function(value)
set = function(info, value)
self.moduleSettings.classColor = value
self:Update(self.unit)
end,
@ -93,7 +93,7 @@ function IceTargetHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.npcHostilityColor
end,
set = function(v)
set = function(info, v)
self.moduleSettings.npcHostilityColor = v
self:Redraw()
end,
@ -110,7 +110,7 @@ function IceTargetHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.hideBlizz
end,
set = function(value)
set = function(info, value)
self.moduleSettings.hideBlizz = value
if (value) then
self:HideBlizz()
@ -131,14 +131,13 @@ function IceTargetHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.allowMouseInteraction
end,
set = function(v)
set = function(info, v)
self.moduleSettings.allowMouseInteraction = v
self:CreateBackground(true)
end,
disabled = function()
return not self.moduleSettings.enabled or not self.DisplayClickTargetOption
end,
usage = '',
order = 43
}
@ -149,7 +148,7 @@ function IceTargetHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.scaleHealthColor
end,
set = function(value)
set = function(info, value)
self.moduleSettings.scaleHealthColor = value
self:Redraw()
end,
@ -167,7 +166,7 @@ if not IceHUD.IceCore:ShouldUseDogTags() then
get = function()
return self.moduleSettings.abbreviateHealth
end,
set = function(v)
set = function(info, v)
self.moduleSettings.abbreviateHealth = v
end,
disabled = function()
@ -193,7 +192,7 @@ end
get = function()
return configMode
end,
set = function(v)
set = function(info, v)
configMode = v
self:CheckPvP()
self:UpdateRaidTargetIcon()
@ -209,7 +208,7 @@ end
get = function()
return self.moduleSettings.lockIconAlpha
end,
set = function(v)
set = function(info, v)
self.moduleSettings.lockIconAlpha = v
self:Redraw()
end,
@ -229,7 +228,7 @@ end
get = function()
return self.moduleSettings.showPvPIcon
end,
set = function(value)
set = function(info, value)
self.moduleSettings.showPvPIcon = value
self:CheckPvP()
end,
@ -245,7 +244,7 @@ end
get = function()
return self.moduleSettings.PvPIconOnTop
end,
set = function(value)
set = function(info, value)
self.moduleSettings.PvPIconOnTop = value
self:CheckPvP()
end,
@ -264,7 +263,7 @@ end
get = function()
return self.moduleSettings.PvPIconOffset['x']
end,
set = function(v)
set = function(info, v)
self.moduleSettings.PvPIconOffset['x'] = v
self:SetTexLoc(self.barFrame.PvPIcon, self.moduleSettings.PvPIconOffset['x'], self.moduleSettings.PvPIconOffset['y'])
end,
@ -283,7 +282,7 @@ end
get = function()
return self.moduleSettings.PvPIconOffset['y']
end,
set = function(v)
set = function(info, v)
self.moduleSettings.PvPIconOffset['y'] = v
self:SetTexLoc(self.barFrame.PvPIcon, self.moduleSettings.PvPIconOffset['x'], self.moduleSettings.PvPIconOffset['y'])
end,
@ -302,7 +301,7 @@ end
get = function()
return self.moduleSettings.PvPIconScale
end,
set = function(v)
set = function(info, v)
self.moduleSettings.PvPIconScale = v
self:SetTexScale(self.barFrame.PvPIcon, 20, 20, v)
end,
@ -325,7 +324,7 @@ end
get = function()
return self.moduleSettings.showRaidIcon
end,
set = function(value)
set = function(info, value)
self.moduleSettings.showRaidIcon = value
self:UpdateRaidTargetIcon()
end,
@ -342,7 +341,7 @@ end
get = function()
return self.moduleSettings.raidIconOnTop
end,
set = function(value)
set = function(info, value)
self.moduleSettings.raidIconOnTop = value
self:UpdateRaidTargetIcon()
end,
@ -362,7 +361,7 @@ end
get = function()
return self.moduleSettings.raidIconXOffset
end,
set = function(value)
set = function(info, value)
self.moduleSettings.raidIconXOffset = value
self:SetRaidIconPlacement()
self:Redraw()
@ -383,7 +382,7 @@ end
get = function()
return self.moduleSettings.raidIconYOffset
end,
set = function(value)
set = function(info, value)
self.moduleSettings.raidIconYOffset = value
self:SetRaidIconPlacement()
self:Redraw()
@ -404,7 +403,7 @@ end
get = function()
return self.moduleSettings.raidIconScale
end,
set = function(v)
set = function(info, v)
self.moduleSettings.raidIconScale = v
self:SetTexScale(self.frame.raidIcon, self.raidIconWidth, self.raidIconHeight, v)
end,
@ -427,7 +426,7 @@ end
get = function()
return self.moduleSettings.showClassificationIcon
end,
set = function(value)
set = function(info, value)
self.moduleSettings.showClassificationIcon = value
self:Redraw()
end,
@ -444,7 +443,7 @@ end
get = function()
return self.moduleSettings.classIconOnTop
end,
set = function(value)
set = function(info, value)
self.moduleSettings.classIconOnTop = value
self:Redraw()
end,
@ -464,7 +463,7 @@ end
get = function()
return self.moduleSettings.classIconOffset['x']
end,
set = function(value)
set = function(info, value)
self.moduleSettings.classIconOffset['x'] = value
self:Redraw()
end,
@ -484,7 +483,7 @@ end
get = function()
return self.moduleSettings.classIconOffset['y']
end,
set = function(value)
set = function(info, value)
self.moduleSettings.classIconOffset['y'] = value
self:Redraw()
end,
@ -504,7 +503,7 @@ end
get = function()
return self.moduleSettings.classIconScale
end,
set = function(v)
set = function(info, v)
self.moduleSettings.classIconScale = v
self:SetTexScale(self.barFrame.classIcon, self.texWidth, self.texHeight, self.moduleSettings.scale / 3.0 * self.moduleSettings.classIconScale)
end,

View File

@ -118,7 +118,7 @@ function IceTargetInfo.prototype:GetOptions()
get = function()
return self.moduleSettings.vpos
end,
set = function(v)
set = function(info, v)
self.moduleSettings.vpos = v
self:Redraw()
end,
@ -138,7 +138,7 @@ function IceTargetInfo.prototype:GetOptions()
get = function()
return self.moduleSettings.hpos
end,
set = function(v)
set = function(info, v)
self.moduleSettings.hpos = v
self:Redraw()
end,
@ -158,7 +158,7 @@ function IceTargetInfo.prototype:GetOptions()
get = function()
return self.moduleSettings.fontSize
end,
set = function(v)
set = function(info, v)
self.moduleSettings.fontSize = v
self:Redraw()
end,
@ -178,7 +178,7 @@ function IceTargetInfo.prototype:GetOptions()
get = function()
return self.moduleSettings.stackFontSize
end,
set = function(v)
set = function(info, v)
self.moduleSettings.stackFontSize = v
self:RedrawBuffs()
end,
@ -198,7 +198,7 @@ function IceTargetInfo.prototype:GetOptions()
get = function()
return self.moduleSettings.zoom
end,
set = function(v)
set = function(info, v)
self.moduleSettings.zoom = v
self:RedrawBuffs()
end,
@ -225,7 +225,7 @@ function IceTargetInfo.prototype:GetOptions()
get = function()
return self.moduleSettings.buffSize
end,
set = function(v)
set = function(info, v)
self.moduleSettings.buffSize = v
self:RedrawBuffs()
end,
@ -245,7 +245,7 @@ function IceTargetInfo.prototype:GetOptions()
get = function()
return self.moduleSettings.ownBuffSize
end,
set = function(v)
set = function(info, v)
self.moduleSettings.ownBuffSize = v
self:RedrawBuffs()
end,
@ -265,7 +265,7 @@ function IceTargetInfo.prototype:GetOptions()
get = function()
return self.moduleSettings.showBuffs
end,
set = function(v)
set = function(info, v)
self.moduleSettings.showBuffs = v
self:RedrawBuffs()
end,
@ -276,20 +276,20 @@ function IceTargetInfo.prototype:GetOptions()
}
opts["filterBuffs"] = {
type = 'text',
type = 'select',
name = 'Only show buffs by me',
desc = 'Will only show buffs that you cast instead of all buffs active',
get = function()
return self.moduleSettings.filterBuffs
get = function(info)
return IceHUD:GetSelectValue(info, self.moduleSettings.filterBuffs)
end,
set = function(v)
self.moduleSettings.filterBuffs = v
set = function(info, v)
self.moduleSettings.filterBuffs = info.option.values[v]
self:RedrawBuffs()
end,
disabled = function()
return not self.moduleSettings.enabled or not self.moduleSettings.showBuffs
end,
validate = { "Never", "In Combat", "Always" },
values = { "Never", "In Combat", "Always" },
order = 36.1
}
@ -300,7 +300,7 @@ function IceTargetInfo.prototype:GetOptions()
get = function()
return self.moduleSettings.showDebuffs
end,
set = function(v)
set = function(info, v)
self.moduleSettings.showDebuffs = v
self:RedrawBuffs()
end,
@ -311,20 +311,20 @@ function IceTargetInfo.prototype:GetOptions()
}
opts["filterDebuffs"] = {
type = 'text',
type = 'select',
name = 'Only show debuffs by me',
desc = 'Will only show debuffs that you cast instead of all debuffs active',
get = function()
return self.moduleSettings.filterDebuffs
get = function(info)
return IceHUD:GetSelectValue(info, self.moduleSettings.filterDebuffs)
end,
set = function(v)
self.moduleSettings.filterDebuffs = v
set = function(info, v)
self.moduleSettings.filterDebuffs = info.option.values[v]
self:RedrawBuffs()
end,
disabled = function()
return not self.moduleSettings.enabled or not self.moduleSettings.showDebuffs
end,
validate = { "Never", "In Combat", "Always" },
values = { "Never", "In Combat", "Always" },
order = 36.3
}
@ -335,7 +335,7 @@ function IceTargetInfo.prototype:GetOptions()
get = function()
return self.moduleSettings.perRow
end,
set = function(v)
set = function(info, v)
self.moduleSettings.perRow = v
self:RedrawBuffs()
end,
@ -355,15 +355,15 @@ function IceTargetInfo.prototype:GetOptions()
}
opts["buffGrowDirection"] = {
type = 'text',
type = 'select',
name = 'Buff grow direction',
desc = 'Which direction the buffs should grow from the anchor point',
validate = { "Left", "Right" },
get = function()
return self.moduleSettings.buffGrowDirection
values = { "Left", "Right" },
get = function(info)
return IceHUD:GetSelectValue(info, self.moduleSettings.buffGrowDirection)
end,
set = function(v)
self.moduleSettings.buffGrowDirection = v
set = function(info, v)
self.moduleSettings.buffGrowDirection = info.option.values[v]
self:CreateBuffFrame()
end,
disabled = function()
@ -373,15 +373,15 @@ function IceTargetInfo.prototype:GetOptions()
}
opts["buffAnchorTo"] = {
type = 'text',
type = 'select',
name = 'Buff anchor to',
desc = 'The point on the TargetInfo frame that the buff frame gets connected to',
validate = ValidAnchors,
get = function()
return self.moduleSettings.buffAnchorTo
values = ValidAnchors,
get = function(info)
return IceHUD:GetSelectValue(info, self.moduleSettings.buffAnchorTo)
end,
set = function(v)
self.moduleSettings.buffAnchorTo = v
set = function(info, v)
self.moduleSettings.buffAnchorTo = info.option.values[v]
self:CreateBuffFrame()
end,
disabled = function()
@ -400,7 +400,7 @@ function IceTargetInfo.prototype:GetOptions()
get = function()
return self.moduleSettings.buffOffset['x']
end,
set = function(v)
set = function(info, v)
self.moduleSettings.buffOffset['x'] = v
self:CreateBuffFrame()
end,
@ -420,7 +420,7 @@ function IceTargetInfo.prototype:GetOptions()
get = function()
return self.moduleSettings.buffOffset['y']
end,
set = function(v)
set = function(info, v)
self.moduleSettings.buffOffset['y'] = v
self:CreateBuffFrame()
end,
@ -437,15 +437,15 @@ function IceTargetInfo.prototype:GetOptions()
}
opts["debuffGrowDirection"] = {
type = 'text',
type = 'select',
name = 'Debuff grow direction',
desc = 'Which direction the debuffs should grow from the anchor point',
validate = { "Left", "Right" },
get = function()
return self.moduleSettings.debuffGrowDirection
values = { "Left", "Right" },
get = function(info)
return IceHUD:GetSelectValue(info, self.moduleSettings.debuffGrowDirection)
end,
set = function(v)
self.moduleSettings.debuffGrowDirection = v
set = function(info, v)
self.moduleSettings.debuffGrowDirection = info.option.values[v]
self:CreateDebuffFrame()
end,
disabled = function()
@ -455,15 +455,15 @@ function IceTargetInfo.prototype:GetOptions()
}
opts["debuffAnchorTo"] = {
type = 'text',
type = 'select',
name = 'Debuff anchor to',
desc = 'The point on the TargetInfo frame that the debuff frame gets connected to',
validate = ValidAnchors,
get = function()
return self.moduleSettings.debuffAnchorTo
values = ValidAnchors,
get = function(info)
return IceHUD:GetSelectValue(info, self.moduleSettings.debuffAnchorTo)
end,
set = function(v)
self.moduleSettings.debuffAnchorTo = v
set = function(info, v)
self.moduleSettings.debuffAnchorTo = info.option.values[v]
self:CreateDebuffFrame()
end,
disabled = function()
@ -482,7 +482,7 @@ function IceTargetInfo.prototype:GetOptions()
get = function()
return self.moduleSettings.debuffOffset['x']
end,
set = function(v)
set = function(info, v)
self.moduleSettings.debuffOffset['x'] = v
self:CreateDebuffFrame()
end,
@ -502,7 +502,7 @@ function IceTargetInfo.prototype:GetOptions()
get = function()
return self.moduleSettings.debuffOffset['y']
end,
set = function(v)
set = function(info, v)
self.moduleSettings.debuffOffset['y'] = v
self:CreateDebuffFrame()
end,
@ -525,7 +525,7 @@ function IceTargetInfo.prototype:GetOptions()
get = function()
return self.moduleSettings.mouseTarget
end,
set = function(v)
set = function(info, v)
self.moduleSettings.mouseTarget = v
self:Redraw()
end,
@ -542,7 +542,7 @@ function IceTargetInfo.prototype:GetOptions()
get = function()
return self.moduleSettings.mouseBuff
end,
set = function(v)
set = function(info, v)
self.moduleSettings.mouseBuff = v
self:RedrawBuffs()
end,
@ -559,13 +559,13 @@ function IceTargetInfo.prototype:GetOptions()
}
opts["line1Tag"] = {
type = 'text',
type = 'input',
name = 'Line 1 tag',
desc = 'DogTag-formatted string to use for the top text line (leave blank to revert to old behavior)\n\nType /dogtag for a list of available tags.\n\nRemember to press ENTER after filling out this box or it will not save.',
get = function()
return self.moduleSettings.line1Tag
end,
set = function(v)
set = function(info, v)
v = DogTag:CleanCode(v)
self.moduleSettings.line1Tag = v
self:RegisterFontStrings()
@ -575,17 +575,18 @@ function IceTargetInfo.prototype:GetOptions()
return not self.moduleSettings.enabled or DogTag == nil
end,
usage = '',
multiline = true,
order = 39.1
}
opts["line2Tag"] = {
type = 'text',
type = 'input',
name = 'Line 2 tag',
desc = 'DogTag-formatted string to use for the second text line (leave blank to revert to old behavior)\n\nType /dogtag for a list of available tags.\n\nRemember to press ENTER after filling out this box or it will not save.',
get = function()
return self.moduleSettings.line2Tag
end,
set = function(v)
set = function(info, v)
v = DogTag:CleanCode(v)
self.moduleSettings.line2Tag = v
self:RegisterFontStrings()
@ -595,17 +596,18 @@ function IceTargetInfo.prototype:GetOptions()
return not self.moduleSettings.enabled or DogTag == nil
end,
usage = '',
multiline = true,
order = 39.2
}
opts["line3Tag"] = {
type = 'text',
type = 'input',
name = 'Line 3 tag',
desc = 'DogTag-formatted string to use for the third text line (leave blank to revert to old behavior)\n\nType /dogtag for a list of available tags.\n\nRemember to press ENTER after filling out this box or it will not save.',
get = function()
return self.moduleSettings.line3Tag
end,
set = function(v)
set = function(info, v)
v = DogTag:CleanCode(v)
self.moduleSettings.line3Tag = v
self:RegisterFontStrings()
@ -615,17 +617,18 @@ function IceTargetInfo.prototype:GetOptions()
return not self.moduleSettings.enabled or DogTag == nil
end,
usage = '',
multiline = true,
order = 39.3
}
opts["line4Tag"] = {
type = 'text',
type = 'input',
name = 'Line 4 tag',
desc = 'DogTag-formatted string to use for the bottom text line (leave blank to revert to old behavior)\n\nType /dogtag for a list of available tags.\n\nRemember to press ENTER after filling out this box or it will not save.',
get = function()
return self.moduleSettings.line4Tag
end,
set = function(v)
set = function(info, v)
v = DogTag:CleanCode(v)
self.moduleSettings.line4Tag = v
self:RegisterFontStrings()
@ -635,6 +638,7 @@ function IceTargetInfo.prototype:GetOptions()
return not self.moduleSettings.enabled or DogTag == nil
end,
usage = '',
multiline = true,
order = 39.4
}

View File

@ -131,7 +131,7 @@ function TargetInvuln.prototype:GetOptions()
get = function()
return self.moduleSettings.alertParty
end,
set = function(v)
set = function(info, v)
self.moduleSettings.alertParty = v
end,
disabled = function()

View File

@ -130,7 +130,7 @@ function IceTargetMana.prototype:GetOptions()
get = function()
return self.moduleSettings.scaleManaColor
end,
set = function(value)
set = function(info, value)
self.moduleSettings.scaleManaColor = value
self:Redraw()
end,
@ -147,7 +147,7 @@ function IceTargetMana.prototype:GetOptions()
get = function()
return self.moduleSettings.onlyShowMana
end,
set = function(v)
set = function(info, v)
self.moduleSettings.onlyShowMana = v
self:Redraw()
end,

View File

@ -35,7 +35,7 @@ function TargetOfTarget.prototype:GetOptions()
get = function()
return self.moduleSettings.vpos
end,
set = function(v)
set = function(info, v)
self.moduleSettings.vpos = v
self:Redraw()
end,
@ -55,7 +55,7 @@ function TargetOfTarget.prototype:GetOptions()
get = function()
return self.moduleSettings.hpos
end,
set = function(v)
set = function(info, v)
self.moduleSettings.hpos = v
self:Redraw()
end,
@ -75,7 +75,7 @@ function TargetOfTarget.prototype:GetOptions()
get = function()
return self.moduleSettings.showDebuffs
end,
set = function(value)
set = function(info, value)
self.moduleSettings.showDebuffs = value
self:UpdateBuffs()
end,
@ -92,7 +92,7 @@ function TargetOfTarget.prototype:GetOptions()
get = function()
return self.moduleSettings.fontSize
end,
set = function(v)
set = function(info, v)
self.moduleSettings.fontSize = v
self:Redraw()
end,
@ -112,7 +112,7 @@ function TargetOfTarget.prototype:GetOptions()
get = function()
return self.moduleSettings.mouse
end,
set = function(v)
set = function(info, v)
self.moduleSettings.mouse = v
self:Redraw()
end,
@ -123,20 +123,20 @@ function TargetOfTarget.prototype:GetOptions()
}
opts["texture"] = {
type = 'text',
type = 'select',
name = 'Texture',
desc = 'ToT frame texture',
get = function()
return self.moduleSettings.texture
get = function(info)
return IceHUD:GetSelectValue(info, self.moduleSettings.texture)
end,
set = function(v)
self.moduleSettings.texture = v
set = function(info, v)
self.moduleSettings.texture = info.option.values[v]
self:Redraw()
end,
disabled = function()
return not self.moduleSettings.enabled
end,
validate = SML:List(SML.MediaType.STATUSBAR),
values = SML:List(SML.MediaType.STATUSBAR),
order = 35
}
@ -147,7 +147,7 @@ function TargetOfTarget.prototype:GetOptions()
get = function()
return self.moduleSettings.sizeToGap
end,
set = function(v)
set = function(info, v)
self.moduleSettings.sizeToGap = v
self:Redraw()
end,
@ -166,7 +166,7 @@ function TargetOfTarget.prototype:GetOptions()
get = function()
return self.moduleSettings.totWidth
end,
set = function(v)
set = function(info, v)
self.moduleSettings.totWidth = v
self:Redraw()
end,

View File

@ -103,7 +103,7 @@ function TargetTargetCast.prototype:GetOptions()
get = function()
return self.moduleSettings.barVisible['bar']
end,
set = function(v)
set = function(info, v)
self.moduleSettings.barVisible['bar'] = v
if v then
self.barFrame:Show()
@ -124,7 +124,7 @@ function TargetTargetCast.prototype:GetOptions()
get = function()
return self.moduleSettings.barVisible['bg']
end,
set = function(v)
set = function(info, v)
self.moduleSettings.barVisible['bg'] = v
if v then
self.frame.bg:Show()
@ -139,20 +139,20 @@ function TargetTargetCast.prototype:GetOptions()
}
opts["selfDisplayMode"] = {
type = "text",
type = 'select',
name = "Self Display Mode",
desc = "What this bar should do whenever the player is the TargetOfTarget",
get = function()
return self.moduleSettings.selfDisplayMode
get = function(info)
return IceHUD:GetSelectValue(info, self.moduleSettings.selfDisplayMode)
end,
set = function(value)
self.moduleSettings.selfDisplayMode = value
set = function(info, value)
self.moduleSettings.selfDisplayMode = info.option.values[value]
self:Redraw()
end,
disabled = function()
return not self.moduleSettings.enabled
end,
validate = SelfDisplayModeOptions,
values = SelfDisplayModeOptions,
order = 44,
}

View File

@ -41,15 +41,15 @@ function TargetTargetHealth.prototype:GetOptions()
opts["hideBlizz"] = nil
opts["selfDisplayMode"] = {
type = "text",
type = 'select',
name = "Self Display Mode",
desc = "What this bar should do whenever the player is the TargetOfTarget\n\nNOTE: When this is set to 'hide', then click-targeting is not available due to Blizzard's restrictions",
get = function()
return self.moduleSettings.selfDisplayMode
get = function(info)
return IceHUD:GetSelectValue(info, self.moduleSettings.selfDisplayMode)
end,
set = function(value)
self.moduleSettings.selfDisplayMode = value
if value == "Hide" then
set = function(info, value)
self.moduleSettings.selfDisplayMode = info.option.values[value]
if info.option.values[value] == "Hide" then
self.moduleSettings.allowMouseInteraction = false
self.DisplayClickTargetOption = false
UnregisterUnitWatch(self.frame)
@ -57,13 +57,13 @@ function TargetTargetHealth.prototype:GetOptions()
RegisterUnitWatch(self.frame)
self.DisplayClickTargetOption = true
end
AceLibrary("Waterfall-1.0"):Refresh("IceHUD")
IceHUD:NotifyOptionsChange()
self:Redraw()
end,
disabled = function()
return not self.moduleSettings.enabled
end,
validate = SelfDisplayModeOptions,
values = SelfDisplayModeOptions,
order = 44,
}
@ -74,7 +74,7 @@ function TargetTargetHealth.prototype:GetOptions()
get = function()
return self.moduleSettings.selfColor.r, self.moduleSettings.selfColor.g, self.moduleSettings.selfColor.b
end,
set = function(r, g, b)
set = function(info, r, g, b)
self.moduleSettings.selfColor = { r = r, g = g, b = b }
IceHUD.IceCore:SetColor("SelfColor", r, g, b)
end,

View File

@ -34,20 +34,20 @@ function TargetTargetMana.prototype:GetOptions()
local opts = TargetTargetMana.super.prototype.GetOptions(self)
opts["selfDisplayMode"] = {
type = "text",
type = 'select',
name = "Self Display Mode",
desc = "What this bar should do whenever the player is the TargetOfTarget",
get = function()
return self.moduleSettings.selfDisplayMode
get = function(info)
return IceHUD:GetSelectValue(info, self.moduleSettings.selfDisplayMode)
end,
set = function(value)
self.moduleSettings.selfDisplayMode = value
set = function(info, value)
self.moduleSettings.selfDisplayMode = info.option.values[value]
self:Redraw()
end,
disabled = function()
return not self.moduleSettings.enabled
end,
validate = SelfDisplayModeOptions,
values = SelfDisplayModeOptions,
order = 44,
}

View File

@ -61,7 +61,7 @@ function IceThreat.prototype:GetOptions()
get = function()
return self.moduleSettings.enabled
end,
set = function(value)
set = function(info, value)
self.moduleSettings.enabled = value
if (value) then
self:Enable(true)
@ -83,7 +83,7 @@ function IceThreat.prototype:GetOptions()
get = function()
return self.moduleSettings.aggroAlpha
end,
set = function(value)
set = function(info, value)
self.moduleSettings.aggroAlpha = value
self:Redraw()
end,
@ -100,7 +100,7 @@ function IceThreat.prototype:GetOptions()
get = function()
return self.moduleSettings.onlyShowInGroups
end,
set = function(v)
set = function(info, v)
self.moduleSettings.onlyShowInGroups = v
self:Redraw()
end,
@ -117,7 +117,7 @@ function IceThreat.prototype:GetOptions()
get = function()
return self.moduleSettings.showScaledThreat
end,
set = function(v)
set = function(info, v)
self.moduleSettings.showScaledThreat = v
self:Redraw()
end,
@ -134,7 +134,7 @@ function IceThreat.prototype:GetOptions()
get = function()
return self.moduleSettings.displaySecondPlaceThreat
end,
set = function(v)
set = function(info, v)
self.moduleSettings.displaySecondPlaceThreat = v
self:Redraw()
end,
@ -151,7 +151,7 @@ function IceThreat.prototype:GetOptions()
get = function()
return self.moduleSettings.secondPlaceThreatAlpha
end,
set = function(v)
set = function(info, v)
self.moduleSettings.secondPlaceThreatAlpha = v
self:Redraw()
end,

View File

@ -53,7 +53,7 @@ function Totems.prototype:GetOptions()
get = function()
return self.moduleSettings.vpos
end,
set = function(v)
set = function(info, v)
self.moduleSettings.vpos = v
self:Redraw()
end,
@ -73,7 +73,7 @@ function Totems.prototype:GetOptions()
get = function()
return self.moduleSettings.hpos
end,
set = function(v)
set = function(info, v)
self.moduleSettings.hpos = v
self:Redraw()
end,
@ -93,7 +93,7 @@ function Totems.prototype:GetOptions()
get = function()
return self.moduleSettings.hideBlizz
end,
set = function(value)
set = function(info, value)
self.moduleSettings.hideBlizz = value
if (value) then
self:HideBlizz()
@ -108,17 +108,17 @@ function Totems.prototype:GetOptions()
}
--]]
opts["displayMode"] = {
type = 'text',
type = 'select',
name = 'Totem orientation',
desc = 'Whether the totems should draw side-by-side or on top of one another',
get = function()
return self.moduleSettings.displayMode
get = function(info)
return IceHUD:GetSelectValue(info, self.moduleSettings.displayMode)
end,
set = function(v)
self.moduleSettings.displayMode = v
set = function(info, v)
self.moduleSettings.displayMode = info.option.values[v]
self:Redraw()
end,
validate = { "Horizontal", "Vertical" },
values = { "Horizontal", "Vertical" },
disabled = function()
return not self.moduleSettings.enabled
end,
@ -126,62 +126,23 @@ function Totems.prototype:GetOptions()
}
opts["cooldownMode"] = {
type = 'text',
type = 'select',
name = 'Totem cooldown mode',
desc = 'Choose whether the totems use a cooldown-style wipe or simply an alpha fade to show availability.',
get = function()
return self.moduleSettings.cooldownMode
get = function(info)
return IceHUD:GetSelectValue(info, self.moduleSettings.cooldownMode)
end,
set = function(v)
self.moduleSettings.cooldownMode = v
set = function(info, v)
self.moduleSettings.cooldownMode = info.option.values[v]
self:Redraw()
end,
validate = { "Cooldown" }, -- "Alpha" not supported?
values = { "Cooldown" }, -- "Alpha" not supported?
disabled = function()
return not self.moduleSettings.enabled
end,
order = 36
}
-- todo: numeric mode isn't supported just yet...so these options are removed for now
--[[
opts["runeFontSize"] = {
type = "range",
name = "Runes Font Size",
desc = "Runes Font Size",
get = function()
return self.moduleSettings.runeFontSize
end,
set = function(v)
self.moduleSettings.runeFontSize = v
self:Redraw()
end,
min = 10,
max = 40,
step = 1,
disabled = function()
return not self.moduleSettings.enabled
end,
order = 33
}
opts["runeMode"] = {
type = "text",
name = "Display Mode",
desc = "Show graphical or numeric runes",
get = function()
return self.moduleSettings.runeMode
end,
set = function(v)
self.moduleSettings.runeMode = v
self:Redraw()
end,
validate = { "Numeric", "Graphical" },
disabled = function()
return not self.moduleSettings.enabled
end,
order = 34
}
]]--
opts["totemGap"] = {
type = 'range',
name = 'Totem gap',
@ -192,7 +153,7 @@ function Totems.prototype:GetOptions()
get = function()
return self.moduleSettings.totemGap
end,
set = function(v)
set = function(info, v)
self.moduleSettings.totemGap = v
self:Redraw()
end,