Readded keybindings for raid flares
Repooc [11-28-14 - 01:23]
Readded keybindings for raid flares
diff --git a/ElvUI_SLE/Bindings.xml b/ElvUI_SLE/Bindings.xml
new file mode 100644
index 0000000..2d728ae
--- /dev/null
+++ b/ElvUI_SLE/Bindings.xml
@@ -0,0 +1,20 @@
+<Bindings>
+ <Binding name="CLICK ClearRaidFlares:LeftButton" description="Clear Flares" header="RAIDFLARE">
+ </Binding>
+ <Binding name="CLICK RaidFlare1:LeftButton" description="Blue Flare">
+ </Binding>
+ <Binding name="CLICK RaidFlare2:LeftButton" description="Green Flare">
+ </Binding>
+ <Binding name="CLICK RaidFlare3:LeftButton" description="Purple Flare">
+ </Binding>
+ <Binding name="CLICK RaidFlare4:LeftButton" description="Red Flare">
+ </Binding>
+ <Binding name="CLICK RaidFlare5:LeftButton" description="Yellow Flare">
+ </Binding>
+ <Binding name="CLICK RaidFlare6:LeftButton" description="Orange Flare">
+ </Binding>
+ <Binding name="CLICK RaidFlare7:LeftButton" description="White Flare">
+ </Binding>
+ <Binding name="CLICK RaidFlare8:LeftButton" description="Skull Flare">
+ </Binding>
+</Bindings>
\ No newline at end of file
diff --git a/ElvUI_SLE/ElvUI_SLE.toc b/ElvUI_SLE/ElvUI_SLE.toc
index 30e9b9d..28990bc 100644
--- a/ElvUI_SLE/ElvUI_SLE.toc
+++ b/ElvUI_SLE/ElvUI_SLE.toc
@@ -21,3 +21,4 @@ modules\load_modules.xml
defaults\load_defaults.xml
options\load_options.xml
skins\load_skins.xml
+Bindings.xml
\ No newline at end of file
diff --git a/ElvUI_SLE/modules/raidmarkers.lua b/ElvUI_SLE/modules/raidmarkers.lua
index 2df106d..6eb7dc4 100644
--- a/ElvUI_SLE/modules/raidmarkers.lua
+++ b/ElvUI_SLE/modules/raidmarkers.lua
@@ -1,6 +1,27 @@
local E, L, V, P, G = unpack(ElvUI);
local RM = E:GetModule('SLE_RaidMarkers');
+BINDING_HEADER_RAIDFLARE = "|cff1784d1Shadow & Light|r"
+
+local function make(name, command, description)
+ _G["BINDING_NAME_CLICK "..name..":LeftButton"] = description
+ local btn = CreateFrame("Button", name, nil, "SecureActionButtonTemplate")
+ btn:SetAttribute("type", "macro")
+ btn:SetAttribute("macrotext", command)
+ btn:RegisterForClicks("AnyDown")
+end
+
+make("RaidFlare1", "/clearworldmarker 1\n/worldmarker 1", "Blue Flare")
+make("RaidFlare2", "/clearworldmarker 2\n/worldmarker 2", "Green Flare")
+make("RaidFlare3", "/clearworldmarker 3\n/worldmarker 3", "Purple Flare")
+make("RaidFlare4", "/clearworldmarker 4\n/worldmarker 4", "Red Flare")
+make("RaidFlare5", "/clearworldmarker 5\n/worldmarker 5", "Yellow Flare")
+make("RaidFlare6", "/clearworldmarker 6\n/worldmarker 6", "Orange Flare")
+make("RaidFlare7", "/clearworldmarker 7\n/worldmarker 7", "White Flare")
+make("RaidFlare8", "/clearworldmarker 8\n/worldmarker 8", "Skull Flare")
+
+make("ClearRaidFlares", "/clearworldmarker 0", "Clear All Flares")
+
local layouts = {
[1] = {RT = 1, WM = 5}, -- Star
[2] = {RT = 2, WM = 6}, -- Circle
@@ -119,7 +140,7 @@ end
function RM:ToggleSettings()
if self.db.enable then
- RegisterStateDriver(self.frame, "visibility", self.db.visibility == 'DEFAULT' and '[noexists, nogroup] hide; show' or '[group] show; hide')
+ RegisterStateDriver(self.frame, "visibility", self.db.visibility == 'DEFAULT' and '[noexists, nogroup] hide; show' or '[group] show; hide')
else
UnregisterStateDriver(self.frame, "visibility")
self.frame:Hide()