From af3550839cb2e1d265de8555858f785b5974458e Mon Sep 17 00:00:00 2001 From: urnati Date: Mon, 12 Jul 2021 22:33:06 -0400 Subject: [PATCH] -- Tweak to Movable fix to remove a debug statement --- Titan/TitanPanel.lua | 57 +++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 49 insertions(+), 8 deletions(-) diff --git a/Titan/TitanPanel.lua b/Titan/TitanPanel.lua index 08f467a..27ed9f5 100644 --- a/Titan/TitanPanel.lua +++ b/Titan/TitanPanel.lua @@ -520,6 +520,14 @@ end function TitanPanelBarButton:PLAYER_REGEN_DISABLED() -- If in combat close all control frames and menus + if TITAN_PANEL_VARS.debug.movable + or TITAN_PANEL_VARS.debug.events then + TitanDebug ("PLAYER_REGEN_DISABLED" + .." c: "..tostring(InCombatLockdown()) + .." v: "..tostring(UnitInVehicle("player")) + ) + end + TitanUtils_CloseAllControlFrames(); TitanUtils_CloseRightClickMenu(); end @@ -530,10 +538,14 @@ function TitanPanelBarButton:PLAYER_REGEN_ENABLED() - Note: Quests can replace the main menu bar which hides Titan bottom bar(s)... On completion / exit these may enable regen AFTER exiting the vehicle. --]] -TitanDebug ("PLAYER_REGEN_ENABLED" -.." c: "..tostring(InCombatLockdown()) -.." v: "..tostring(UnitInVehicle("player")) -) + if TITAN_PANEL_VARS.debug.movable + or TITAN_PANEL_VARS.debug.events then + TitanDebug ("PLAYER_REGEN_ENABLED" + .." c: "..tostring(InCombatLockdown()) + .." v: "..tostring(UnitInVehicle("player")) + ) + end + if InCombatLockdown() or UnitInVehicle("player") then -- Wait for both to clear else @@ -546,6 +558,13 @@ function TitanPanelBarButton:ACTIVE_TALENT_GROUP_CHANGED() end function TitanPanelBarButton:UNIT_ENTERED_VEHICLE(self, ...) + if TITAN_PANEL_VARS.debug.movable + or TITAN_PANEL_VARS.debug.events then + TitanDebug ("UNIT_ENTERED_VEHICLE" + .." c: "..tostring(InCombatLockdown()) + .." v: "..tostring(UnitInVehicle("player")) + ) + end TitanUtils_CloseAllControlFrames(); TitanUtils_CloseRightClickMenu(); @@ -563,10 +582,13 @@ function TitanPanelBarButton:UNIT_EXITED_VEHICLE(self, ...) - A combat check will be done inside the adjust which may FAIL because a regen enabled may come after this event. --]] -TitanDebug ("UNIT_EXITED_VEHICLE" -.." c: "..tostring(InCombatLockdown()) -.." v: "..tostring(UnitInVehicle("player")) -) + if TITAN_PANEL_VARS.debug.movable + or TITAN_PANEL_VARS.debug.events then + TitanDebug ("UNIT_EXITED_VEHICLE" + .." c: "..tostring(InCombatLockdown()) + .." v: "..tostring(UnitInVehicle("player")) + ) + end if InCombatLockdown() or UnitInVehicle("player") then -- Wait for both to clear else @@ -1307,6 +1329,25 @@ TitanDebug("_HideAllBars: " end --[[ Titan +NAME: TitanPanelBarButton_HideTopBars +DESC: This routine will hide the bars Titan bars (and hiders) regardless of what the user has selected. +VAR: None +OUT: None +NOTE: +- For example when the class hall +- We only need to hide the bars (and hiders) - not adjust frames +:NOTE +--]] +function TitanPanelBarButton_HideTopBars() + if TitanPanelGetVar("Bar_Show") then + TitanPanelBarButton_Hide(TITAN_PANEL_DISPLAY_PREFIX.."Bar") + end + if TitanPanelGetVar("Bar2_Show") then + TitanPanelBarButton_Hide(TITAN_PANEL_DISPLAY_PREFIX.."Bar2") + end +end + +--[[ Titan NAME: TitanPanelBarButton_HideBottomBars DESC: This routine will hide the bottom Titan bars (and hiders) regardless of what the user has selected. VAR: None -- 1.7.9.5