fix: bag main functionality
This commit is contained in:
+4
-5
@@ -1608,11 +1608,10 @@ function Guda_BagFrame_HighlightBagButton(bagID)
|
||||
if bagID == -2 then
|
||||
-- Keyring button
|
||||
buttonName = "Guda_BagFrame_Toolbar_KeyringButton"
|
||||
elseif bagID >= 1 and bagID <= 4 then
|
||||
-- Bag buttons 1-4
|
||||
elseif bagID >= 0 and bagID <= 4 then
|
||||
-- Bag buttons 0-4 (0 is backpack)
|
||||
buttonName = "Guda_BagFrame_Toolbar_BagSlot" .. bagID
|
||||
else
|
||||
-- Bag 0 (backpack) has no button in the toolbar
|
||||
return
|
||||
end
|
||||
|
||||
@@ -1625,8 +1624,8 @@ end
|
||||
|
||||
-- Clear bag button highlighting
|
||||
function Guda_BagFrame_ClearBagButtonHighlight()
|
||||
-- Clear highlight from all bag buttons (1-4)
|
||||
for bagID = 1, 4 do
|
||||
-- Clear highlight from all bag buttons (0-4)
|
||||
for bagID = 0, 4 do
|
||||
local buttonName = "Guda_BagFrame_Toolbar_BagSlot" .. bagID
|
||||
local button = getglobal(buttonName)
|
||||
if button then
|
||||
|
||||
+35
-2
@@ -273,8 +273,8 @@
|
||||
</Scripts>
|
||||
|
||||
<Frames>
|
||||
<!-- Bag Slot 1 -->
|
||||
<Button name="$parent_BagSlot1" inherits="ItemButtonTemplate" movable="true">
|
||||
<!-- Main Bag (Backpack) Slot 0 -->
|
||||
<Button name="$parent_BagSlot0" inherits="ItemButtonTemplate">
|
||||
<Size>
|
||||
<AbsDimension x="24" y="24"/>
|
||||
</Size>
|
||||
@@ -285,6 +285,39 @@
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
Guda_BagSlot_OnLoad(this, 0)
|
||||
</OnLoad>
|
||||
<OnClick>
|
||||
Guda_BagSlot_OnClick(this, 0)
|
||||
</OnClick>
|
||||
<OnEnter>
|
||||
Guda_BagSlot_OnEnter(this, 0)
|
||||
Guda_BagFrame_HighlightBagSlots(0)
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
GameTooltip:Hide()
|
||||
Guda_BagFrame_ClearHighlightedSlots()
|
||||
</OnLeave>
|
||||
<OnEvent>
|
||||
Guda_BagSlot_OnEvent(this, event, arg1)
|
||||
</OnEvent>
|
||||
</Scripts>
|
||||
</Button>
|
||||
|
||||
<!-- Bag Slot 1 -->
|
||||
<Button name="$parent_BagSlot1" inherits="ItemButtonTemplate" movable="true">
|
||||
<Size>
|
||||
<AbsDimension x="24" y="24"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativePoint="RIGHT" relativeTo="$parent_BagSlot0">
|
||||
<Offset>
|
||||
<AbsDimension x="2" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
this:RegisterForDrag("LeftButton")
|
||||
|
||||
Reference in New Issue
Block a user