Skip to content

Commit

Permalink
Merge pull request #33 from GovtGeek/quickslot-flyouts
Browse files Browse the repository at this point in the history
Quickslot flyouts
  • Loading branch information
GovtGeek authored Jul 29, 2024
2 parents ba190db + efad84a commit 79a4b11
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 2 deletions.
5 changes: 5 additions & 0 deletions Outfitter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2568,6 +2568,11 @@ function Outfitter:SetShowMinimapButton(pShowButton)
self:Update(false)
end

function Outfitter:SetQuickslotFlyouts(pShowButton)
self.Settings.Options.QuickslotFlyouts = pShowButton
self:Update(false)
end

function Outfitter:SetShowHotkeyMessages(pShowHotkeyMessages)
self.Settings.Options.DisableHotkeyMessages = not pShowHotkeyMessages

Expand Down
23 changes: 23 additions & 0 deletions Outfitter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -999,6 +999,29 @@
</OnLeave>
</Scripts>
</CheckButton>
<CheckButton name="OutfitterQuickslotFlyouts" inherits="OutfitterCheckboxTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="OutfitterItemComparisons" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-10"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
getglobal(self:GetName().."Text"):SetText(Outfitter.cEnableQuickslotFlyouts)
</OnLoad>
<OnClick>
Outfitter:SetQuickslotFlyouts(self:GetChecked())
</OnClick>
<OnEnter>
Outfitter.AddNewbieTip(self, Outfitter.cEnableQuickslotFlyouts, 1.0, 1.0, 1.0, Outfitter.cEnableQuickslotFlyoutsDescription, 1)
</OnEnter>
<OnLeave>
GameTooltip:Hide()
</OnLeave>
</Scripts>
</CheckButton>
</Frames>
<Scripts>
<OnLoad>
Expand Down
4 changes: 3 additions & 1 deletion OutfitterQuickSlots.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--[[----------------------------------------
----[[----------------------------------------
Outfitter._FlyoutQuickSlots = {}
----------------------------------------
function Outfitter._FlyoutQuickSlots:Construct()
Expand Down Expand Up @@ -33,10 +33,12 @@ function Outfitter._FlyoutQuickSlots:Construct()
end

function Outfitter._FlyoutQuickSlots:PreClick(pButton, ...)
if not Outfitter.Settings.Options.QuickslotFlyouts then return end
self.CurrentInventorySlot = Outfitter.cSlotIDToInventorySlot[pButton:GetID()]
end

function Outfitter._FlyoutQuickSlots:PostClick(pButton, ...)
if not Outfitter.Settings.Options.QuickslotFlyouts then return end
local vSlotItemLink = Outfitter:GetInventorySlotIDLink(pButton.id or pButton:GetID())

if EquipmentFlyoutFrame:IsVisible() and EquipmentFlyoutFrame.button == pButton then
Expand Down
2 changes: 2 additions & 0 deletions OutfitterStrings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ Outfitter.cTooltipInfoOffDescription = "Turn this on if you want to display 'Use
Outfitter.cItemComparisons = "Show in item comparisons"
Outfitter.cItemComparisonsOnDescription = "Turn this off to only include your equipped items in item comparisons"
Outfitter.cItemComparisonsOffDescription = "Turn this on to include items from your outfits in tooltip item comparisons"
Outfitter.cEnableQuickslotFlyouts = "Enable quickslot flyouts"
Outfitter.cEnableQuickslotFlyoutsDescription = "Enable quickslot flyouts when item is picked up from equipped slot"
Outfitter.cOutfitDisplay = "Outfit display"
Outfitter.cShowHotkeyMessages = "Show outfit change messages"
Outfitter.cShowHotkeyMessagesOnDescription = "Turn this off if you don't want to see a message when you change outfits using a key binding"
Expand Down
2 changes: 1 addition & 1 deletion Outfitter_Vanilla.toc
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ OutfitterOptimize.lua
OutfitterUITools.lua
OutfitterScripting.lua
OutfitterScriptDialog.lua
OutfitterQuickSlots.lua
#OutfitterQuickSlots.lua
OutfitterMinimapButton.lua
OutfitterBar.lua
OutfitterAbout.lua
Expand Down

0 comments on commit 79a4b11

Please sign in to comment.