Quantcast

* Change: 5.1 compatibility

Taracque [12-01-12 - 23:19]
* Change: 5.1 compatibility
* Added: Added a right to left flow layout variant
Filename
Change_log.txt
Ele_GUI.lua
Elementarist.lua
Elementarist.toc
Localization_enUS.lua
diff --git a/Change_log.txt b/Change_log.txt
index 0af92d1..a8f4841 100755
--- a/Change_log.txt
+++ b/Change_log.txt
@@ -1,3 +1,7 @@
+**v3.0.0**
+* Change: 5.1 compatibility
+* Added: Added a right to left flow layout variant
+
 **v2.9.9**
 * Fixed: Elemental Blast now in the right place in the priority list

@@ -89,7 +93,7 @@
 **v1.9.4**
 * Updated to work with 4.0.3
 * Added: Unleash Elements just before Lava Burst, if mainhand weapon has temporary enchant (Flametongue)
-* Removed: Single target CL behaviour removed
+* Removed: Single target CL behavior removed

 **v1.9.3**
 * Updated to work with 4.0.1
@@ -100,12 +104,12 @@
 * Misc: Code cleanup

 **v1.6**
-* Added: Chain Lightning behaviour can be changed from the configuration dialog
+* Added: Chain Lightning behavior can be changed from the configuration dialog

 **v1.5**
 * Bugfix: talent change should not produce lua error anymore
 * Bugfix: If Demonic Pact or Heart of the Crusader is active, Totem of Wrath not advised
-* Added: A new type of behaviour can be selected, when FS advised just before LvB available
+* Added: A new type of behavior can be selected, when FS advised just before LvB available
 * Added: Threat warning in raid warning frame can be turned on
 * Added: Flask of the North buff check if character is Alchemist, and has FotN in the bag

diff --git a/Ele_GUI.lua b/Ele_GUI.lua
index e9facbc..8f2bb6e 100755
--- a/Ele_GUI.lua
+++ b/Ele_GUI.lua
@@ -79,7 +79,18 @@ end
 function Elementarist:CreateDropDownMenu(text, parent, dbTree, varName, itemList, width)
 	local name = parent:GetName() .. text

-    local menu = CreateFrame("Frame", name, parent, "UIDropDownMenuTemplate")
+	local menuParent = CreateFrame("Frame", name .. "parent", parent)
+	menuParent:SetHeight(16)
+	menuParent:SetWidth(400)
+
+	local label = menuParent:CreateFontString(nil, 'BACKGROUND')
+	label:SetFontObject('GameFontHighlight')
+	label:SetPoint('LEFT', menuParent, "LEFT", 0,0)
+	label:SetText(text)
+
+	local labelWidth = label:GetStringWidth()
+
+    local menu = CreateFrame("Frame", name, menuParent, "UIDropDownMenuTemplate")
     menu.displayMode = "MENU"

 	local frame = _G[menu:GetName() .. 'Text']
