WoWInterface SVN mRunes

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 5 to Rev 4
    Reverse comparison

Rev 5 → Rev 4

mRunes/mRunes.toc New file
0,0 → 1,19
## Interface: 30300
## Title: mRunes
## Notes: Replacement for default Rune Frame and more.
## Author: mangeg
## SavedVariables: mRunesDB
## OptionalDeps: Ace3, LibSharedMedia-3.0, AceGUI-3.0-SharedMediaWidgets, LibDataBroker-1.1, LibGUIFactory-1.0
## Version: 1.0
## X-Curse-Packaged-Version: 1.03
## X-Curse-Project-Name: mRunes
## X-Curse-Project-ID: mrunes
## X-Curse-Repository-ID: wow/mrunes/mainline
 
Libs\modules.xml
 
mRunes.lua
 
Modules\Rumes.lua
Modules\RunicPower.lua
Modules\Diseases.lua
\ No newline at end of file
mRunes/accid.ttf Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes : Added: svn:mime-type + application/octet-stream
mRunes/HalD.tga Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes : Added: svn:mime-type + application/octet-stream
mRunes/Modules/Rumes.lua New file
0,0 → 1,361
local _, class = UnitClass("player")
if class ~= "DEATHKNIGHT" then
return
end
 
local plugin = mRunes:NewModule("Runes", "AceEvent-3.0")
plugin.mRunesPlugin = true
MRUNES_RUNES = plugin
 
local AceGUI = LibStub("AceGUI-3.0")
local LSM = LibStub("LibSharedMedia-3.0")
local UIF
local db
 
-- Rune Types
local RUNETYPE_BLOOD = 1;
local RUNETYPE_UNHOLY = 2;
local RUNETYPE_FROST = 3;
local RUNETYPE_DEATH = 4;
 
local NrRunes = 6
local InCombat = false
local RuneOnCD = false
 
function plugin:OnInitialize()
local defaults = {
profile = {
Enabled = true,
HideBlizz = true,
x = 0,
y = 0,
InternalSpacing = 1,
FrameColor = {0, 0, 0, 0.5},
 
RuneSpacing = 1,
RuneWidth = 55,
RuneHeight = 20,
RuneTexture = "HalD",
RuneAlphaInCombat = 1,
RuneAlphaOutCombat = 0.2,
RuneAlphaActive = 0.5,
RuneCooldownInset = 2,
RuneCooldownAlwaysShow = false,
RuneCooldownShow = true,
RuneCooldownHorAlign = "LEFT",
RuneCooldownVerAlign = "BOTTOM",
 
Font = "accid",
FontSize = 16,
FontFlags = "OUTLINE",
FontColor = {1, 1, 1, 1},
 
RuneColors = {
[RUNETYPE_BLOOD] = {1.0, 0.0, 0.0, 1},
[RUNETYPE_UNHOLY] ={0.0, 0.8, 0.0, 1},
[RUNETYPE_FROST] = {0.0, 1.0, 1.0, 1},
[RUNETYPE_DEATH] = {0.8, 0.1, 1.0, 1},
}
}
}
 
self.db = mRunes.db:RegisterNamespace(self:GetName(), defaults)
self.db.RegisterCallback(self, "OnProfileChanged", "ProfileChanged")
self.db.RegisterCallback(self, "OnProfileCopied", "ProfileChanged")
self.db.RegisterCallback(self, "OnProfileReset", "ProfileChanged")
db = self.db.profile
 
self:SetEnabledState(db.Enabled)
 
UIF = LibStub("LibGUIFactory-1.0"):GetFactory("mRunes")
end
 
function plugin:OnEnable()
if not mRuneFrame then
self:CreateFuneFrame()
end
 
self:ApplySettings()
self.Frame:Show()
 
self:RegisterEvent("RUNE_TYPE_UPDATE", "RuneTypeUpdate")
self:RegisterEvent("RUNE_POWER_UPDATE", "RuneStateChange")
self:RegisterEvent("PLAYER_ENTERING_WORLD", "EnterWorld")
 
