diff --git a/Titan/Titan.lua b/Titan/Titan.lua index 3b9bbfb..2c2cbdb 100644 --- a/Titan/Titan.lua +++ b/Titan/Titan.lua @@ -2461,12 +2461,26 @@ local function BuildPluginCategoryMenu(frame) if not TitanGetVar(id, "ForceBar") or (TitanGetVar(id, "ForceBar") == TitanBarData[frame].name) then info = {}; +--[[ if plugin.version ~= nil and TitanPanelGetVar("VersionShown") then info.text = plugin.menuText ..TitanUtils_GetGreenText(" (v"..plugin.version..")") else info.text = plugin.menuText; end +--]] + local ver = plugin.version + if TitanPanelGetVar("VersionShown") then + if ver == nil or ver == "" then + ver = "" -- safety in case of nil + else + ver = TitanUtils_GetGreenText(" ("..ver..")") + end + else + ver = "" -- not requested + end + info.text = plugin.menuText..ver + -- Add Bar local internal_bar, which_bar = TitanUtils_GetWhichBar(id) if which_bar == nil then diff --git a/Titan/TitanConfig.lua b/Titan/TitanConfig.lua index 892d73e..b5f9032 100644 --- a/Titan/TitanConfig.lua +++ b/Titan/TitanConfig.lua @@ -47,7 +47,21 @@ end local changes = "" do -- recent change history changes = changes - ..TitanUtils_GetGoldText("8.0.0.100200 : 2023/12/xx\n") + ..TitanUtils_GetGoldText("8.0.1 : 2024/01/01\n") + ..TitanUtils_GetGreenText("Titan : \n") + ..TitanUtils_GetHighlightText("" + .."- In right click menu, do not show 'v' if no version found.\n" + ) + ..TitanUtils_GetGreenText("Clock : \n") + ..TitanUtils_GetHighlightText("" + .."- Remove 24 hour checkbox from slider frame.\n" + ) + ..TitanUtils_GetGreenText("Location : \n") + ..TitanUtils_GetHighlightText("" + .."- Classic (Wrath and Era) put coords on bottom of small and large maps, if user selected.\n" + ) + .."\n\n" + ..TitanUtils_GetGoldText("8.0.0 : 2023/12/23\n") ..TitanUtils_GetGreenText("Titan single release version : \n") ..TitanUtils_GetHighlightText("" .."- Titan : Combined Retail and Classic versions for maintainability.\n" @@ -61,12 +75,6 @@ changes = changes .."- Titan : TOC update only.\n" ) .."\n\n" - ..TitanUtils_GetGoldText("7.01.03.100107 : 2023/09/25\n") - ..TitanUtils_GetGreenText("Titan : \n") - ..TitanUtils_GetHighlightText("" - .."- TitanRepair : Fix (hopefully last) for 'Desaturation' error on Repair when auto repair is set.\n" - ) - .."\n\n" end TITAN_PANEL_CONFIG = { diff --git a/Titan/Titan_Mainline.toc b/Titan/Titan_Mainline.toc index 5786c3f..1798971 100644 --- a/Titan/Titan_Mainline.toc +++ b/Titan/Titan_Mainline.toc @@ -1,7 +1,7 @@ ## Interface: 100205 -## Title: Titan Panel [|cffeda55f_Core_|r] |cff00aa008.0.1.Retail|r +## Title: Titan Panel [|cffeda55f_Core_|r] |cff00aa008.0.1|r ## Author: Titan Panel Dev Team -## Version: 8.0.1.Retail +## Version: 8.0.1 ## SavedVariables: TitanAll, TitanSettings, TitanSkins, ServerTimeOffsets, ServerHourFormat ## Notes: Adds display bars to show and control information/launcher plugins. ## X-Credits: TitanMod, Dark Imakuni, Adsertor, Titan Dev Team diff --git a/TitanClassic/TitanClassic_Vanilla.toc b/TitanClassic/TitanClassic_Vanilla.toc index a160551..f37e976 100644 --- a/TitanClassic/TitanClassic_Vanilla.toc +++ b/TitanClassic/TitanClassic_Vanilla.toc @@ -1,7 +1,7 @@ ## Interface: 11500 -## Title: Titan Panel [|cffeda55f_Core_|r] |cff00aa008.0.1.Classic Era|r +## Title: Titan Panel [|cffeda55f_Core_|r] |cff00aa008.0.1|r ## Author: Titan Panel Dev Team -## Version: 8.0.1.Classic Era +## Version: 8.0.1 ## SavedVariables: TitanAll, TitanSettings, TitanSkins, ServerTimeOffsets, ServerHourFormat ## OptionalDeps: Ace3, AceGUI-3.0-SharedMediaWidgets, LibSharedMedia-3.0, LibQTip-1.0, !LibUIDropDownMenu ## Notes: Adds display bars to show and control information/launcher plugins. diff --git a/TitanClassic/TitanClassic_Wrath.toc b/TitanClassic/TitanClassic_Wrath.toc index 5ed144a..53d324d 100644 --- a/TitanClassic/TitanClassic_Wrath.toc +++ b/TitanClassic/TitanClassic_Wrath.toc @@ -1,7 +1,7 @@ ## Interface: 30403 -## Title: Titan Panel [|cffeda55f_Core_|r] |cff00aa008.0.1.Classic WOTLK|r +## Title: Titan Panel [|cffeda55f_Core_|r] |cff00aa008.0.1|r ## Author: Titan Panel Dev Team -## Version: 8.0.1.Classic WOTLK +## Version: 8.0.1 ## SavedVariables: TitanAll, TitanSettings, TitanSkins, ServerTimeOffsets, ServerHourFormat ## OptionalDeps: Ace3, AceGUI-3.0-SharedMediaWidgets, LibSharedMedia-3.0, LibQTip-1.0, !LibUIDropDownMenu ## Notes: Adds display bars to show and control information/launcher plugins. diff --git a/TitanClock/TitanClock.lua b/TitanClock/TitanClock.lua index 01bf485..05a6bef 100644 --- a/TitanClock/TitanClock.lua +++ b/TitanClock/TitanClock.lua @@ -362,74 +362,6 @@ end --[[ -- ************************************************************************** --- NAME : TitanPanelClockControlCheckButton_OnShow() --- DESC : Define clock hour options --- ************************************************************************** ---]] -function TitanPanelClockControlCheckButton_OnShow(self) - local txt = L["TITAN_CLOCK_CHECKBUTTON"] - - if TitanPanelClockControlCheckButtonText then - TitanPanelClockControlCheckButtonText:SetText(txt) - else - -- This is a WTF??? WOTLK API seems different for check button... - -- And, for some reason, does not want to be visible... - TitanPanelClockControlCheckButton:SetText(txt) - end - - if (TitanGetVar(TITAN_CLOCK_ID, "Format") == TITAN_CLOCK_FORMAT_24H) then - self:SetChecked(true); - else - self:SetChecked(false); - end -end - ---[[ --- ************************************************************************** --- NAME : TitanPanelClockControlCheckButton_OnClick() --- DESC : Toggle clock hour option --- ************************************************************************** ---]] -function TitanPanelClockControlCheckButton_OnClick(self, button) - if (self:GetChecked()) then - TitanSetVar(TITAN_CLOCK_ID, "Format", TITAN_CLOCK_FORMAT_24H); - else - TitanSetVar(TITAN_CLOCK_ID, "Format", TITAN_CLOCK_FORMAT_12H); - end - if ( ServerHourFormat[realmName] ) then - ServerHourFormat[realmName] = TitanGetVar(TITAN_CLOCK_ID, "Format"); - end - - TitanPanelButton_UpdateButton(TITAN_CLOCK_ID); -end - ---[[ --- ************************************************************************** --- NAME : TitanPanelClockControlCheckButton_OnEnter() --- DESC : Display clock hour option tooltip --- ************************************************************************** ---]] -function TitanPanelClockControlCheckButton_OnEnter(self) - self.tooltipText = L["TITAN_CLOCK_CHECKBUTTON_TOOLTIP"]; - GameTooltip:SetOwner(self, "ANCHOR_BOTTOMLEFT"); - GameTooltip:SetText(self.tooltipText, nil, nil, nil, nil, 1); - TitanUtils_StopFrameCounting(self:GetParent()); -end - ---[[ --- ************************************************************************** --- NAME : TitanPanelClockControlCheckButton_OnLeave() --- DESC : Hide clock hour option tooltip --- ************************************************************************** ---]] -function TitanPanelClockControlCheckButton_OnLeave(self) - self.tooltipText = nil; - GameTooltip:Hide(); - TitanUtils_StartFrameCounting(self:GetParent(), TITAN_CLOCK_FRAME_SHOW_TIME); -end - ---[[ --- ************************************************************************** -- NAME : TitanPanelClock_GetOffsetText(offset) -- DESC : Get hour offset value and return -- VARS : offset = hour offset from server time @@ -672,24 +604,6 @@ local function Create_Frames() TitanPanelClockControlSlider_OnLeave(self) end) - -- 24 hour format - local hour = CreateFrame("CheckButton", "TitanPanelClockControlCheckButton", config, "InterfaceOptionsBaseCheckButtonTemplate") - hour:SetPoint("TOP", offset, "BOTTOM", -25, -20) - hour:SetWidth(24) - hour:SetHeight(24) - hour:SetScript("OnShow", function(self) - TitanPanelClockControlCheckButton_OnShow(self) - end) - hour:SetScript("OnClick", function(self) - TitanPanelClockControlCheckButton_OnClick(self, delta) - end) - hour:SetScript("OnEnter", function(self) - TitanPanelClockControlCheckButton_OnEnter(self) - end) - hour:SetScript("OnLeave", function(self) - TitanPanelClockControlCheckButton_OnLeave(self) - end) - -- Now that the parts exist, initialize TitanPanelClockControlFrame_OnLoad(config) diff --git a/TitanLocation/TitanLocation.lua b/TitanLocation/TitanLocation.lua index 535c2a2..aa28cdd 100755 --- a/TitanLocation/TitanLocation.lua +++ b/TitanLocation/TitanLocation.lua @@ -25,7 +25,9 @@ local LocationTimer = nil; -- Difference in the Blizzard frame for the world map local MapMinMaxFrame = {} -if TITAN_ID == "TitanClassic" then +if Titan_Panel.game_ver == "Classic" +or Titan_Panel.game_ver == "Classic_Era" +then MapMinMaxFrame = WorldMapFrame.MaximizeMinimizeFrame else MapMinMaxFrame = WorldMapFrame.BorderFrame.MaximizeMinimizeFrame @@ -46,7 +48,7 @@ function TitanPanelLocationButton_OnLoad(self) self.registry = { id = TITAN_LOCATION_ID, category = "Built-ins", - version = TITAN_VERSION, + version = (TitanUtils_GetAddOnMetadata(TITAN_LOCATION_ID, "Version")) or "", menuText = L["TITAN_LOCATION_MENU_TEXT"], buttonTextFunction = "TitanPanelLocationButton_GetButtonText", tooltipTitle = L["TITAN_LOCATION_TOOLTIP"], @@ -63,6 +65,7 @@ function TitanPanelLocationButton_OnLoad(self) }, savedVariables = { ShowZoneText = 1, + ShowSubZoneText = true, ShowCoordsText = true, ShowCoordsOnMap = true, ShowCursorOnMap = true, @@ -72,6 +75,7 @@ function TitanPanelLocationButton_OnLoad(self) ShowColoredText = 1, CoordsFormat = L["TITAN_LOCATION_FORMAT"], UpdateWorldmap = false, + MapLocation = "TOPRIGHT", DisplayOnRightSide = false, } }; @@ -376,8 +380,6 @@ function TitanPanelRightClickMenu_PrepareLocationMenu() else -- no work needed end ---[=[ ---]=] info = {}; info.text = L["TITAN_LOCATION_MENU_UPDATE_WORLD_MAP"]; info.func = function() @@ -387,49 +389,51 @@ function TitanPanelRightClickMenu_PrepareLocationMenu() info.disabled = InCombatLockdown() TitanPanelRightClickMenu_AddButton(info, TitanPanelRightClickMenu_GetDropdownLevel()); +--[=[ if TITAN_ID == "TitanClassic" then - info = {}; - TitanPanelRightClickMenu_AddSpacer(TitanPanelRightClickMenu_GetDropdownLevel()); - TitanPanelRightClickMenu_AddTitle(L["TITAN_LOCATION_MENU_MAP_COORDS_TITLE"], TitanPanelRightClickMenu_GetDropdownLevel()); - - info = {}; - info.text = L["TITAN_LOCATION_MENU_MAP_COORDS_LOC_1"] - info.func = function() - TitanSetVar(TITAN_LOCATION_ID, "MapLocation", "TOPLEFT") - end - info.checked = CoordLoc("TOPLEFT") - TitanPanelRightClickMenu_AddButton(info, TitanPanelRightClickMenu_GetDropdownLevel()); - info = {}; - info.text = L["TITAN_LOCATION_MENU_MAP_COORDS_LOC_2"] - info.func = function() - TitanSetVar(TITAN_LOCATION_ID, "MapLocation", "TOPRIGHT") - end - info.checked = CoordLoc("TOPRIGHT") - TitanPanelRightClickMenu_AddButton(info, TitanPanelRightClickMenu_GetDropdownLevel()); - info = {}; - info.text = L["TITAN_LOCATION_MENU_MAP_COORDS_LOC_3"] - info.func = function() - TitanSetVar(TITAN_LOCATION_ID, "MapLocation", "BOTTOMLEFT") - end - info.checked = CoordLoc("BOTTOMLEFT") - TitanPanelRightClickMenu_AddButton(info, TitanPanelRightClickMenu_GetDropdownLevel()); - info = {}; - info.text = L["TITAN_LOCATION_MENU_MAP_COORDS_LOC_4"] - info.func = function() - TitanSetVar(TITAN_LOCATION_ID, "MapLocation", "BOTTOM") - end - info.checked = CoordLoc("BOTTOM") - TitanPanelRightClickMenu_AddButton(info, TitanPanelRightClickMenu_GetDropdownLevel()); - info = {}; - info.text = L["TITAN_LOCATION_MENU_MAP_COORDS_LOC_5"] - info.func = function() - TitanSetVar(TITAN_LOCATION_ID, "MapLocation", "BOTTOMRIGHT") - end - info.checked = CoordLoc("BOTTOMRIGHT") - TitanPanelRightClickMenu_AddButton(info, TitanPanelRightClickMenu_GetDropdownLevel()); + info = {}; + TitanPanelRightClickMenu_AddSpacer(TitanPanelRightClickMenu_GetDropdownLevel()); + TitanPanelRightClickMenu_AddTitle(L["TITAN_LOCATION_MENU_MAP_COORDS_TITLE"], TitanPanelRightClickMenu_GetDropdownLevel()); + + info = {}; + info.text = L["TITAN_LOCATION_MENU_MAP_COORDS_LOC_1"] + info.func = function() + TitanSetVar(TITAN_LOCATION_ID, "MapLocation", "TOPLEFT") + end + info.checked = CoordLoc("TOPLEFT") + TitanPanelRightClickMenu_AddButton(info, TitanPanelRightClickMenu_GetDropdownLevel()); + info = {}; + info.text = L["TITAN_LOCATION_MENU_MAP_COORDS_LOC_2"] + info.func = function() + TitanSetVar(TITAN_LOCATION_ID, "MapLocation", "TOPRIGHT") + end + info.checked = CoordLoc("TOPRIGHT") + TitanPanelRightClickMenu_AddButton(info, TitanPanelRightClickMenu_GetDropdownLevel()); + info = {}; + info.text = L["TITAN_LOCATION_MENU_MAP_COORDS_LOC_3"] + info.func = function() + TitanSetVar(TITAN_LOCATION_ID, "MapLocation", "BOTTOMLEFT") + end + info.checked = CoordLoc("BOTTOMLEFT") + TitanPanelRightClickMenu_AddButton(info, TitanPanelRightClickMenu_GetDropdownLevel()); + info = {}; + info.text = L["TITAN_LOCATION_MENU_MAP_COORDS_LOC_4"] + info.func = function() + TitanSetVar(TITAN_LOCATION_ID, "MapLocation", "BOTTOM") + end + info.checked = CoordLoc("BOTTOM") + TitanPanelRightClickMenu_AddButton(info, TitanPanelRightClickMenu_GetDropdownLevel()); + info = {}; + info.text = L["TITAN_LOCATION_MENU_MAP_COORDS_LOC_5"] + info.func = function() + TitanSetVar(TITAN_LOCATION_ID, "MapLocation", "BOTTOMRIGHT") + end + info.checked = CoordLoc("BOTTOMRIGHT") + TitanPanelRightClickMenu_AddButton(info, TitanPanelRightClickMenu_GetDropdownLevel()); else -- no work needed end +--]=] end if TitanPanelRightClickMenu_GetDropdMenuValue() == "CoordFormat" then TitanPanelRightClickMenu_AddTitle(L["TITAN_LOCATION_FORMAT_COORD_LABEL"], TitanPanelRightClickMenu_GetDropdownLevel()); @@ -589,26 +593,79 @@ print("TLoc" ) --]==] - -- Potision the text - if MapMinMaxFrame.MaximizeButton:IsShown() then - if WorldMapFrame.TitanSizePrev == "small" then - -- no change - else - TitanMapPlayerLocation:ClearAllPoints(); - TitanMapCursorLocation:ClearAllPoints(); - TitanMapPlayerLocation:SetPoint("RIGHT", MapMinMaxFrame, "LEFT", 0, 0) - TitanMapCursorLocation:SetPoint("LEFT", WorldMapFrame.BorderFrame.Tutorial, "RIGHT", 0, 0) - WorldMapFrame.TitanSize = "small" + local xbuff = 10 -- to get away from the frame border + local buff = 5 -- between the player and cursor frames + local mloc = TitanGetVar(TITAN_LOCATION_ID, "MapLocation") or "TOPRIGHT" + if Titan_Panel.game_ver == "Classic" + or Titan_Panel.game_ver == "Classic_Era" + then + -- Determine where to show the text + TitanMapPlayerLocation:ClearAllPoints() + TitanMapCursorLocation:ClearAllPoints() + + TitanMapPlayerLocation:SetPoint("BOTTOMRIGHT", WorldMapFrame, "BOTTOM", -buff, 10) + TitanMapCursorLocation:SetPoint("BOTTOMLEFT", WorldMapFrame, "BOTTOM", 0, 10) +--[[ + if (mloc == "TOPRIGHT") then + TitanMapPlayerLocation:SetPoint("TOPRIGHT", WorldMapFrame, "TOPRIGHT", -10, -28) + TitanMapCursorLocation:SetPoint("TOPRIGHT", TitanMapPlayerLocation, "BOTTOMRIGHT", 0, 0) + elseif (mloc == "TOPLEFT") then + TitanMapPlayerLocation:SetPoint("TOPLEFT", WorldMapFrame, "TOPLEFT", 10, -28) + TitanMapCursorLocation:SetPoint("TOPLEFT", TitanMapPlayerLocation, "BOTTOMLEFT", 0, 0) + elseif (mloc == "BOTTOMLEFT") then + TitanMapPlayerLocation:SetPoint("BOTTOMLEFT", WorldMapFrame, "BOTTOMLEFT", 10, 10) + TitanMapCursorLocation:SetPoint("BOTTOMLEFT", TitanMapPlayerLocation, "BOTTOMRIGHT", buff, 0) + elseif (mloc == "BOTTOMRIGHT") then + TitanMapPlayerLocation:SetPoint("BOTTOMRIGHT", TitanMapCursorLocation, "BOTTOMLEFT", -buff, 0) + TitanMapCursorLocation:SetPoint("BOTTOMRIGHT", WorldMapFrame, "BOTTOMRIGHT", -xbuff, 10) + elseif (mloc == "BOTTOM") then + TitanMapPlayerLocation:SetPoint("BOTTOMRIGHT", WorldMapFrame, "BOTTOM", -buff, 10) + TitanMapCursorLocation:SetPoint("BOTTOMLEFT", WorldMapFrame, "BOTTOM", 0, 10) end - else -- map should be 'full' screen - if WorldMapFrame.TitanSizePrev == "large" then - -- no change - else - TitanMapPlayerLocation:ClearAllPoints(); - TitanMapCursorLocation:ClearAllPoints(); - TitanMapPlayerLocation:SetPoint("RIGHT", MapMinMaxFrame, "LEFT", 0, 0) - TitanMapCursorLocation:SetPoint("TOP", TitanMapPlayerLocation, "BOTTOM", 0, -5) - WorldMapFrame.TitanSize = "large" + elseif Titan_Panel.game_ver == "Classic_Era" then + -- Determine where to show the text + TitanMapPlayerLocation:ClearAllPoints() + TitanMapCursorLocation:ClearAllPoints() + + if (mloc == "TOPRIGHT") then + TitanMapPlayerLocation:SetPoint("TOPRIGHT", WorldMapFrame, "TOPRIGHT", -10, -28) + TitanMapCursorLocation:SetPoint("TOPRIGHT", TitanMapPlayerLocation, "BOTTOMRIGHT", 0, 0) + elseif (mloc == "TOPLEFT") then + TitanMapPlayerLocation:SetPoint("TOPLEFT", WorldMapFrame, "TOPLEFT", 10, -28) + TitanMapCursorLocation:SetPoint("TOPLEFT", TitanMapPlayerLocation, "BOTTOMLEFT", 0, 0) + elseif (mloc == "BOTTOMLEFT") then + TitanMapPlayerLocation:SetPoint("BOTTOMLEFT", WorldMapFrame, "BOTTOMLEFT", 15, 10) + TitanMapCursorLocation:SetPoint("BOTTOMLEFT", TitanMapPlayerLocation, "BOTTOMRIGHT", buff, 0) + elseif (mloc == "BOTTOMRIGHT") then + TitanMapPlayerLocation:SetPoint("BOTTOMRIGHT", TitanMapCursorLocation, "BOTTOMLEFT", -buff, 0) + TitanMapCursorLocation:SetPoint("BOTTOMRIGHT", WorldMapFrame, "BOTTOMRIGHT", -xbuff, 10) + elseif (mloc == "BOTTOM") then + TitanMapPlayerLocation:SetPoint("BOTTOMRIGHT", WorldMapFrame, "BOTTOM", -buff, 10) + TitanMapCursorLocation:SetPoint("BOTTOMLEFT", WorldMapFrame, "BOTTOM", 0, 10) + end +--]] + else -- current retail + -- Position the text + if MapMinMaxFrame.MaximizeButton:IsShown() then + if WorldMapFrame.TitanSizePrev == "small" then + -- no change + else + TitanMapPlayerLocation:ClearAllPoints(); + TitanMapCursorLocation:ClearAllPoints(); + TitanMapPlayerLocation:SetPoint("RIGHT", MapMinMaxFrame, "LEFT", 0, 0) + TitanMapCursorLocation:SetPoint("LEFT", WorldMapFrame.BorderFrame.Tutorial, "RIGHT", 0, 0) + WorldMapFrame.TitanSize = "small" + end + else -- map should be 'full' screen + if WorldMapFrame.TitanSizePrev == "large" then + -- no change + else + TitanMapPlayerLocation:ClearAllPoints(); + TitanMapCursorLocation:ClearAllPoints(); + TitanMapPlayerLocation:SetPoint("RIGHT", MapMinMaxFrame, "LEFT", 0, 0) + TitanMapCursorLocation:SetPoint("TOP", TitanMapPlayerLocation, "BOTTOM", 0, -5) + WorldMapFrame.TitanSize = "large" + end end end @@ -653,7 +710,8 @@ function TitanPanelLocation_CreateMapFrames() end -- create the frame to hold the font strings, and simulate an "OnUpdate" script handler using C_Timer for efficiency - local frame = CreateFrame("FRAME", "TitanMapFrame", WorldMapFrame.BorderFrame) +-- local frame = CreateFrame("FRAME", "TitanMapFrame", WorldMapFrame.BorderFrame) + local frame = CreateFrame("FRAME", "TitanMapFrame", WorldMapFrame) frame:SetFrameStrata("DIALOG") -- DF need to raise the strata to be seen local function updateFunc() TitanMapFrame_OnUpdate(frame, 0.07); -- simulating an OnUpdate call