@@ -118,8 +129,10 @@ function Elementarist:CreateDropDownMenu(text, parent, dbTree, varName, itemList
     menu.SetValue = function(self, value)
             _G.UIDropDownMenu_SetSelectedValue(self, value);
         end;
+
+    menu:SetPoint("LEFT",labelWidth+10,0,"LEFT")
     menu:Hide(); menu:Show();
-    return menu;
+    return menuParent;
 end

 function Elementarist:ApplySettings()
@@ -172,6 +185,28 @@ function Elementarist:ApplySettings()
 		Elementarist:SetTexture(Elementarist.textureList["int"],"")
 		Elementarist:SetTexture(Elementarist.textureList["misc"],"")
 	end
+	if (ElementaristDB.Layout == Elementarist.EleLayout["1"]) then	-- grow layout
+		Elementarist.displayFrame_next:SetPoint("TOPLEFT", 45, -30)
+		Elementarist.displayFrame_next1:SetPoint("TOPLEFT", 55, -10)
+		Elementarist.displayFrame_next2:SetPoint("TOPLEFT", 65, 0)
+		Elementarist.displayFrame_next:SetHeight(60)
+		Elementarist.displayFrame_next:SetWidth(60)
+		Elementarist.displayFrame_next1:SetHeight(40)
+		Elementarist.displayFrame_next1:SetWidth(40)
+		Elementarist.displayFrame_next2:SetHeight(20)
+		Elementarist.displayFrame_next2:SetWidth(20)
+	end
+	if (ElementaristDB.Layout == Elementarist.EleLayout["2"]) then	-- right to left flow layout
+		Elementarist.displayFrame_next:SetPoint("TOPLEFT", 0, 0)
+		Elementarist.displayFrame_next1:SetPoint("TOPLEFT", 50, 0)
+		Elementarist.displayFrame_next2:SetPoint("TOPLEFT", 100, 0)
+		Elementarist.displayFrame_next:SetHeight(50)
+		Elementarist.displayFrame_next:SetWidth(50)
+		Elementarist.displayFrame_next1:SetHeight(50)
+		Elementarist.displayFrame_next1:SetWidth(50)
+		Elementarist.displayFrame_next2:SetHeight(50)
+		Elementarist.displayFrame_next2:SetWidth(50)
+	end
 end

 function Elementarist:StoreUIValues()
@@ -307,8 +342,8 @@ function Elementarist:CreateConfig()
 	ShieldAlpha:SetPoint("TOPLEFT",200,-218)
 	ShieldAlpha:Show()

-	local FSBehaviourMenu = Elementarist:CreateDropDownMenu(L.CONFIG_BEHAVIOUR, Elementarist.configPanel, ElementaristDB, "Behaviour", {{text = Elementarist.Behaviours["1"]}, {text = Elementarist.Behaviours["2"]}},200)
-	FSBehaviourMenu:SetPoint('TOPLEFT', 10, -268)
+	local FSBehaviorMenu = Elementarist:CreateDropDownMenu(L.CONFIG_BEHAVIOR, Elementarist.configPanel, ElementaristDB, "Behavior", {{text = Elementarist.Behaviors["1"]}, {text = Elementarist.Behaviors["2"]}},200)
+	FSBehaviorMenu:SetPoint('TOPLEFT', 10, -268)

 	local EQEnableBtn = Elementarist:CreateCheckButton(L.CONFIG_ENABLE_EQ_SPELL, Elementarist.configPanel, ElementaristDB, "EnableEQ", false)
 	EQEnableBtn:SetPoint('TOPLEFT', 10, -298)
@@ -316,13 +351,16 @@ function Elementarist:CreateConfig()
 	local ThreatWarnBtn = Elementarist:CreateCheckButton(L.CONFIG_THREAT_WARNING, Elementarist.configPanel, ElementaristDB, "ThreatWarning", false)
 	ThreatWarnBtn:SetPoint('TOPLEFT', 10, -328)

+	local EleLayout = Elementarist:CreateDropDownMenu(L.CONFIG_LAYOUT, Elementarist.configPanel, ElementaristDB, "Layout", {{text = Elementarist.EleLayout["1"]}, {text = Elementarist.EleLayout["2"]}},200)
+	EleLayout:SetPoint('TOPLEFT', 10, -358)
+
 	local ResetBtn = Elementarist:CreateButton(L.CONFIG_RESET_POSITIONS, Elementarist.configPanel)
 	ResetBtn:SetWidth(160)
 	ResetBtn:SetHeight(22)
 	ResetBtn:SetScript('OnClick', function()
 		Elementarist:ResetPosition()
 	end)
-	ResetBtn:SetPoint("TOPLEFT",10,-388)
+	ResetBtn:SetPoint("TOPLEFT",10,-418)
 	ResetBtn:Show()

 	Elementarist.configPanel.okay = function()
@@ -348,10 +386,11 @@ function Elementarist:CreateConfig()
 		ElementaristDB.debuffalpha = 1
 		ElementaristDB.shieldalpha = 1
 		ElementaristDB.FireNova = true
-		ElementaristDB.Behaviour = Elementarist.Behaviours["1"]
+		ElementaristDB.Behavior = Elementarist.Behaviors["1"]
 		ElementaristDB.EnableUE = false
 		ElementaristDB.EnableEQ = false
 		ElementaristDB.ThreatWarning = true
+		ElementaristDB.Layout = Elementarist.EleLayout["1"]
 		Elementarist:ResetPosition()
 	end

diff --git a/Elementarist.lua b/Elementarist.lua
index c5cfdc2..9cf2376 100755
--- a/Elementarist.lua
+++ b/Elementarist.lua
@@ -1,5 +1,5 @@
 -------------------------------------------------------------------------------
--- Elementarist 2.9.9
+-- Elementarist 3.0.0
 --
 -- Shows the advised spell for an elemental shaman for optimal DPS output.
 -------------------------------------------------------------------------------
@@ -8,7 +8,7 @@ Elementarist = {Locals = {}}

 local L = Elementarist.Locals

-Elementarist.versionNumber = '2.9.8'
+Elementarist.versionNumber = '3.0.0'
 Elementarist.playerName = UnitName("player")
 Elementarist.playerGUID = UnitGUID("player")
 Elementarist.targetGUID = nil
@@ -118,9 +118,11 @@ Elementarist.textList = {
 	["debuff"] = nil,
 	["shield"] = nil
 }
-Elementarist.Behaviours = {
+Elementarist.Behaviors = {
 }
-Elementarist.CLBehaviours = {
+Elementarist.CLBehaviors = {
+}
+Elementarist.EleLayout = {
 }
 Elementarist.HostileFilter = {
   ["_DAMAGE"] = true,
@@ -221,12 +223,14 @@ function Elementarist.events.ADDON_LOADED(addon)

 	Elementarist.playerLevel = UnitLevel("player")

-	-- Setup behaviours
-	Elementarist.Behaviours["1"] = L.BEHAVIOUR_KEEP_FS_UP
-	Elementarist.Behaviours["2"] = L.BEHAVIOUR_FS_BEFORE_LVB
-	Elementarist.CLBehaviours["0"] = L.CLSTBEHAVIOUR_NONE
-	Elementarist.CLBehaviours["1"] = L.CLSTBEHAVIOUR_CL_AFTER_LVB
-	Elementarist.CLBehaviours["2"] = L.CLSTBEHAVIOUR_CL_ON_CD
+	-- Setup behaviors
+	Elementarist.Behaviors["1"] = L.BEHAVIOR_KEEP_FS_UP
+	Elementarist.Behaviors["2"] = L.BEHAVIOR_FS_BEFORE_LVB
+	Elementarist.CLBehaviors["0"] = L.CLSTBEHAVIOR_NONE
+	Elementarist.CLBehaviors["1"] = L.CLSTBEHAVIOR_CL_AFTER_LVB
+	Elementarist.CLBehaviors["2"] = L.CLSTBEHAVIOR_CL_ON_CD
+	Elementarist.EleLayout["1"] = L.LAYOUT_GROW
+	Elementarist.EleLayout["2"] = L.LAYOUT_RIGHTTOLEFT

 	-- Create GUI
 	Elementarist:CreateGUI()
@@ -266,8 +270,8 @@ function Elementarist:InitSettings()
 	if ElementaristDB.debuffalpha == nil then ElementaristDB.debuffalpha = 1 end
 	if ElementaristDB.shieldalpha == nil then ElementaristDB.shieldalpha = 1 end
 	if ElementaristDB.FireNova == nil then ElementaristDB.FireNova = true end
-	if ElementaristDB.Behaviour == nil then ElementaristDB.Behaviour = Elementarist.Behaviours["1"] end
-	if ElementaristDB.CLBehaviour == nil then ElementaristDB.CLBehaviour = Elementarist.CLBehaviours["0"] end
+	if ElementaristDB.Behavior == nil then ElementaristDB.Behavior = Elementarist.Behaviors["1"] end
+	if ElementaristDB.CLBehavior == nil then ElementaristDB.CLBehavior = Elementarist.CLBehaviors["0"] end
 	if ElementaristDB.EnableUE == nil then ElementaristDB.EnableUE = false end
 	if ElementaristDB.ThreatWarning == nil then ElementaristDB.ThreatWarning = true end
 	if ElementaristDB.EnableEQ == nil then ElementaristDB.EnableEQ = false end
@@ -773,7 +777,7 @@ function Elementarist:NextSpellElem(timeshift,exspell1,exspell2)
 				if (not name) then 	-- no fs debuff on target
 					fsExpiration = 0
 				end
-				if (ElementaristDB.Behaviour == Elementarist.Behaviours["1"]) then
+				if (ElementaristDB.Behavior == Elementarist.Behaviors["1"]) then
 					doFS = true
 				else	-- if fs before lvb, check lvb cd
 					d = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Lava Burst"])
diff --git a/Elementarist.toc b/Elementarist.toc
index 63e7fa9..b29c19e 100755
--- a/Elementarist.toc
+++ b/Elementarist.toc
@@ -1,8 +1,8 @@
-## Interface: 50001
+## Interface: 50100
 ## Title: Elementarist
 ## Notes: Elemental shaman spell rotation helper
 ## Author: Taracque, Felmosórongy of Arathor
-## Version: 2.9.9
+## Version: 3.0.0
 ## SavedVariables: ElementaristDB
 ## OptionalDeps: OmniCC, SpellFlash
 ## Dependencies:
diff --git a/Localization_enUS.lua b/Localization_enUS.lua
index 70b25e6..af18cfa 100755
--- a/Localization_enUS.lua
+++ b/Localization_enUS.lua
@@ -5,8 +5,8 @@
 if GetLocale() then
 	local L = Elementarist.Locals

-	L.BEHAVIOUR_KEEP_FS_UP = "Keep Flame Shock up"
-	L.BEHAVIOUR_FS_BEFORE_LVB = "Flame Shock before Lava"
+	L.BEHAVIOR_KEEP_FS_UP = "Keep Flame Shock up"
+	L.BEHAVIOR_FS_BEFORE_LVB = "Flame Shock before Lava"
 	L.THREAT_WARNING_SUFFIX = "% threat!"
 	L.THREAT_WARNING_PREFIX = ""
 	L.CONFIG_ENABLED = "Enabled"
@@ -17,13 +17,13 @@ if GetLocale() then
 	L.CONFIG_DISABLE_DEBUFF_TRACKER = "Disable debuff tracker"
 	L.CONFIG_DEBUFF_TRACKER_SCALE = "Debuff tracker scale"
 	L.CONFIG_DEBUFF_TRACKER_ALPHA = "Debuff tracker alpha"
-	L.CONFIG_BEHAVIOUR = "Flame Shock behaviour"
+	L.CONFIG_BEHAVIOR = "Flame Shock behavior:"
 	L.CONFIG_THREAT_WARNING = "Threat warning"
 	L.CONFIG_RESET_POSITIONS = "Reset frame positions"
-	L.CONFIG_CLSTBEHAVIOUR = "Chain Lightning single target behaviour"
-	L.CLSTBEHAVIOUR_CL_AFTER_LVB = "Chain Lightning after Lava"
-	L.CLSTBEHAVIOUR_CL_ON_CD = "Chain Lightning on Cooldown"
-	L.CLSTBEHAVIOUR_NONE = "None"
+	L.CONFIG_CLSTBEHAVIOR = "Chain Lightning single target behavior"
+	L.CLSTBEHAVIOR_CL_AFTER_LVB = "Chain Lightning after Lava"
+	L.CLSTBEHAVIOR_CL_ON_CD = "Chain Lightning on Cooldown"
+	L.CLSTBEHAVIOR_NONE = "None"
 -- new for 1.9
 	L.CONFIG_SHIELD_TRACKER_SCALE = "Shield tracker scale"
 	L.CONFIG_SHIELD_TRACKER_ALPHA = "Shield tracker alpha"
@@ -32,4 +32,8 @@ if GetLocale() then
 	L.CONFIG_ENABLE_EQ_SPELL = "Enable Earthquake in rotation"
 -- new for 2.1.4
 	L.CONFIG_DISABLE_MINI = "Disable mini frames"
+-- new for 3.0.0
+	L.CONFIG_LAYOUT = "Layout:"
+	L.LAYOUT_GROW = "Growing icons"
+	L.LAYOUT_RIGHTTOLEFT = "Right to left"
 end
\ No newline at end of file