New release

Leandro Silva [11-02-18 - 09:12]
New release
Filename
LeoAltholic.lua
LeoAltholic.txt
LeoAltholic.xml
LeoAltholicInit.lua
LeoAltholicUI.lua
diff --git a/LeoAltholic.lua b/LeoAltholic.lua
index dd94b0e..485a2f7 100644
--- a/LeoAltholic.lua
+++ b/LeoAltholic.lua
@@ -159,6 +159,14 @@ local function initAccountData()
         LeoAltholic.globalData.AccountData.inventory[BAG_SUBSCRIBER_BANK].list = {}
     end

+    LeoAltholic.globalData.AccountData.inventory[BAG_BANK].size = GetBagSize(BAG_BANK)
+    LeoAltholic.globalData.AccountData.inventory[BAG_BANK].used = GetNumBagUsedSlots(BAG_BANK)
+    LeoAltholic.globalData.AccountData.inventory[BAG_BANK].free = GetNumBagFreeSlots(BAG_BANK)
+
+    LeoAltholic.globalData.AccountData.inventory[BAG_SUBSCRIBER_BANK].size = GetBagSize(BAG_SUBSCRIBER_BANK)
+    LeoAltholic.globalData.AccountData.inventory[BAG_SUBSCRIBER_BANK].used = GetNumBagUsedSlots(BAG_SUBSCRIBER_BANK)
+    LeoAltholic.globalData.AccountData.inventory[BAG_SUBSCRIBER_BANK].free = GetNumBagFreeSlots(BAG_SUBSCRIBER_BANK)
+
     LeoAltholic.globalData.AccountData.inventory.money = GetBankedMoney()
     LeoAltholic.globalData.AccountData.inventory.ap = GetCurrencyAmount(CURT_ALLIANCE_POINTS, CURRENCY_LOCATION_BANK)
     LeoAltholic.globalData.AccountData.inventory.telvar = GetCurrencyAmount(CURT_TELVAR_STONES, CURRENCY_LOCATION_BANK)
diff --git a/LeoAltholic.txt b/LeoAltholic.txt
index 37df3b1..4fd4f4b 100644
--- a/LeoAltholic.txt
+++ b/LeoAltholic.txt
@@ -1,6 +1,6 @@
 ## Title: Leo's Altholic
 ## APIVersion: 100024 100025
-## Version: 1.6.0
+## Version: 1.6.1
 ## Author: |c39B027@LeandroSilva|r
 ## SavedVariables: LeoAltholicSavedVariables LeoAltholicCharVariables
 ## OptionalDependsOn: LibStub LibFeedback LibAddonMenu-2.0
diff --git a/LeoAltholic.xml b/LeoAltholic.xml
index dacd1bf..2792851 100644
--- a/LeoAltholic.xml
+++ b/LeoAltholic.xml
@@ -1,6 +1,7 @@
 <GuiXml>
     <Font name="LeoAltholicLargeFont" font="$(MEDIUM_FONT)|18|soft-shadow-thin"/>
     <Font name="LeoAltholicNormalFont" font="$(MEDIUM_FONT)|16|soft-shadow-thin"/>
+    <Font name="LeoAltholicBoldFont" font="$(BOLD_FONT)|16|soft-shadow-thin"/>
     <Font name="LeoAltholicSmallFont" font="$(MEDIUM_FONT)|14|soft-shadow-thin"/>
     <Font name="LeoAltholicExtraSmallFont" font="$(MEDIUM_FONT)|12|soft-shadow-thin"/>
     <Controls>
@@ -1783,18 +1784,18 @@
         </Control>

         <TopLevelControl name="LeoAltholicInventoryWindow" mouseEnabled="true" movable="false" hidden="true" clampedToScreen="true">
-            <Dimensions x="350" y="700" />
+            <Dimensions x="400" y="700" />
             <Anchor point="TOPLEFT" relativeTo="LeoAltholicWindow" relativePoint="TOPRIGHT" offsetX="4" offsetY="0" />

             <Controls>
                 <Backdrop name="$(parent)BG" centerColor="000000" edgeColor="222222">
                     <Anchor point="TOPLEFT" relativePoint="TOPLEFT" relativeTo="$(parent)"/>
-                    <Dimensions x="350" y="700"/>
+                    <Dimensions x="400" y="700"/>
                     <Edge edgeSize="1"/>
                 </Backdrop>
                 <Backdrop name="$(parent)HeaderBG" centerColor="111111" edgeColor="222222">
                     <Anchor point="TOPLEFT" relativePoint="TOPLEFT" relativeTo="$(parent)" offsetX="8" offsetY="5"/>
-                    <Dimensions x="342" y="40"/>
+                    <Dimensions x="392" y="40"/>
                     <Edge edgeSize="1"/>
                 </Backdrop>
                 <Label name="$(parent)Title" color="39B027" font="ZoFontWinH3" wrapMode="ELLIPSIS" verticalAlignment="CENTER">
