New release
Leandro Silva [09-13-18 - 23:19]
diff --git a/LeoAltholic.lua b/LeoAltholic.lua
index 8a26d9e..d524889 100644
--- a/LeoAltholic.lua
+++ b/LeoAltholic.lua
@@ -2,7 +2,7 @@
LeoAltholic = {}
LeoAltholic.name = "LeoAltholic"
LeoAltholic.displayName = "Leo's Altholic"
-LeoAltholic.version = "0.9.1"
+LeoAltholic.version = "0.9.3"
LeoAltholic.maxTraits = select(3,GetSmithingResearchLineInfo(1,1))
LeoAltholic.jewelryMaxTraits = select(3,GetSmithingResearchLineInfo(7,1))
diff --git a/LeoAltholic.txt b/LeoAltholic.txt
index cf0e490..87887b4 100644
--- a/LeoAltholic.txt
+++ b/LeoAltholic.txt
@@ -1,6 +1,6 @@
## Title: Leo's Altholic
## APIVersion: 100024
-## Version: 0.9.1
+## Version: 0.9.3
## Author: |c39B027@LeandroSilva|r
## SavedVariables: LeoAltholicSavedVariables
## OptionalDependsOn: LibFeedback
diff --git a/LeoAltholic.xml b/LeoAltholic.xml
index 3147657..3a0807f 100644
--- a/LeoAltholic.xml
+++ b/LeoAltholic.xml
@@ -139,7 +139,7 @@
<Button name="$(parent)Close" clickSound="Click">
<Anchor point="TOPLEFT" relativePoint="TOPLEFT" relativeTo="$(parent)FeedbackButton" offsetX="45"/>
<Dimensions x="40" y="40"/>
- <OnClicked>LeoAltholic.HideUI()</OnClicked>
+ <OnClicked>LeoAltholic:HideUI()</OnClicked>
<Controls>
<Backdrop name="$(parent)BG" centerColor="101010" edgeColor="202020">
<AnchorFill/>
diff --git a/LeoAltholicUI.lua b/LeoAltholicUI.lua
index e40b852..a198efb 100644
--- a/LeoAltholicUI.lua
+++ b/LeoAltholicUI.lua
@@ -1,4 +1,6 @@
+LeoAltholic.hidden = true
+
function LeoAltholic:OnWindowMoveStop()
LeoAltholic.savedVariables.position = {
left = LeoAltholicWindow:GetLeft(),
@@ -7,7 +9,7 @@ function LeoAltholic:OnWindowMoveStop()
end
function LeoAltholic:isHidden()
- return LeoAltholic.savedVariables.hidden or false
+ return LeoAltholic.hidden
end
function LeoAltholic.RestorePosition()
@@ -17,26 +19,22 @@ function LeoAltholic.RestorePosition()
LeoAltholicWindow:ClearAnchors()
LeoAltholicWindow:SetAnchor(TOPLEFT, GuiRoot, TOPLEFT, left, top)
- if LeoAltholic.savedVariables.hidden == true then
- LeoAltholic.HideUI()
- else
- LeoAltholic.ShowUI()
- end
end
function LeoAltholic.ShowUI()
+ SCENE_MANAGER:ShowTopLevel(LeoAltholicWindow)
LeoAltholicWindow:SetHidden(false)
- LeoAltholic.savedVariables.hidden = false;
+ LeoAltholic.hidden = false;
LeoAltholic.ShowTab(LeoAltholic.savedVariables.activeTab or "Bio")
end
function LeoAltholic.HideUI()
+ SCENE_MANAGER:HideTopLevel(LeoAltholicWindow)
LeoAltholicWindow:SetHidden(true)
- LeoAltholic.savedVariables.hidden = true;
+ LeoAltholic.hidden = true;
end
function LeoAltholic.ToggleUI()
- SCENE_MANAGER:ToggleTopLevel(LeoAltholicWindow)
if LeoAltholic:isHidden() then
LeoAltholic.ShowUI()
else