mRunes.RegisterCallback(self, "EnteringCombat")
mRunes.RegisterCallback(self, "LeavingCombat")
 
if UnitAffectingCombat("player") then
self:EnteringCombat("EnteringCombat")
else
self:LeavingCombat("LeavingCombat")
end
 
end
 
function plugin:OnDisable()
self.Frame:Hide()
end
 
function plugin:ProfileChanged()
db = self.db.profile
self:ApplySettings()
end
 
-- ~~~~~~~~~~~~~~~~~~~~
-- Callbacks ~~~~~~~~~~
-- ~~~~~~~~~~~~~~~~~~~~
function plugin:EnteringCombat(event)
mRunes.FadeIn(self.Frame, false, db.RuneAlphaInCombat)
InCombat = true
RuneOnCD = false
end
 
function plugin:LeavingCombat(event)
mRunes.FadeOut(self.Frame, db.AlphaOutCombat)
InCombat = false
end
 
function plugin:EnterWorld(...)
if self.Runes then
for i, rune in pairs(self.Runes) do
rune.Update = true
self:RuneTypeUpdate("RUNE_TYPE_UPDATE", i)
end
end
end
 
-- ~~~~~~~~~~~~~~~~~~~~
-- Events ~~~~~~~~~~~~~
-- ~~~~~~~~~~~~~~~~~~~~
 
-- Rune type changed (unholy runes)
function plugin:RuneTypeUpdate(event, runeID)
self.Runes[runeID]:SetStatusBarColor(unpack(db.RuneColors[GetRuneType(runeID)]))
end
 
-- Rune Ready/Not Ready event
function plugin:RuneStateChange(event, runeID, ready)
if runeID == 8 or runeID == 7 then return end
 
if ready then
self.Runes[runeID]:SetValue(1)
self.Runes[runeID].Update = nil
self.Runes[runeID].CDText:SetText(("%.1f"):format(0))
if not db.RuneCooldownAlwaysShow then
self.Runes[runeID].CDText:Hide()
end
else
self.Runes[runeID].Update = not ready
end
end
 
local function Update(self, elapsed)
self = plugin
local haveCD = false
local oldHaveCD = RuneOnCD
for i, rune in pairs(self.Runes) do
if rune.Update then
local StartTime, CooldownTime, Ready = GetRuneCooldown(i)
local diff = GetTime() - StartTime
local remaining = CooldownTime - diff
local t = diff / CooldownTime
rune:SetValue(t)
if remaining < 0 and not db.RuneCooldownAlwaysShow then
rune.CDText:Hide()
elseif db.RuneCooldownShow then
rune.CDText:Show()
rune.CDText:SetText(("%.1f"):format(Ready and 0 or (remaining < 0 and 0 or remaining)))
end
 
if Ready then rune.Update = nil else haveCD = true end
end
end
 
if not InCombat then
RuneOnCD = haveCD
if RuneOnCD and (RuneOnCD ~= oldHaveCD) then
local currAlpha = self.Frame:GetAlpha()
if currAlpha < db.RuneAlphaActive then
mRunes.FadeIn(self.Frame, false, db.RuneAlphaActive)
else
mRunes.FadeOut(self.Frame, db.RuneAlphaActive)
end
elseif not RuneOnCD and (RuneOnCD ~= oldHaveCD) then
mRunes.FadeOut(self.Frame, db.RuneAlphaOutCombat)
end
end
end
 
-- ~~~~~~~~~~~~~~~~~~~~
-- Settings ~~~~~~~~~~~
-- ~~~~~~~~~~~~~~~~~~~~
function plugin:ApplySettings()
if self.Frame then
self.Frame:ClearAllPoints()
 
self.Frame:SetPoint("CENTER", mRunes.MainFrame, "CENTER", db.x, db.y)
self.Frame:SetWidth(db.RuneWidth * NrRunes + db.RuneSpacing * 5 + db.InternalSpacing * 2)
self.Frame:SetHeight(db.RuneHeight + db.InternalSpacing * 2)
 
self.Frame:SetAlpha(InCombat and db.RuneAlphaInCombat or db.RuneAlphaOutCombat)
 