@@ -1849,7 +1850,7 @@

                 <Backdrop name="$(parent)List" tier="1" centerColor="000000" edgeColor="202020" hidden="false" clampedToScreen="true" movable="false" mouseEnabled="true" inherits="ZO_ScrollContainerBase">
                     <Anchor point="TOPLEFT" relativePoint="TOPLEFT" relativeTo="LeoAltholicInventoryWindow" offsetX="0" offsetY="52"/>
-                    <Dimensions x="350" y="650"/>
+                    <Dimensions x="400" y="650"/>
                     <Edge edgeSize="1"/>
                     <OnInitialized>ZO_Scroll_Initialize(self)</OnInitialized>
                     <Controls>
@@ -1863,12 +1864,20 @@
         </TopLevelControl>

         <Control name="LeoAltholicInventoryTemplate" virtual="true" mouseEnabled="true" horizontalAlignment="LEFT" verticalAlignment="CENTER">
-            <Dimensions x="350" y="30" />
+            <Dimensions x="400" y="30" />
             <Controls>
                 <Texture name="$(parent)BG" inherits="ZO_ThinListBgStrip" />
-                <Label name="$(parent)Item" visible="true" mouseEnabled="true" font="ZoFontWinH4" color="ffffff" inheritAlpha="true" verticalAlignment="CENTER" horizontalAlignment="LEFT" resizeToFitDescendents="true">
-                    <Dimensions x="336" y="30" />
+                <Texture name="$(parent)Icon">
+                    <Dimensions y="25" x="25"/>
                     <Anchor point="TOPLEFT" relativeTo="$(parent)" relativePoint="TOPLEFT" offsetX="8" offsetY="2" />
+                </Texture>
+                <Label name="$(parent)Qty" hidden="false" mouseEnabled="false" font="LeoAltholicBoldFont" color="ffffff" inheritAlpha="true" verticalAlignment="CENTER" horizontalAlignment="RIGHT" resizeToFitDescendents="true">
+                    <Dimensions x="30" y="30" />
+                    <Anchor point="BOTTOMRIGHT" relativeTo="$(parent)Icon" relativePoint="BOTTOMRIGHT" offsetX="4" offsetY="4" />
+                </Label>
+                <Label name="$(parent)Item" visible="true" mouseEnabled="true" font="ZoFontWinH4" color="ffffff" inheritAlpha="true" verticalAlignment="CENTER" horizontalAlignment="LEFT" resizeToFitDescendents="true">
+                    <Dimensions x="386" y="30" />
+                    <Anchor point="TOPLEFT" relativeTo="$(parent)Icon" relativePoint="TOPRIGHT" offsetX="8" offsetY="0" />
                 </Label>
             </Controls>
         </Control>
diff --git a/LeoAltholicInit.lua b/LeoAltholicInit.lua
index 8437eea..d535708 100644
--- a/LeoAltholicInit.lua
+++ b/LeoAltholicInit.lua
@@ -6,7 +6,7 @@ LeoAltholicToolbarUI = LeoAltholicToolbarUI or {}

 LeoAltholic.name = "LeoAltholic"
 LeoAltholic.displayName = "Leo's Altholic"
-LeoAltholic.version = "1.6.0"
+LeoAltholic.version = "1.6.1"
 LeoAltholic.chatPrefix = "|c39B027" .. LeoAltholic.name .. "|r: "

 LeoAltholic.TAB_BIO = "Bio"
diff --git a/LeoAltholicUI.lua b/LeoAltholicUI.lua
index 9d77e3c..f285ab2 100644
--- a/LeoAltholicUI.lua
+++ b/LeoAltholicUI.lua
@@ -57,20 +57,24 @@ function LeoAltholic.ShowInventoryUI(charName, bagId)
         if not row then
             row = CreateControlFromVirtual("LeoAltholicInventoryWindowRow" .. i, sc, "LeoAltholicInventoryTemplate")
         end
-        local control = row:GetNamedChild("Item")
-        control:SetHidden(false)
-        local qty = ""
+        local texture = row:GetNamedChild("Icon")
+        local label = row:GetNamedChild("Item")
+        texture:SetHidden(false)
+        label:SetHidden(false)
+        texture:SetTexture(GetItemLinkIcon(item.link))
         if item.count > 1 then
-            qty = " (" .. item.count ..")"
+            local qty = row:GetNamedChild("Qty")
+            qty:SetText(item.count)
+            qty:SetHidden(false)
         end
-        control:SetText(zo_iconFormat(GetItemLinkIcon(item.link), 25, 25) .." ".. item.link .. qty)
-        control:SetHandler("OnMouseEnter",
+        label:SetText(item.link)
+        label:SetHandler("OnMouseEnter",
                 function(self)
                     InitializeTooltip(LeoAltholicItemToolTip, LeoAltholicInventoryWindow, TOPLEFT, -450, 50, TOPLEFT)
                     LeoAltholicItemToolTip:SetLink(item.link)
                 end
         )
-        control:SetHandler("OnMouseExit",
+        label:SetHandler("OnMouseExit",
                 function(self)
                     ClearTooltip(LeoAltholicItemToolTip)
                 end