diff --git a/XIV_Databar.toc b/XIV_Databar.toc index 9d936ab..9ebd233 100644 --- a/XIV_Databar.toc +++ b/XIV_Databar.toc @@ -1,10 +1,10 @@ ## Interface: 70100 ## Title: XIV_Databar -## Author: |cffbbbbbbMille|cff990000XIV|r -## Version: 2.0.13.1 +## Author: |cffbbbbbbMille|cff990000XIV|r and Mikeprod +## Version: 2.0.14 ## Notes: Adds a bottombar by the request of |cffffffffu/sammojo|r on Reddit, Icons made by |cffffffffu/sammojo|r. Previously maintained by |cff00FF99Saxitoxin|r. ## SavedVariables: TEST_CONFIG, XIVBarDB -## X-Issues: https://github.com/MilleXIV/XIV_Databar/issues +## X-Issues: https://github.com/Mikeprod/XIV_Databar/issues embeds.xml diff --git a/locales/deDE.lua b/locales/deDE.lua index b138651..683404e 100644 --- a/locales/deDE.lua +++ b/locales/deDE.lua @@ -6,6 +6,11 @@ if not L then return end L['Modules'] = "Module"; L['Left-Click'] = "Links-Klick"; L['Right-Click'] = "Rechts-Klick"; +L['k'] = true; -- short for 1000 +L['M'] = true; -- short for 1000000 +L['B'] = true; -- short for 1000000000 +L['L'] = true; -- For the local ping +L['W'] = true; -- For the world ping -- General L["Positioning"] = true; @@ -126,6 +131,7 @@ L['Set Loot Specialization'] = "Beute-Spezialisierung auswählen"; L['Current Specialization'] = "Aktuelle Spezialisierung"; L['Current Loot Specialization'] = "Aktuelle Beute-Spezialisierung"; L['Talent Minimum Width'] = "Minimale Breite für Talente"; +L['Open Artifact'] = true; L['Remaining'] = "Ausbleibend"; L['Available Ranks'] = "Verfügbare Ränge"; L['Artifact Knowledge'] = "Artefaktwissen"; diff --git a/locales/enUS.lua b/locales/enUS.lua index cd683f2..72b7475 100644 --- a/locales/enUS.lua +++ b/locales/enUS.lua @@ -5,6 +5,12 @@ local L = AceLocale:NewLocale(AddOnName, "enUS", true, false); L['Modules'] = true; L['Left-Click'] = true; L['Right-Click'] = true; +L['k'] = true; -- short for 1000 +L['M'] = true; -- short for 1000000 +L['B'] = true; -- short for 1000000000 +L['L'] = true; -- For the local ping +L['W'] = true; -- For the world ping + -- General L["Positioning"] = true; @@ -125,6 +131,7 @@ L['Set Loot Specialization'] = true; L['Current Specialization'] = true; L['Current Loot Specialization'] = true; L['Talent Minimum Width'] = true; +L['Open Artifact'] = true; L['Remaining'] = true; L['Available Ranks'] = true; L['Artifact Knowledge'] = true; diff --git a/locales/frFR.lua b/locales/frFR.lua index bc4c5a3..07f1a82 100644 --- a/locales/frFR.lua +++ b/locales/frFR.lua @@ -6,6 +6,11 @@ if not L then return end L['Modules'] = "Modules"; L['Left-Click'] = "Clic gauche"; L['Right-Click'] = "Clic droit"; +L['k'] = true; -- short for 1000 +L['M'] = "m"; -- short for 1000000 +L['B'] = "M"; -- short for 1000000000 +L['L'] = true; -- For the local ping +L['W'] = "M"; -- For the world ping -- General L["Positioning"] = "Positionnement"; @@ -126,6 +131,7 @@ L['Set Loot Specialization'] = "Spécialisation du butin"; L['Current Specialization'] = "Spécialisation actuelle"; L['Current Loot Specialization'] = "Spécialisation du butin actuelle"; L['Talent Minimum Width'] = "Longueur minimum"; +L['Open Artifact'] = "Ouvrir l'Arme Prodigieuse"; L['Remaining'] = "Restant"; L['Available Ranks'] = "Rangs disponibles"; L['Artifact Knowledge'] = "Connaissance de l'arme prodigieuse"; \ No newline at end of file diff --git a/locales/ruRU.lua b/locales/ruRU.lua index d0280a8..5858418 100644 --- a/locales/ruRU.lua +++ b/locales/ruRU.lua @@ -6,6 +6,11 @@ if not L then return end L['Modules'] = "Модули"; L['Left-Click'] = "Левая кнопка мыши"; L['Right-Click'] = "Правая кнопка мыши"; +L['k'] = true; -- short for 1000 +L['M'] = true; -- short for 1000000 +L['B'] = true; -- short for 1000000000 +L['L'] = true; -- For the local ping +L['W'] = true; -- For the world ping -- General L["Positioning"] = "Позиция"; @@ -126,6 +131,7 @@ L['Set Loot Specialization'] = "Выбрать специализацию для L['Current Specialization'] = "Текущая специализация"; L['Current Loot Specialization'] = "Текущая специализация для добычи"; L['Talent Minimum Width'] = "Минимальная ширина модуля талантов"; +L['Open Artifact'] = true; L['Remaining'] = "Осталось"; L['Available Ranks'] = "Доступно уровней"; L['Artifact Knowledge'] = "Знание артефакта"; \ No newline at end of file diff --git a/locales/zhCN.lua b/locales/zhCN.lua index 9d23058..5c0aac3 100644 --- a/locales/zhCN.lua +++ b/locales/zhCN.lua @@ -6,6 +6,11 @@ if not L then return end L['Modules'] = "模块"; L['Left-Click'] = "左键单击"; L['Right-Click'] = "右键单击"; +L['k'] = true; -- short for 1000 +L['M'] = true; -- short for 1000000 +L['B'] = true; -- short for 1000000000 +L['L'] = true; -- For the local ping +L['W'] = true; -- For the world ping -- General L["Positioning"] = "位置"; @@ -126,6 +131,7 @@ L['Set Loot Specialization'] = "设置拾取专精"; L['Current Specialization'] = "当前专精"; L['Current Loot Specialization'] = "当前拾取专精"; L['Talent Minimum Width'] = "天赋最小宽度"; +L['Open Artifact'] = true; L['Remaining'] = "剩余"; L['Available Ranks'] = "神器等级"; L['Artifact Knowledge'] = "神器知识"; diff --git a/modules/clock.lua b/modules/clock.lua index fff14c7..88b39a0 100644 --- a/modules/clock.lua +++ b/modules/clock.lua @@ -105,7 +105,7 @@ function ClockModule:RegisterFrameEvents() if ClockModule.elapsed >= 1 then local clockTime = nil if xb.db.profile.modules.clock.serverTime then - clockTime = GetServerTime() -- GameTime_GetGameTime() ? + clockTime = GetServerTime() else clockTime = time() end @@ -131,15 +131,42 @@ function ClockModule:RegisterFrameEvents() GameTooltip:AddLine("[|cff6699FF"..TIMEMANAGER_TITLE.."|r]") GameTooltip:AddLine(" ") local clockTime = nil - local ttTimeText = '' if xb.db.profile.modules.clock.serverTime then clockTime = time() - ttTimeText = L['Local Time']; else clockTime = GetServerTime() - ttTimeText = L['Realm Time']; end - GameTooltip:AddDoubleLine(ttTimeText, date(ClockModule.timeFormats[xb.db.profile.modules.clock.timeFormat], clockTime), 1, 1, 0, 1, 1, 1) + + local optFormat = xb.db.profile.modules.clock.timeFormat + local hour, minute = GetGameTime() + local realmTime = "" + if optFormat:find("twoFour") then + realmTime = GameTime_GetFormattedTime(hour, minute, false) + if optFormat == "twoFour" then + if hour < 10 then + realmTime = "0"..realmTime + end + end + else + realmTime = GameTime_GetFormattedTime(hour, minute, true) + if optFormat:find("NoAm") then + if optFormat == "twelveNoAm" then + if hour < 10 then + realmTime = "0"..realmTime + end + end + realmTime = string.sub(realmTime,1,string.len(realmTime)-3) + else + if optFormat == "twelveAmPm" then + if hour < 10 then + realmTime = "0"..realmTime + end + end + end + end + + GameTooltip:AddDoubleLine(L['Local Time'], date(ClockModule.timeFormats[xb.db.profile.modules.clock.timeFormat], clockTime), 1, 1, 0, 1, 1, 1) + GameTooltip:AddDoubleLine(L['Realm Time'], realmTime, 1, 1, 0, 1, 1, 1) GameTooltip:AddLine(" ") GameTooltip:AddDoubleLine('<'..L['Left-Click']..'>', L['Open Calendar'], 1, 1, 0, 1, 1, 1) GameTooltip:AddDoubleLine('<'..L['Right-Click']..'>', L['Open Clock'], 1, 1, 0, 1, 1, 1) diff --git a/modules/gold.lua b/modules/gold.lua index 2f95385..bcfeff7 100644 --- a/modules/gold.lua +++ b/modules/gold.lua @@ -186,11 +186,11 @@ local function shortenNumber(num) if num < 1000 then return tostring(num) elseif num < 1000000 then - return format("%.1fK",num/1000) + return format("%.1f"..L['k'],num/1000) elseif num < 1000000000 then - return format("%.2fM",num/1000000) + return format("%.2f"..L['M'],num/1000000) else - return format("%.3fB",num/1000000000) + return format("%.3f"..L['B'],num/1000000000) end end diff --git a/modules/micromenu.lua b/modules/micromenu.lua index 7d8ce49..9082208 100644 --- a/modules/micromenu.lua +++ b/modules/micromenu.lua @@ -531,7 +531,7 @@ function MenuModule:SocialHover(hoverFunc) tooltip:AddLine(' ',' ') tooltip:AddLine('|cffffff00<'..L['Left-Click']..'>|r', '|cffffffff'..L['Whisper BNet']..'|r') - tooltip:AddLine('|cffffff00<'..self.modifier..' + '..L['Left-Click']..'>|r', '|cffffffff'..CALENDAR_INVITELIST_INVITETORAID..'|r') + tooltip:AddLine('|cffffff00<'..self.modifier..'+'..L['Left-Click']..'>|r', '|cffffffff'..CALENDAR_INVITELIST_INVITETORAID..'|r') tooltip:AddLine('|cffffff00<'..L['Right-Click']..'>|r', '|cffffffff'..L['Whisper Character']..'|r') if (totalOnlineFriends + totalBNOnlineFriends) > 0 then tooltip:Show() @@ -573,7 +573,9 @@ function MenuModule:GuildHover(hoverFunc) tooltip:AddHeader("[|cff6699FF"..GUILD.."|r]",'|cff00ff00'..gName..'|r') tooltip:AddLine(" "," ") if xb.db.profile.modules.microMenu.showGMOTD then - tooltip:AddLine('|cff00ff00'..GetGuildRosterMOTD()..':|r', ' ') --should be cut down + if GetGuildRosterMOTD() ~= "" then + tooltip:AddLine('|cff00ff00'..GetGuildRosterMOTD()..'|r', ' ') --should be cut down + end end local totalGuild, _ = GetNumGuildMembers() @@ -606,7 +608,7 @@ function MenuModule:GuildHover(hoverFunc) end tooltip:AddLine(' ',' ') tooltip:AddLine('|cffffff00<'..L['Left-Click']..'>|r', '|cffffffff'..L['Whisper Character']..'|r') - tooltip:AddLine('|cffffff00<'..self.modifier..' + '..L['Left-Click']..'>|r', '|cffffffff'..CALENDAR_INVITELIST_INVITETORAID..'|r') + tooltip:AddLine('|cffffff00<'..self.modifier..'+'..L['Left-Click']..'>|r', '|cffffffff'..CALENDAR_INVITELIST_INVITETORAID..'|r') tooltip:Show() hoverFunc() end diff --git a/modules/system.lua b/modules/system.lua index 2b23fb3..a913020 100644 --- a/modules/system.lua +++ b/modules/system.lua @@ -115,8 +115,8 @@ function SystemModule:UpdateTexts() self.fpsText:SetText(floor(GetFramerate())..FPS_ABBR) local _, _, homePing, worldPing = GetNetStats() - self.pingText:SetText(floor(homePing)..MILLISECONDS_ABBR) - self.worldPingText:SetText(floor(worldPing)..MILLISECONDS_ABBR) + self.pingText:SetText(L['L']..":"..floor(homePing)..MILLISECONDS_ABBR) + self.worldPingText:SetText(L['W']..":"..floor(worldPing)..MILLISECONDS_ABBR) end function SystemModule:CreateFrames() @@ -139,7 +139,7 @@ function SystemModule:HoverFunction() self.pingText:SetTextColor(unpack(xb:HoverColors())) self.worldPingText:SetTextColor(unpack(xb:HoverColors())) end - if xb.db.profile.modules.system.showTooltip then + if xb.db.profile.modules.system.showTooltip and not self.fpsFrame:IsMouseOver() then self:ShowTooltip() end end diff --git a/modules/talent.lua b/modules/talent.lua index fc85aaf..dc70d7f 100644 --- a/modules/talent.lua +++ b/modules/talent.lua @@ -198,31 +198,35 @@ function TalentModule:RegisterFrameEvents() GameTooltip:Hide() if button == 'LeftButton' then if not InCombatLockdown() then - if self.specPopup:IsVisible() then - self.specPopup:Hide() - if xb.db.profile.modules.tradeskill.showTooltip then - self:ShowTooltip() - end - else - self.lootSpecPopup:Hide() - self:CreateSpecPopup() - self.specPopup:Show() - end + if IsShiftKeyDown() then + if self.lootSpecPopup:IsVisible() then + self.lootSpecPopup:Hide() + if xb.db.profile.modules.tradeskill.showTooltip then + self:ShowTooltip() + end + else + self.specPopup:Hide() + self:CreateLootSpecPopup() + self.lootSpecPopup:Show() + end + else + if self.specPopup:IsVisible() then + self.specPopup:Hide() + if xb.db.profile.modules.tradeskill.showTooltip then + self:ShowTooltip() + end + else + self.lootSpecPopup:Hide() + self:CreateSpecPopup() + self.specPopup:Show() + end + end end end if button == 'RightButton' then if not InCombatLockdown() then - if self.lootSpecPopup:IsVisible() then - self.lootSpecPopup:Hide() - if xb.db.profile.modules.tradeskill.showTooltip then - self:ShowTooltip() - end - else - self.specPopup:Hide() - self:CreateLootSpecPopup() - self.lootSpecPopup:Show() - end + SocketInventoryItem(16) end end end) @@ -489,7 +493,8 @@ function TalentModule:ShowTooltip() GameTooltip:AddLine(" ") GameTooltip:AddDoubleLine('<'..L['Left-Click']..'>', L['Set Specialization'], 1, 1, 0, 1, 1, 1) - GameTooltip:AddDoubleLine('<'..L['Right-Click']..'>', L['Set Loot Specialization'], 1, 1, 0, 1, 1, 1) + GameTooltip:AddDoubleLine('<'..SHIFT_KEY_TEXT.."+"..L['Left-Click']..'>', L['Set Loot Specialization'], 1, 1, 0, 1, 1, 1) + GameTooltip:AddDoubleLine('<'..L['Right-Click']..'>', L['Open Artifact'], 1, 1, 0, 1, 1, 1) GameTooltip:Show() end