for i, rune in pairs(self.Runes) do
rune:ClearAllPoints()
if i == 1 then
rune:SetPoint("LEFT", db.InternalSpacing, 0)
else
rune:SetPoint("LEFT", self.Runes[i - 1], "RIGHT", db.RuneSpacing, 0)
end
rune:SetWidth(db.RuneWidth)
rune:SetHeight(db.RuneHeight)
rune:SetStatusBarTexture(LSM:Fetch("statusbar", db.RuneTexture))
rune:GetStatusBarTexture():SetHorizTile(false)
rune:SetStatusBarColor(unpack(db.RuneColors[GetRuneType(i)]))
 
rune.CDText:ClearAllPoints()
rune.CDText:SetPoint("TOPLEFT", db.RuneCooldownInset, -db.RuneCooldownInset)
rune.CDText:SetPoint("BOTTOMRIGHT", -db.RuneCooldownInset, db.RuneCooldownInset)
rune.CDText:SetFont(LSM:Fetch("font", db.Font), db.FontSize, db.FontFlags)
rune.CDText:SetTextColor(unpack(db.FontColor))
rune.CDText:SetJustifyH(db.RuneCooldownHorAlign)
rune.CDText:SetJustifyV(db.RuneCooldownVerAlign)
 
if db.RuneCooldownAlwaysShow and db.RuneCooldownShow then
rune.CDText:Show()
else
rune.CDText:Hide()
end
rune.Update = true
end
 
self.Frame:SetAlpha(InCombat and db.RuneAlphaInCombat or (RuneOnCD and db.RuneAlphaActive or db.RuneAlphaOutCombat))
if self.Frame:GetAlpha() > 0 then self.Frame:Show() else self.Frame:Hide() end
 
self.Frame.bg:SetTexture(unpack(db.FrameColor))
end
 
if db.HideBlizz then RuneFrame:Hide()
else RuneFrame:Show() end
 
if not db.Enabled and self:IsEnabled() then self:Disable()
elseif db.Enabled and not self:IsEnabled() then self:Enable() end
end
 
-- ~~~~~~~~~~~~~~~~~~~~
-- Create Frames ~~~~~~
-- ~~~~~~~~~~~~~~~~~~~~
function plugin:CreateFuneFrame()
local frame = CreateFrame("Frame", "mRunesRuneFrame", UIParent)
frame.bg = frame:CreateTexture()
frame.bg:SetAllPoints()
 
mRunes:RegisterOnUpdate(frame, Update)
 
self.Runes = {}
for i = 1, NrRunes do
self.Runes[i] = self:CreateRune(i, frame)
end
 
frame:Show()
 
self.Frame = frame
end
 
function plugin:CreateRune(runeID, parent)
local rune = CreateFrame("StatusBar", "mRunesRune"..runeID, parent)
rune:SetMinMaxValues(0,1)
rune:SetValue(1)
 
local runeCooldown = rune:CreateFontString(nil, nil, "GameFontNormal")
rune.CDText = runeCooldown
 
rune.Update = true
rune:Show()
 
return rune
end
 
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- Options ~~~~~~~~~~~~~~~~~~~~
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function plugin:GetOptions()
return plugin.GetGUI
end
 
do
local function Callback()
plugin:ApplySettings()
end
 
local FontFlagList = {
["NONE"] = "None",
["OUTLINE"] = "Outline",
["THICKOUTLINE"] = "Thick Outline",
["MONOCHROME"] = "Monochrome",
}
 
local VerticalAlignList = {
["TOP"] = "Top",
["MIDDLE"] = "Middle",
["BOTTOM"] = "Bottom",
}
 
local HorizontalAlignList = {
["LEFT"] = "Left",
["CENTER"] = "Center",
["RIGHT"] = "Right",
}
 
 
function plugin:GetGUI()
self = plugin
 
local returnGroup = AceGUI:Create("SimpleGroup")
returnGroup:SetFullWidth(true)
returnGroup:SetLayout("Flow")
 
