Save a version number for display.
Scott Sibley [08-09-10 - 01:34]
Save a version number for display.
diff --git a/Modules/Text.lua b/Modules/Text.lua
index f430b8f..18bdb98 100644
--- a/Modules/Text.lua
+++ b/Modules/Text.lua
@@ -339,7 +339,7 @@ return self.unitLocation
},
[14] = {
name = "Marquee",
- left = 'return "StarTip v1.4"',
+ left = 'return "StarTip " .. StarTip.version',
updating = true,
enabled = false,
marquee = true,
diff --git a/StarTip.lua b/StarTip.lua
index cf633b4..918942e 100644
--- a/StarTip.lua
+++ b/StarTip.lua
@@ -1,5 +1,5 @@
-StarTip = LibStub("AceAddon-3.0"):NewAddon("StarTip", "AceConsole-3.0", "AceHook-3.0", "AceEvent-3.0", "AceTimer-3.0")
-StarTip.__starref__ = true
+StarTip = LibStub("AceAddon-3.0"):NewAddon("StarTip: @project-version@", "AceConsole-3.0", "AceHook-3.0", "AceEvent-3.0", "AceTimer-3.0")
+StarTip.version = GetAddOnMetadata("StarTip", "X-StarTip-Version")
local LibDBIcon = LibStub("LibDBIcon-1.0")
local LSM = _G.LibStub("LibSharedMedia-3.0")
local LDB = LibStub:GetLibrary("LibDataBroker-1.1")
@@ -284,7 +284,7 @@ StarTip:SetDefaultModuleState(false)
function StarTip:OnInitialize()
self.db = LibStub("AceDB-3.0"):New("StarTipDB", defaults, "Default")
-
+
LibStub("AceConfig-3.0"):RegisterOptionsTable("StarTip", options)
self:RegisterChatCommand("startip", "OpenConfig")
AceConfigDialog:AddToBlizOptions("StarTip")
@@ -297,6 +297,7 @@ function StarTip:OnInitialize()
self.leftLines[i] = _G["GameTooltipTextLeft" .. i]
self.rightLines[i] = _G["GameTooltipTextRight" .. i]
end
+
GameTooltip:Show()
GameTooltip:Hide()
@@ -421,7 +422,7 @@ end
function StarTip:HideAll()
for k, v in StarTip:IterateModules() do
if v.OnHide then
- --v:OnHide()
+ v:OnHide()
end
end
end
diff --git a/StarTip.toc b/StarTip.toc
index 9c939ad..2bc6ced 100644
--- a/StarTip.toc
+++ b/StarTip.toc
@@ -7,6 +7,7 @@
## X-Embeds: Ace3, LibTalentQuery-1.0
## X-License: BSD-2.0
## X-Credits: ckknight for CowTip and DogTags, haste for oUF
+## X-StarTip-Version: @project-version@
## OptionalDeps: Ace3, LibTalentQuery-1.0, LibMobHealth-4.0, TalentGuess-1.0, DBM-Core, BigWigs
## SavedVariables: StarTipDB