Quantcast

Add a couple lines to LCD

Scott Sibley [08-17-10 - 23:28]
Add a couple lines to LCD
Filename
Modules/LCDDisplay.lua
config.lua
diff --git a/Modules/LCDDisplay.lua b/Modules/LCDDisplay.lua
index d43ec57..93c23a9 100644
--- a/Modules/LCDDisplay.lua
+++ b/Modules/LCDDisplay.lua
@@ -1,5 +1,5 @@
 local mod = StarTip:NewModule("LCDDisplay")
-mod.name = "LCDDisplay"
+mod.name = "LCD Display"
 mod.toggled = true
 mod.defaultOff = true
 local Evaluator = LibStub("StarLibEvaluator-1.0")
@@ -7,8 +7,6 @@ local LibCore = LibStub("StarLibCore-1.0")
 local LibLCDText = LibStub("StarLibLCDText-1.0")
 local LibDriverQTip = LibStub("StarLibDriverQTip-1.0")

-mod.name = "LCDDisplay"
-mod.toggled = true
 local _G = _G
 local GameTooltip = _G.GameTooltip
 local cores = {}
@@ -19,8 +17,6 @@ local defaults = {profile= {cores={}}}
 function mod:OnInitialize()
 	self.db = StarTip.db:RegisterNamespace(self:GetName(), defaults)

-	--self.config = Evaluator.ExecuteCode({}, mod:GetName(), StarTip.config)
-
 	self.lcd = LibDriverQTip:New(self, "display_startip", StarTip.config, StarTip.db.profile.errorLevel)
 	self.lcd.core:CFGSetup()
 	self.lcd.core:BuildLayouts()
diff --git a/config.lua b/config.lua
index ef925a3..3e4ff4f 100644
--- a/config.lua
+++ b/config.lua
@@ -31,6 +31,14 @@ return {
     		["col1"] = "widget_class_label",
     		["col9"] = "widget_class"
         },
+		["row3"] = {
+			["col1"] = "widget_race_label",
+			["col9"] = "widget_race",
+		},
+		["row4"] = {
+			["col1"] = "widget_level_label",
+			["col9"] = "widget_level",
+		},
 		["transition"] = "U"
     },
 	["widget_name_label"] = {
@@ -62,8 +70,29 @@ return {
 	["widget_class"] = {
 		type = "text",
 		value = "return UnitClass('player')",
-		cols = 10,
-		width = 10
+		cols = 10
+	},
+	["widget_race_label"] = {
+		type = "text",
+		value = 'return "Race:"',
+		cols = 9,
+		align = ALIGN_RIGHT
+	},
+	["widget_race"] = {
+		type = "text",
+		value = "return UnitRace('player')",
+		cols = 10
+	},
+	["widget_level_label"] = {
+		type = "text",
+		value = 'return "Level:"',
+		cols = 9,
+		align = ALIGN_RIGHT,
+	},
+	["widget_level"] = {
+		type = "text",
+		value = "return UnitLevel('player')",
+		cols = 10
 	},
 	["widget_icon_blob"] = {
 		["bitmap"] = {