returnGroup:AddChild(UIF:CheckBox("Enabled", db, "Enabled", Callback, nil, 0.33))
returnGroup:AddChild(UIF:CheckBox("Hide standard rune frame", db, "HideBlizz", Callback, nil, 0.33))
 
local group = UIF:InlineGroup1("Position and Size")
returnGroup:AddChild(group)
group:AddChild(UIF:Text1("Positions here are relative to the mRunes main position"))
group:AddChild(UIF:PositionSlider("x", "X", db, "x", 0.1, Callback, 0.5))
group:AddChild(UIF:PositionSlider("y", "Y", db, "y", 0.1, Callback, 0.5))
group:AddChild(UIF:Slider("Width", db, "RuneWidth", 5, 200, 0.1, Callback, 0.5))
group:AddChild(UIF:Slider("Height", db, "RuneHeight", 5, 200, 0.1, Callback, 0.5))
group:AddChild(UIF:Slider("Rune spacing", db, "RuneSpacing", 0, 100, 0.1, Callback, 0.5))
group:AddChild(UIF:Slider("Background Space", db, "InternalSpacing", 0, 100, 0.1, Callback, 0.5))
 
group = UIF:InlineGroup1("Colors")
returnGroup:AddChild(group)
group:AddChild(UIF:ColorSelect("Blood", db.RuneColors, 1, Callback, true, 0.25))
group:AddChild(UIF:ColorSelect("Unholy", db.RuneColors, 2, Callback, true, 0.25))
group:AddChild(UIF:ColorSelect("Frost", db.RuneColors, 3, Callback, true, 0.25))
group:AddChild(UIF:ColorSelect("Death", db.RuneColors, 4, Callback, true, 0.25))
group:AddChild(UIF:ColorSelect("Background Color", db, "FrameColor", Callback, true, 0.5))
group:AddChild(UIF:LSMDropdown("statusbar", "Texture", db, "RuneTexture", Callback, 0.5))
 
group = UIF:InlineGroup1("Alpha")
returnGroup:AddChild(group)
group:AddChild(UIF:Slider("In combat", db, "RuneAlphaInCombat", 0, 1, 0.01, Callback, 0.33))
group:AddChild(UIF:Slider("No combat (Runes on cooldown)", db, "RuneAlphaActive", 0, 1, 0.01, Callback, 0.33))
group:AddChild(UIF:Slider("No combat (No runes on cooldown)", db, "RuneAlphaOutCombat", 0, 1, 0.01, Callback, 0.33))
 
group = UIF:InlineGroup1("Font")
returnGroup:AddChild(group)
group:AddChild(UIF:Text1("These settings are for the cooldown text on each rune"))
group:AddChild(UIF:LSMDropdown("font", "Font", db, "Font", Callback, 0.5))
group:AddChild(UIF:Dropdown("Font Flags", db, "FontFlags", Callback, FontFlagList, 0.5))
group:AddChild(UIF:ColorSelect("Color", db, "FontColor", Callback, false, 0.2))
group:AddChild(UIF:Slider("Size", db, "FontSize", 2, 50, 1, Callback, 0.4))
group:AddChild(UIF:Slider("Spacing", db, "RuneCooldownInset", 0, 50, 0.1, Callback, 0.4))
group:AddChild(UIF:Dropdown("Horizontal Align", db, "RuneCooldownHorAlign", Callback, HorizontalAlignList, 0.5))
group:AddChild(UIF:Dropdown("Vertical Align", db, "RuneCooldownVerAlign", Callback, VerticalAlignList, 0.5))
group:AddChild(UIF:CheckBox("Show", db, "RuneCooldownShow", Callback, "Toggle if the cooldown text should used and shown", 0.5))
group:AddChild(UIF:CheckBox("Always Show", db, "RuneCooldownAlwaysShow", Callback, "Toggle if the cooldown text should always be shown", 0.5))
 
return returnGroup
end
end
\ No newline at end of file
mRunes/Modules/RunicPower.lua New file
0,0 → 1,291
local _, class = UnitClass("player")
if class ~= "DEATHKNIGHT" then
return
end
 
