diff --git a/Display.lua b/Display.lua
index 06f2463..7484536 100644
--- a/Display.lua
+++ b/Display.lua
@@ -21,6 +21,17 @@ Resources:New(resources)
local _G = _G
local GameTooltip = _G.GameTooltip
+local stratas = {
+ "BACKGROUND",
+ "LOW",
+ "MEDIUM",
+ "HIGH",
+ "DIALOG",
+ "FULLSCREEN",
+ "FULLSCREEN_DIALOG",
+ "TOOLTIP"
+}
+
local anchors = {
"TOP",
"TOPRIGHT",
@@ -120,7 +131,7 @@ function mod:RebuildOpts()
name = "Add Display",
type = "input",
set = function(info, v)
- self.db.profile.config["display_" .. v] = {name = v, layouts = {}, widgets = {}, point = {"TOPLEFT", "UiParent", "BOTTOMLEFT", 0, -50}, parent="UIParent"}
+ self.db.profile.config["display_" .. v] = {name = v, layouts = {}, widgets = {}, point = {"TOPLEFT", "UiParent", "BOTTOMLEFT", 0, -50}, parent="UIParent", strata=1}
LCD4WoW:RebuildOpts()
end,
order = 1
@@ -270,6 +281,24 @@ function mod:RebuildOpts()
end,
order = 3
},
+ pixel = {
+ name = "Display Pixel",
+ desc = "Size of a single pixel",
+ type = "input",
+ pattern = "%d",
+ get = function() return v.pixel or 1 end,
+ set = function(info, val) v.pixel = val end,
+ order = 4
+ },
+ strata = {
+ name = "Frame Strata",
+ desc = "The frame's strata",
+ type = "select",
+ values = stratas,
+ get = function() return v.strata or 1 end,
+ set = function(info, val) v.strata = val end,
+ order = 5
+ },
point = {
name = "Anchor Points",
desc = "This histogram's anchor point. These arguments are passed to bar:SetPoint()",
diff --git a/config.lua b/config.lua
index 5669b09..9052335 100644
--- a/config.lua
+++ b/config.lua
@@ -64,17 +64,30 @@ LCD4WoW.config = {
["point"] = {"TOPLEFT", "GameTooltip", "BOTTOMLEFT", 0, -100},
["parent"] = "GameTooltip"
},
+ ["display_health"] = {
+ ["addon"] = "LCD4WoW",
+ ["enabled"] = true,
+ ["driver"] = "character",
+ ["pixel"] = 1,
+ ["layers"] = 1,
+ ["rows"] = 1,
+ ["cols"] = 12,
+ ["layouts"] = {"layout_health"},
+ ["widgets"] = {},
+ ["point"] = {"TOPLEFT", "GameTooltip", "BOTTOMLEFT", 0, -130},
+ ["parent"] = "GameTooltip"
+ },
["display_mana"] = {
["addon"] = "LCD4WoW",
- ["enabled"] = false,
+ ["enabled"] = true,
["driver"] = "character",
["pixel"] = 1,
["layers"] = 1,
["rows"] = 1,
- ["cols"] = 14,
+ ["cols"] = 12,
["layouts"] = {"layout_mana"},
["widgets"] = {},
- ["point"] = {"TOPLEFT", "GameTooltip", "BOTTOMLEFT", 0, -130},
+ ["point"] = {"TOPRIGHT", "GameTooltip", "BOTTOMRIGHT", 0, -130},
["parent"] = "GameTooltip"
},
["widget_resources_timer"] = {
@@ -86,6 +99,13 @@ if ResourceServer then self.timer:Stop(); return end
Update()
]]
},
+ ["layout_health"] = {
+ [1] = {
+ [1] = {
+ [1] = "widget_text_health",
+ }
+ }
+ },
["layout_mana"] = {
[1] = {
[1] = {
@@ -194,11 +214,19 @@ Update()
["transition"] = TRANSITION_CHECKERBOARD,
["timeout"] = 2000
},
+ ["widget_text_health"] = {
+ type = "text",
+ value = 'return "Health: " .. (UnitHealth("player") / UnitHealthMax("player") * 100) .. "%"',
+ align = ALIGN_LEFT,
+ cols = 12,
+ update = 1000,
+ dontRtrim = true
+ },
["widget_text_mana"] = {
type = "text",
value = 'return "Power: " .. (UnitMana("player") / UnitManaMax("player") * 100) .. "%"',
align = ALIGN_RIGHT,
- cols = 14,
+ cols = 12,
update = 1000,
dontRtrim = true
},