- Slight cleanup
urnati [05-31-23 - 01:15]
diff --git a/Titan/Titan.lua b/Titan/Titan.lua
index 95df6db..309313e 100644
--- a/Titan/Titan.lua
+++ b/Titan/Titan.lua
@@ -1145,6 +1145,7 @@ local function CheckBarBounds(self, width)
if trace then
print("Bounds"
.." "..tostring(bar_name)..""
+ .." "..tostring(self:GetLeft() or nil)..""
)
end
@@ -1162,10 +1163,10 @@ local function CheckBarBounds(self, width)
--- Back out the Titan scaling to get 'real' position within unscaled WoW window
-- Use floor to trunc decimal places where the side could be right on the edge of the screen.
local orig_w = self:GetWidth()
- local l_off = math.floor(self:GetLeft() * tscale)
- local r_off = math.floor(self:GetRight() * tscale)
- local t_off = math.floor(self:GetTop() * tscale)
- local b_off = math.floor(self:GetBottom() * tscale)
+ local l_off = math.floor(self:GetLeft()) -- * tscale)
+ local r_off = math.floor(self:GetRight()) -- * tscale)
+ local t_off = math.floor(self:GetTop()) -- * tscale)
+ local b_off = math.floor(self:GetBottom()) -- * tscale)
if trace then
print(">Bounds"
@@ -1462,7 +1463,6 @@ function TitanPanelBarButton_HideAllBars()
end
local function showBar(frame_str)
- -- Conditions where this bar should not be shown...
local flag = true -- only set false for known conditions
if frame_str == TitanVariables_GetFrameName("Bar")
@@ -1478,11 +1478,6 @@ local function showBar(frame_str)
then
flag = false
end
- -- ===== In Pet Battle
- if C_PetBattles.IsInBattle()
- then
- flag = false
- end
end
-- ===== In Combat : User selected
@@ -1492,10 +1487,20 @@ local function showBar(frame_str)
flag = false
end
end
+
+ -- ===== In Pet Battle
+ if C_PetBattles.IsInBattle() then
+ if TitanBarData[frame_str].user_move then
+ -- leave as is
+ else
+ flag = false
+ end
+ end
--[[
print("showBar"
--.." "..tostring(C_PetBattles.IsInBattle())..""
.." > "..tostring(flag)..""
+.." '"..tostring(frame_str).."'"
)
--]]
return flag
diff --git a/Titan/TitanVariables.lua b/Titan/TitanVariables.lua
index 05f4ba1..6760ae0 100644
--- a/Titan/TitanVariables.lua
+++ b/Titan/TitanVariables.lua
@@ -106,7 +106,6 @@ TitanBarData = {
bott = {pt="BOTTOMRIGHT", rel_fr="UIParent", rel_pt="TOPRIGHT",},
user_move = false,
},
- -- no idea why -1 is needed for the bottom... seems anchoring to bottom is off a pixel
[TITAN_PANEL_DISPLAY_PREFIX.."AuxBar2"] = {
frame_name = TITAN_PANEL_DISPLAY_PREFIX.."AuxBar2",
locale_name = L["TITAN_PANEL_MENU_BOTTOM2"],
@@ -930,13 +929,15 @@ function TitanVariables_GetBarPos(frame_str)
local tscale = TitanPanelGetVar("Scale")
--[[
print("_GetBarPos"
-.." '"..tostring(TitanBarData[frame_str].name).."'"
-.." '"..tostring(tscale).."'"
+.." '"..tostring(format("%0.1f", TitanBarData[frame_str].name).."'"
+.." '"..tostring(format("%0.1f", TitanBarDataVars[frame_str].off_x)).."'"
+.." '"..tostring(format("%0.1f", TitanBarDataVars[frame_str].off_y)).."'"
+.." '"..tostring(format("%0.1f", TitanBarDataVars[frame_str].off_w)).."'"
)
--]]
return
- TitanBarDataVars[frame_str].off_x / tscale, -- / tscale,
- TitanBarDataVars[frame_str].off_y / tscale, -- / tscale,
+ TitanBarDataVars[frame_str].off_x, --/ tscale, -- / tscale,
+ TitanBarDataVars[frame_str].off_y, --/ tscale, -- / tscale,
TitanBarDataVars[frame_str].off_w -- / tscale
end