local plugin = mRunes:NewModule("Runic Power", "AceEvent-3.0")
plugin.mRunesPlugin = true
MRUNES_RUNIC_POWER = plugin
 
local AceGUI = LibStub("AceGUI-3.0")
local LSM = LibStub("LibSharedMedia-3.0")
local UIF
local db
 
local InCombat = false
local HaveRP = false
 
function plugin:OnInitialize()
local defaults = {
profile = {
Enabled = true,
x = 0,
y = -21,
Width = 337,
Height = 20,
ExternalSpacing = 1,
InternalSpacing = 1,
BackgroundColor = {0, 0, 0, 0.5},
AlphaIncCombat = 1,
AlphaOutCombat = 0.2,
AlphaActive = 0.5,
 
HorAlign = "RIGHT",
VerAlign = "BOTTOM",
AlwaysShowText = false,
ShowText = true,
 
Font = "accid",
FontSize = 16,
FontFlags = "OUTLINE",
FontColor = {1, 1, 1, 1},
 
Texture = "HalD",
PowerColor = {0, 0.82, 1, 1},
}
}
 
self.db = mRunes.db:RegisterNamespace(self:GetName(), defaults)
self.db.RegisterCallback(self, "OnProfileChanged", "ProfileChanged")
self.db.RegisterCallback(self, "OnProfileCopied", "ProfileChanged")
self.db.RegisterCallback(self, "OnProfileReset", "ProfileChanged")
db = self.db.profile
 
self:SetEnabledState(db.Enabled)
 
UIF = LibStub("LibGUIFactory-1.0"):GetFactory("mRunes")
end
 
function plugin:OnEnable()
if not self.PowerFrame then
self:CreatePowerFrame()
end
 
self:ApplySettings()
 
self:RegisterEvent("UNIT_MAXRUNIC_POWER", "RunicPowerChange")
self:RegisterEvent("UNIT_RUNIC_POWER", "RunicPowerChange")
mRunes.RegisterCallback(self, "EnteringCombat")
mRunes.RegisterCallback(self, "LeavingCombat")
 
if UnitAffectingCombat("player") then
self:EnteringCombat("EnteringCombat")
else
self:LeavingCombat("LeavingCombat")
end
 
mRunes:RegisterOnUpdate(self.PowerFrame, self.RunicPowerChange, 1)
end
 
function plugin:OnDisable()
mRunes:UnregisterOnUpdate(self.PowerFrame, self.RunicPowerChange)
if self.PowerFrame then mRunes.FadeOut(self.PowerFrame) end
end
 
function plugin:ProfileChanged()
db = self.db.profile
self:ApplySettings()
end
 
-- ~~~~~~~~~~~~~~~~~~~~
-- Callbacks ~~~~~~~~~~
-- ~~~~~~~~~~~~~~~~~~~~
function plugin:EnteringCombat(event)
mRunes.FadeIn(self.PowerFrame, false, db.AlphaIncCombat)
InCombat = true
HaveRP = false
end
 
function plugin:LeavingCombat(event)
if UnitPower("player") <= 0 then mRunes.FadeOut(self.PowerFrame, db.AlphaOutCombat) end
InCombat = false
end
 
function plugin:EnterWorld(...)
end
 
-- ~~~~~~~~~~~~~~~~~~~~
-- Events ~~~~~~~~~~~~~
-- ~~~~~~~~~~~~~~~~~~~~
function plugin:RunicPowerChange(event, unit)
self = plugin
if unit and unit ~= "player" then return end
local power = UnitPower("player")
local maxPower = UnitPowerMax("player")
local p = power / maxPower
local haveRP = false
local oldHaveRP = HaveRP
if power > 0 then
haveRP = true
self.PowerFrame.bar:SetValue(p)
self.PowerFrame.text:SetText(power.." / "..maxPower)
if db.ShowText and not self.PowerFrame.text:IsShown() then self.PowerFrame.text:Show() end
else
self.PowerFrame.bar:SetValue(0)
self.PowerFrame.text:SetText("0 / "..maxPower)
if not db.AlwaysShowText then
if self.PowerFrame.text:IsShown() then self.PowerFrame.text:Hide() end
elseif db.ShowText then
if not self.PowerFrame.text:IsShown() then self.PowerFrame.text:Show() end
else
if self.PowerFrame.text:IsShown() then self.PowerFrame.text:Hide() end
end
end
 
