-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
57 changed files
with
6,089 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
--[[ | ||
Bagnon | ||
Displays the player's inventory in a single frame | ||
--]] | ||
|
||
local bBagSlotButton_OnEnter, bMainBag_OnEnter, bKeyRingButton_OnEnter; | ||
local bBagSlotButton_OnClick, bKeyRingButton_OnClick, bMainBag_OnClick; | ||
|
||
--[[ Loading Functions ]]-- | ||
|
||
function Bagnon_OnLoad() | ||
this:RegisterEvent("ADDON_LOADED"); | ||
end | ||
|
||
--[[ Event Handler ]]-- | ||
|
||
function Bagnon_OnEvent(event) | ||
if ( event == "ADDON_LOADED" and arg1 == "Bagnon") then | ||
Bagnon:UnregisterEvent("ADDON_LOADED"); | ||
Bagnon_Load(); | ||
end | ||
end | ||
|
||
function Bagnon_Load() | ||
BagnonFrame_Load(Bagnon, {-2, 0, 1, 2, 3, 4}, BAGNON_INVENTORY_TITLE); | ||
Bagnon_AddBagHooks(); | ||
end | ||
|
||
--[[ UI Functions ]]-- | ||
|
||
--OnShow | ||
function Bagnon_OnShow() | ||
MainMenuBarBackpackButton:SetChecked(1); | ||
PlaySound("igBackPackOpen"); | ||
end | ||
|
||
--OnHide | ||
function Bagnon_OnHide() | ||
MainMenuBarBackpackButton:SetChecked(0); | ||
PlaySound("igBackPackClose"); | ||
end | ||
|
||
--Show Bags | ||
function Bagnon_ToggleBags() | ||
if( not BagnonBags:IsShown() ) then | ||
BagnonBags:Show(); | ||
BagnonSets["Bagnon"].bagsShown = 1; | ||
this:SetText(BAGNON_HIDEBAGS); | ||
else | ||
BagnonBags:Hide(); | ||
BagnonSets["Bagnon"].bagsShown = nil; | ||
this:SetText(BAGNON_SHOWBAGS); | ||
end | ||
|
||
BagnonFrame_TrimToSize(Bagnon); | ||
end | ||
|
||
--[[ Bag Overrides ]]-- | ||
|
||
function Bagnon_AddBagHooks() | ||
bMainBag_OnEnter = MainMenuBarBackpackButton:GetScript("OnEnter"); | ||
bMainBag_OnClick = MainMenuBarBackpackButton:GetScript("OnClick"); | ||
MainMenuBarBackpackButton:SetScript("OnEnter", BagnonBlizMainBag_OnEnter); | ||
MainMenuBarBackpackButton:SetScript("OnLeave", BagnonBlizBag_OnLeave); | ||
MainMenuBarBackpackButton:SetScript("OnClick", BagnonBlizMainBag_OnClick); | ||
|
||
bBagSlotButton_OnEnter = BagSlotButton_OnEnter; | ||
BagSlotButton_OnEnter = BagnonBlizBag_OnEnter; | ||
bBagSlotButton_OnClick = getglobal("CharacterBag0Slot"):GetScript("OnClick"); | ||
for i = 0, 3 do | ||
getglobal("CharacterBag" .. i .. "Slot"):SetScript("OnLeave", BagnonBlizBag_OnLeave); | ||
getglobal("CharacterBag" .. i .. "Slot"):SetScript("OnClick", BagnonBlizBag_OnClick); | ||
end | ||
|
||
bKeyRingButton_OnEnter = KeyRingButton:GetScript("OnEnter"); | ||
bKeyRingButton_OnClick = KeyRingButton:GetScript("OnClick"); | ||
KeyRingButton:SetScript("OnEnter", BagnonBlizKeyRing_OnEnter); | ||
KeyRingButton:SetScript("OnLeave", BagnonBlizBag_OnLeave); | ||
KeyRingButton:SetScript("OnClick", BagnonBlizKeyRing_OnClick); | ||
end | ||
|
||
--Main Bag | ||
function BagnonBlizMainBag_OnEnter() | ||
if( Bagnon:IsShown() ) then | ||
BagnonFrame_HighlightSlots(Bagnon, this:GetID()); | ||
end | ||
bMainBag_OnEnter(); | ||
end | ||
|
||
function BagnonBlizMainBag_OnClick() | ||
if( IsShiftKeyDown() ) then | ||
BagnonFrame_ToggleBag(Bagnon, this:GetID()); | ||
else | ||
bMainBag_OnClick(); | ||
end | ||
end | ||
|
||
--Normal Bags | ||
function BagnonBlizBag_OnEnter() | ||
if(Bagnon:IsShown() ) then | ||
BagnonFrame_HighlightSlots(Bagnon, this:GetID() - 19); | ||
end | ||
|
||
bBagSlotButton_OnEnter(); | ||
end | ||
|
||
function BagnonBlizBag_OnClick() | ||
if( IsShiftKeyDown() ) then | ||
BagnonFrame_ToggleBag(Bagnon, this:GetID() - 19); | ||
else | ||
bBagSlotButton_OnClick(); | ||
end | ||
end | ||
|
||
function BagnonBlizBag_OnLeave() | ||
GameTooltip:Hide(); | ||
BagnonFrame_UnhighlightAll(Bagnon); | ||
end | ||
|
||
--KeyRing | ||
function BagnonBlizKeyRing_OnEnter() | ||
if(Bagnon:IsShown() ) then | ||
BagnonFrame_HighlightSlots(Bagnon, this:GetID()); | ||
end | ||
bKeyRingButton_OnEnter(); | ||
end | ||
|
||
function BagnonBlizKeyRing_OnClick() | ||
if( IsShiftKeyDown() ) then | ||
BagnonFrame_ToggleBag(Bagnon, this:GetID()); | ||
else | ||
bKeyRingButton_OnClick(); | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## Interface: 11200 | ||
## Title: Bagnon | ||
## Notes: Displays the player's inventory in a single frame. | ||
## Author: Tuller | ||
## Dependencies: Bagnon_Core | ||
## LoadOnDemand: 1 | ||
Bagnon.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,188 @@ | ||
<Ui xmlns="http://www.blizzard.com/wow/ui/" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd"> | ||
|
||
<Script file="Bagnon.lua"/> | ||
|
||
<Button name="BagnonMainBagTemplate" id="0" virtual="true"> | ||
<Size x="37" y="37"/> | ||
|
||
<Layers> | ||
<Layer level="BORDER"> | ||
<Texture name="$parentIconTexture" file="Interface\Buttons\Button-Backpack-Up" setAllPoints="true"/> | ||
|
||
<FontString name="$parentCount" font="NumberFontNormal" justifyH="RIGHT" hidden="true"> | ||
<Anchors> | ||
<Anchor point="BOTTOMRIGHT"> | ||
<Offset x="-2" y="2"/> | ||
</Anchor> | ||
</Anchors> | ||
</FontString> | ||
</Layer> | ||
</Layers> | ||
|
||
<NormalTexture name="$parentNormalTexture" file="Interface\Buttons\UI-Quickslot2"> | ||
<Size x="64" y="64"/> | ||
<Anchors> | ||
<Anchor point="CENTER"> | ||
<Offset x="0" y="-1"/> | ||
</Anchor> | ||
</Anchors> | ||
</NormalTexture> | ||
<PushedTexture file="Interface\Buttons\UI-Quickslot-Depress"/> | ||
<HighlightTexture file="Interface\Buttons\ButtonHilight-Square" alphaMode="ADD"/> | ||
|
||
<Scripts> | ||
<OnLoad> | ||
this:RegisterForClicks("LeftButtonUp", "RightButtonUp"); | ||
</OnLoad> | ||
<OnEnter> | ||
BagnonBag_OnEnter(); | ||
</OnEnter> | ||
<OnLeave> | ||
BagnonBag_OnLeave(); | ||
</OnLeave> | ||
<OnClick> | ||
BagnonBag_OnClick(); | ||
</OnClick> | ||
<OnReceiveDrag> | ||
BagnonBag_OnClick(); | ||
</OnReceiveDrag> | ||
</Scripts> | ||
</Button> | ||
|
||
<Button name="BagnonKeyButton" virtual="true"> | ||
<Size x="18" y="39"/> | ||
|
||
<Scripts> | ||
<OnLoad> | ||
this:SetID(-2); | ||
this:RegisterForClicks("LeftButtonUp", "RightButtonUp"); | ||
</OnLoad> | ||
<OnEnter> | ||
BagnonBag_OnEnter(); | ||
</OnEnter> | ||
<OnLeave> | ||
BagnonBag_OnLeave(); | ||
</OnLeave> | ||
<OnClick> | ||
BagnonBag_OnClick(); | ||
</OnClick> | ||
<OnReceiveDrag> | ||
BagnonBag_OnClick(); | ||
</OnReceiveDrag> | ||
</Scripts> | ||
|
||
<NormalTexture file="Interface\Buttons\UI-Button-KeyRing"> | ||
<TexCoords left="0" right="0.5625" top="0" bottom="0.609375"/> | ||
</NormalTexture> | ||
<HighlightTexture file="Interface\Buttons\UI-Button-KeyRing-Highlight" alphaMode="ADD"> | ||
<TexCoords left="0" right="0.5625" top="0" bottom="0.609375"/> | ||
</HighlightTexture> | ||
<PushedTexture file="Interface\Buttons\UI-Button-KeyRing-Down"> | ||
<TexCoords left="0" right="0.5625" top="0" bottom="0.609375"/> | ||
</PushedTexture> | ||
</Button> | ||
|
||
<Frame name="BagnonBagSlots" inherits="BagnonBagSlotsTemplate" virtual="true"> | ||
<Size x="188" y="42"/> | ||
|
||
<Frames> | ||
<Button name="$parent0" inherits="BagnonMainBagTemplate" id="0"> | ||
<Anchors> | ||
<Anchor point="BOTTOMLEFT"> | ||
<Offset x="8" y="4"/> | ||
</Anchor> | ||
</Anchors> | ||
</Button> | ||
<Button name="$parent1" inherits="BagnonBagTemplate" id="1"> | ||
<Anchors> | ||
<Anchor point="LEFT" relativeTo="$parent0" relativePoint="RIGHT"> | ||
<Offset x="2" y="0"/> | ||
</Anchor> | ||
</Anchors> | ||
</Button> | ||
<Button name="$parent2" inherits="BagnonBagTemplate" id="2"> | ||
<Anchors> | ||
<Anchor point="LEFT" relativeTo="$parent1" relativePoint="RIGHT"> | ||
<Offset x="2" y="0"/> | ||
</Anchor> | ||
</Anchors> | ||
</Button> | ||
<Button name="$parent3" inherits="BagnonBagTemplate" id="3"> | ||
<Anchors> | ||
<Anchor point="LEFT" relativeTo="$parent2" relativePoint="RIGHT"> | ||
<Offset x="2" y="0"/> | ||
</Anchor> | ||
</Anchors> | ||
</Button> | ||
<Button name="$parent4" inherits="BagnonBagTemplate" id="4"> | ||
<Anchors> | ||
<Anchor point="LEFT" relativeTo="$parent3" relativePoint="RIGHT"> | ||
<Offset x="2" y="0"/> | ||
</Anchor> | ||
</Anchors> | ||
</Button> | ||
<Button name="$parent-2" inherits="BagnonKeyButton" id="-2"> | ||
<Anchors> | ||
<Anchor point="LEFT" relativeTo="$parent4" relativePoint="RIGHT"> | ||
<Offset x="2" y="0"/> | ||
</Anchor> | ||
</Anchors> | ||
</Button> | ||
</Frames> | ||
</Frame> | ||
|
||
<Button name="Bagnon" inherits="BagnonFrameTemplate"> | ||
<Anchors> | ||
<Anchor point="RIGHT"> | ||
<Offset x="-4" y="-100"/> | ||
</Anchor> | ||
</Anchors> | ||
|
||
<Frames> | ||
<Frame name="$parentBags" inherits="BagnonBagSlots" hidden="true"> | ||
<Anchors> | ||
<Anchor point="BOTTOMLEFT"> | ||
<Offset x="0" y="24"/> | ||
</Anchor> | ||
</Anchors> | ||
</Frame> | ||
|
||
<Button name="$parentShowBags" text="BAGNON_SHOWBAGS"> | ||
<Size x="72" y="32"/> | ||
|
||
<Anchors> | ||
<Anchor point="BOTTOMLEFT"> | ||
<Offset x="10" y="0"/> | ||
</Anchor> | ||
</Anchors> | ||
<Scripts> | ||
<OnClick> | ||
Bagnon_ToggleBags(); | ||
</OnClick> | ||
</Scripts> | ||
|
||
<ButtonText setAllPoints="true"/> | ||
<NormalFont font="GameFontNormal" justifyH="LEFT"/> | ||
<HighlightFont font="GameFontHighlight" justifyH="LEFT"/> | ||
</Button> | ||
</Frames> | ||
|
||
<Scripts> | ||
<OnLoad> | ||
Bagnon_OnLoad(); | ||
</OnLoad> | ||
<OnEvent> | ||
Bagnon_OnEvent(event); | ||
</OnEvent> | ||
<OnShow> | ||
Bagnon_OnShow(); | ||
</OnShow> | ||
<OnHide> | ||
BagnonFrame_OnHide(); | ||
Bagnon_OnHide(); | ||
</OnHide> | ||
</Scripts> | ||
</Button> | ||
</Ui> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
## Interface: 11200 | ||
## Title: Bagnon_Core | ||
## Notes: Core functionality for Bagnon and Banknon | ||
## Author: Tuller | ||
## Version: 6.10.22 | ||
## Dependencies: | ||
## OptionalDeps: KC_Items | ||
## SavedVariablesPerCharacter: BagnonSets | ||
lib\TLib.lua | ||
lib\Infield.lua | ||
localization.lua | ||
trans\localization.es.lua | ||
trans\localization.de.lua | ||
trans\localization.fr.lua | ||
trans\localization.cn.lua | ||
trans\localization.tw.lua | ||
core\Utility.lua | ||
core\Overrides.lua | ||
core\Frame.xml | ||
menu\Menu.xml | ||
spot\spot.xml | ||
Slash.lua | ||
Events.lua |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<Bindings> | ||
<Binding name="BAGNON_TOGGLE" description="Toggle Inventory" header="BAGNON"> | ||
BagnonFrame_Toggle("Bagnon"); | ||
</Binding> | ||
<Binding name="BANKNON_TOGGLE" description="Toggle Bank"> | ||
BagnonFrame_Toggle("Banknon"); | ||
</Binding> | ||
</Bindings> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
I don't accept any monetary donations for my work. | ||
However, I do actually play World of Warcraft. | ||
But if you'd like to mail me gold or anything, then | ||
feel free to send it to Tuller, my druid, on the US server, Lothar. | ||
|
||
Its a well known fact that epic mounts help me code faster :) |
Oops, something went wrong.