-RaidFrameCustomization = LibStub("AceAddon-3.0"):NewAddon("RaidFrameCustomization");
+OmaRF = LibStub("AceAddon-3.0"):NewAddon("OmaRF");
-RaidFrameCustomization.normalBarColor = CreateColor(0.3, 0.3, 0.3);
-RaidFrameCustomization.dispelBarColor = CreateColor(1, 0.5, 0);
-RaidFrameCustomization.normalBackColor = {0.7, 0.7, 0.7};
-RaidFrameCustomization.dispelBackColor = {0.5, 0.2, 0};
+OmaRF.normalBarColor = CreateColor(0.3, 0.3, 0.3);
+OmaRF.dispelBarColor = CreateColor(1, 0.5, 0);
+OmaRF.normalBackColor = {0.7, 0.7, 0.7};
+OmaRF.dispelBackColor = {0.5, 0.2, 0};
-RaidFrameCustomization.frames = {};
-RaidFrameCustomization.positions = {
+OmaRF.frames = {};
+OmaRF.positions = {
"TOPLEFT", "TOPRIGHT", "CENTER", "BOTTOMLEFT", "BOTTOMRIGHT"
};
-RaidFrameCustomization.running = false;
+OmaRF.running = false;
local defaults = {
profile = {
}
};
-function RaidFrameCustomization:OnInitialize()
- self.db = LibStub("AceDB-3.0"):New("RaidFrameCustomizationDB", defaults);
+function OmaRF:OnInitialize()
+ self.db = LibStub("AceDB-3.0"):New("OmaRFDB", defaults);
self.db.RegisterCallback(self, "OnProfileChanged", "RefreshConfig");
self.db.RegisterCallback(self, "OnProfileCopied", "RefreshConfig");
self.db.RegisterCallback(self, "OnProfileReset", "RefreshConfig");
end
-function RaidFrameCustomization:OnEnable()
+function OmaRF:OnEnable()
self:RefreshConfig();
end
-function RaidFrameCustomization:OnDisable()
+function OmaRF:OnDisable()
self.running = false;
for _, frame in pairs(self.frames) do
for _, ind in pairs(frame) do
end
end
-SLASH_RAIDFRAMECUSTOM1 = "/raidframecustom";
-function SlashCmdList.RAIDFRAMECUSTOM(msg, editBox)
- local loaded, finished = IsAddonLoaded("RaidFrameCustomizationConfig");
+SLASH_OMARF1 = "/omarf";
+function SlashCmdList.OMARF(msg, editBox)
+ local loaded, finished = IsAddonLoaded("OmaRFConfig");
if not loaded then
- local loaded, reason = LoadAddon("RaidFrameCustomizationConfig");
+ local loaded, reason = LoadAddon("OmaRFConfig");
if not loaded then
if reason == "DISABLED" then
- print("RaidFrameCustomizationConfig is disabled");
+ print("OmaRFConfig is disabled");
elseif reason == "MISSING" then
- print("RaidFrameCustomizationConfig is missing");
+ print("OmaRFConfig is missing");
elseif reason == "CORRUPT" then
- print("RaidFrameCustomizationConfig is corrupt");
+ print("OmaRFConfig is corrupt");
elseif reason == "INCOMPATIBLE" then
- print("RaidFrameCustomizationConfig is incompatible");
+ print("OmaRFConfig is incompatible");
elseif reason == "INTERFACE_VERSION" then
- print("RaidFrameCustomizationConfig has wrong interface version");
+ print("OmaRFConfig has wrong interface version");
end
return;
end
return;
end
- InterfaceOptionsFrame_OpenToCategory(RaidFrameCustomization.optionsFrames.Indicators);
+ InterfaceOptionsFrame_OpenToCategory(OmaRF.optionsFrames.Indicators);
end
local media = LibStub:GetLibrary("LibSharedMedia-3.0");
-local f = RaidFrameCustomization.frames;
-local positions = RaidFrameCustomization.positions;
+local f = OmaRF.frames;
+local positions = OmaRF.positions;
local pad = 2;
local paddings = {
TOPLEFT = {pad, -pad},
};
local watchedAuras; -- all watched auras
local auraFilters = {"HELPFUL", "HARMFUL"};
-local DEFAULT_ICON = "Interface\\AddOns\\RaidFrameCustomization\\images\\rhomb";
+local DEFAULT_ICON = "Interface\\AddOns\\OmaRF\\images\\rhomb";
local _;
-- global functions used every update
local frameName = name or frame:GetName();
if not f[frameName] then return end
- local config = RaidFrameCustomization.db.profile;
+ local config = OmaRF.db.profile;
local font = media and media:Fetch('font', config.indicatorFont) or STANDARD_TEXT_FONT;
for pos, ind in pairs(f[frameName]) do
ind.text:SetFont(font, config[pos]["textSize"]);
if not id then break end
local pos = watchedAuras[name] or watchedAuras[id] or watchedAuras[debuff];
if pos then
- local config = RaidFrameCustomization.db.profile[pos];
+ local config = OmaRF.db.profile[pos];
if not config.mine or UnitIsPlayer(caster) then
if config.showIcon and not config.useDefaultIcon then
-- show icon
end
-- Update all indicators
-function RaidFrameCustomization:UpdateAllIndicators()
+function OmaRF:UpdateAllIndicators()
CompactRaidFrameContainer_ApplyToFrames(CompactRaidFrameContainer, "normal", updateIndicators);
if self.running then
C_TimerAfter(0.15, self:UpdateAllIndicators);
end
-- Used to update everything that is affected by the configuration
-function RaidFrameCustomization:RefreshConfig()
+function OmaRF:RefreshConfig()
self:OnDisable(); -- clear everything
if self.db.profile.enabled then
CompactRaidFrameContainer_ApplyToFrames(CompactRaidFrameContainer, "normal", configureIndicators);
-local normalBarColor = RaidFrameCustomization.normalBarColor;
-local normalBackColor = RaidFrameCustomization.normalBackColor;
+local normalBarColor = OmaRF.normalBarColor;
+local normalBackColor = OmaRF.normalBackColor;
local UnitGroupRolesAssigned = UnitGroupRolesAssigned;
local CompactUnitFrame_UpdateHealthColor = CompactUnitFrame_UpdateHealthColor;
local CompactRaidFrameContainer_ApplyToFrames = CompactRaidFrameContainer_ApplyToFrames;
## Interface: 70300
-## Title: Raid Frame Customization
+## Title: Oma Raid Frame
## Version: 1.0
## Author: schyrio
## Notes: Customization to the standard raid frames
-## SavedVariables: RaidFrameCustomizationDB
+## SavedVariables: OmaRFDB
embeds.xml
Core.lua
Indicators.lua
-IndicatorsConfig.lua
UnitFrameSetupHook.lua
UpdateNameHook.lua
UpdateStatusTextHook.lua
-local normalBarColor = RaidFrameCustomization.normalBarColor;
-local dispelBarColor = RaidFrameCustomization.dispelBarColor;
-local normalBackColor = RaidFrameCustomization.normalBackColor;
-local dispelBackColor = RaidFrameCustomization.dispelBackColor;
+local normalBarColor = OmaRF.normalBarColor;
+local dispelBarColor = OmaRF.dispelBarColor;
+local normalBackColor = OmaRF.normalBackColor;
+local dispelBackColor = OmaRF.dispelBackColor;
local UnitDebuff = UnitDebuff;
local CompactUnitFrame_UpdateHealthColor = CompactUnitFrame_UpdateHealthColor;
return options;
end
-local profiles = LibStub("AceDBOptions-3.0"):GetOptionsTable(RaidFrameCustomization.db);
-local options = createOptionsTable(RaidFrameCustomization);
+local profiles = LibStub("AceDBOptions-3.0"):GetOptionsTable(OmaRF.db);
+local options = createOptionsTable(OmaRF);
local config = LibStub("AceConfig-3.0");
config:RegisterOptionsTable("Indicators", options);
config:RegisterOptionsTable("Indicators Profiles", profiles);
local dialog = LibStub("AceConfigDialog-3.0");
-RaidFrameCustomization.optionsFrames = {};
-RaidFrameCustomization.optionsFrames.Indicators = dialog:AddToBlizOptions("Indicators", "Indicators");
-RaidFrameCustomization.optionsFrames.Profile = dialog:AddToBlizOptions("Indicators Profiles", "Profiles", "Indicators");
+OmaRF.optionsFrames = {};
+OmaRF.optionsFrames.Indicators = dialog:AddToBlizOptions("Indicators", "Indicators");
+OmaRF.optionsFrames.Profile = dialog:AddToBlizOptions("Indicators Profiles", "Profiles", "Indicators");
--- /dev/null
+## Interface: 70300
+## Title: Oma Raid Frame Config
+## Version: 1.0
+## Author: schyrio
+## Notes: Configuration for OmaRF
+## LoadOnDemand: 1
+## Dependencies: OmaRF
+
+embeds.xml
+
+IndicatorsConfig.lua
+++ /dev/null
-## Interface: 70300
-## Title: Raid Frame Customization Config
-## Version: 1.0
-## Author: schyrio
-## Notes: Configuration for RaidFrameCustomization
-## LoadOnDemand: 1
-## Dependencies: RaidFrameCustomization
-
-embeds.xml
-
-IndicatorsConfig.lua