if not InCombat then
HaveRP = haveRP
if HaveRP and (HaveRP ~= oldHaveRP) then
local currAlpha = self.PowerFrame:GetAlpha()
if currAlpha < db.AlphaActive then
mRunes.FadeIn(self.PowerFrame, false, db.AlphaActive)
else
mRunes.FadeOut(self.PowerFrame, db.AlphaActive)
local t = 2
end
elseif not HaveRP and (HaveRP ~= oldHaveRP) then
mRunes.FadeOut(self.PowerFrame, db.AlphaOutCombat)
end
end
end
 
-- ~~~~~~~~~~~~~~~~~~~~
-- Settings ~~~~~~~~~~~
-- ~~~~~~~~~~~~~~~~~~~~
function plugin:ApplySettings()
local PowerFrame = self.PowerFrame
if PowerFrame then
PowerFrame:ClearAllPoints()
PowerFrame:SetPoint("CENTER", mRunes.MainFrame, "CENTER", db.x, db.y)
PowerFrame:SetWidth(db.Width)
PowerFrame:SetHeight(db.Height)
 
PowerFrame.text:SetPoint("TOPLEFT", db.InternalSpacing, -db.InternalSpacing)
PowerFrame.text:SetPoint("BOTTOMRIGHT", -db.InternalSpacing, db.InternalSpacing)
PowerFrame.text:SetFont(LSM:Fetch("font", db.Font), db.FontSize, db.FontFlags)
PowerFrame.text:SetTextColor(unpack(db.FontColor))
PowerFrame.text:SetJustifyH(db.HorAlign)
PowerFrame.text:SetJustifyV(db.VerAlign)
 
local bar = PowerFrame.bar
bar:ClearAllPoints()
bar:SetPoint("TOPLEFT", db.ExternalSpacing, -db.ExternalSpacing)
bar:SetPoint("BOTTOMRIGHT", -db.ExternalSpacing, db.ExternalSpacing)
 
bar:SetStatusBarTexture(LSM:Fetch("statusbar", db.Texture))
bar:GetStatusBarTexture():SetHorizTile(false)
bar:SetStatusBarColor(unpack(db.PowerColor))
 
PowerFrame.bg:SetTexture(unpack(db.BackgroundColor))
 
PowerFrame:SetAlpha(InCombat and db.AlphaIncCombat or (HaveRP and db.AlphaActive or db.AlphaOutCombat))
if PowerFrame:GetAlpha() > 0 then PowerFrame:Show() else PowerFrame:Hide() end
if db.AlwaysShowText and db.ShowText then
PowerFrame.text:Show()
else
PowerFrame.text:Hide()
end
 
self:RunicPowerChange("UNIT_RUNIC_POWER", "player")
end
 
if not db.Enabled and self:IsEnabled() then self:Disable()
elseif db.Enabled and not self:IsEnabled() then self:Enable() end
end
 
-- ~~~~~~~~~~~~~~~~~~~~
-- Create Frames ~~~~~~
-- ~~~~~~~~~~~~~~~~~~~~
function plugin:CreatePowerFrame()
local frame = CreateFrame("Frame", nil, UIParent)
local bg = frame:CreateTexture()
bg:SetAllPoints()
frame.bg = bg
 
local bar = CreateFrame("StatusBar", nil, frame)
bar:SetMinMaxValues(0,1)
frame.bar = bar
 
local text = bar:CreateFontString(nil, nil, "GameFontNormal")
frame.text = text
 
self.PowerFrame = frame
end
 
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- Options ~~~~~~~~~~~~~~~~~~~~
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function plugin:GetOptions()
return plugin.GetGUI
end
 
do
local function Callback()
plugin:ApplySettings()
end
 
local FontFlagList = {
["NONE"] = "None",
["OUTLINE"] = "Outline",
["THICKOUTLINE"] = "Thick Outline",
["MONOCHROME"] = "Monochrome",
}
 
local VerticalAlignList = {
["TOP"] = "Top",
["MIDDLE"] = "Middle",
["BOTTOM"] = "Bottom",
}
 
local HorizontalAlignList = {
["LEFT"] = "Left",
["CENTER"] = "Center",
["RIGHT"] = "Right",
}
 
 
function plugin:GetGUI()
self = plugin
 
local returnGroup = AceGUI:Create("SimpleGroup")
returnGroup:SetFullWidth(true)
returnGroup:SetLayout("Flow")
 
returnGroup:AddChild(UIF:CheckBox("Enabled", db, "Enabled", Callback, nil, 0.33))
 
local group = UIF:InlineGroup1("Position and Size")
returnGroup:AddChild(group)
group:AddChild(UIF:Text1("Positions here are relative to the mRunes main position"))
group:AddChild(UIF:PositionSlider("x", "X", db, "x", 0.1, Callback, 0.5))
group:AddChild(UIF:PositionSlider("y", "Y", db, "y", 0.1, Callback, 0.5))
group:AddChild(UIF:Slider("Width", db, "Width", 5, 1000, 0.1, Callback, 0.5))
group:AddChild(UIF:Slider("Height", db, "Height", 5, 200, 0.1, Callback, 0.5))
group:AddChild(UIF:Slider("Background Space", db, "ExternalSpacing", 0, 100, 0.1, Callback, 0.5))
 
group = UIF:InlineGroup1("Colors")
returnGroup:AddChild(group)
group:AddChild(UIF:ColorSelect("Runic Power color", db, "PowerColor", Callback, true, 0.25))
group:AddChild(UIF:ColorSelect("Background Color", db, "BackgroundColor", Callback, true, 0.25))
group:AddChild(UIF:LSMDropdown("statusbar", "Texture", db, "Texture", Callback, 0.5))
 
group = UIF:InlineGroup1("Alpha")
returnGroup:AddChild(group)
group:AddChild(UIF:Slider("In combat", db, "AlphaIncCombat", 0, 1, 0.01, Callback, 0.33))
group:AddChild(UIF:Slider("No combat (RP > 0)", db, "AlphaActive", 0, 1, 0.01, Callback, 0.33))
group:AddChild(UIF:Slider("No Combat (RP = 0)", db, "AlphaOutCombat", 0, 1, 0.01, Callback, 0.33))
 
group = UIF:InlineGroup1("Font")
returnGroup:AddChild(group)
group:AddChild(UIF:Text1("These settings are for the cooldown text on each rune"))
group:AddChild(UIF:LSMDropdown("font", "Font", db, "Font", Callback, 0.5))
group:AddChild(UIF:Dropdown("Font Flags", db, "FontFlags", Callback, FontFlagList, 0.5))
group:AddChild(UIF:ColorSelect("Color", db, "FontColor", Callback, false, 0.2))
group:AddChild(UIF:Slider("Size", db, "FontSize", 2, 50, 1, Callback, 0.4))
group:AddChild(UIF:Slider("Spacing", db, "InternalSpacing", 0, 50, 0.1, Callback, 0.4))
group:AddChild(UIF:Dropdown("Horizontal Align", db, "HorAlign", Callback, HorizontalAlignList, 0.5))
group:AddChild(UIF:Dropdown("Vertical Align", db, "VerAlign", Callback, VerticalAlignList, 0.5))
group:AddChild(UIF:CheckBox("Show", db, "ShowText", Callback, "Toggle if the runic power text should be shown.", 0.5))
group:AddChild(UIF:CheckBox("Always Show", db, "AlwaysShowText", Callback, "Toggle if the runic power text should always be shown. If not it will be hidden when the runc power is at 0", 0.5))
 
return returnGroup
end
end
\ No newline at end of file
mRunes/Modules/Diseases.lua --- mRunes/Libs/AceAddon-3.0/AceAddon-3.0.xml (revision 0) +++ mRunes/Libs/AceAddon-3.0/AceAddon-3.0.xml (revision 4) @@ -0,0 +1,4 @@ + +