Skip to content

Commit

Permalink
queue and some quick fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tuller committed Oct 30, 2022
1 parent 61b15ad commit c41a795
Show file tree
Hide file tree
Showing 7 changed files with 93 additions and 22 deletions.
13 changes: 6 additions & 7 deletions Dominos/Dominos.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,7 @@ function Addon:OnEnable()

-- watch for binding updates, updating all bars on the last one that happens
-- in rapid sequence
self.UPDATE_BINDINGS = self:Defer(
function() self.Frame:ForEach('ForButtons', 'UpdateHotkeys') end,
self,
0.01
)

self.UpdateHotkeys = self:Defer(function() self.Frame:ForEach('ForButtons', 'UpdateHotkeys') end, 0.01)
self:RegisterEvent('UPDATE_BINDINGS')
end

Expand All @@ -55,7 +50,11 @@ function Addon:OnUpgradeAddon(oldVersion, newVersion)
self:Printf(L.Updated, ADDON_VERSION, self:GetWowBuild())
end

-- keybound events
-- binding events
function Addon:UPDATE_BINDINGS()
self:UpdateHotkeys()
end

function Addon:LIBKEYBOUND_ENABLED()
self.Frame:ForEach('KEYBOUND_ENABLED')
end
Expand Down
1 change: 1 addition & 0 deletions Dominos/Dominos.toc
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ bars\encounterBar.lua
bars\menuBar.lua
bars\petBar.lua
# bars\possessBar.lua
bars\queueStatusBar.lua
bars\stanceBar.lua
bars\talkingHeadBar.lua
bars\totemBar.lua
Expand Down
4 changes: 4 additions & 0 deletions Dominos/bars/bagBar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ function BagBar:AcquireButton(index)
end
end

function BagBar:OnAttachButton(button)
button:Show()
end

function BagBar:NumButtons()
local count = 1

Expand Down
53 changes: 53 additions & 0 deletions Dominos/bars/queueStatusBar.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
local AddonName, Addon = ...
if not (QueueStatusButton and Addon:IsBuild("retail")) then
return
end

local L = LibStub('AceLocale-3.0'):GetLocale(AddonName)

-- bar
local QueueStatusBar = Addon:CreateClass('Frame', Addon.Frame)

function QueueStatusBar:New()
return QueueStatusBar.proto.New(self, "queue")
end

function QueueStatusBar:GetDisplayName()
return L.QueueStatusBarDisplayName
end

QueueStatusBar:Extend('OnAcquire', function(self) self:Layout() end)

function QueueStatusBar:GetDefaults()
return {
displayLayer = 'LOW',
point = 'BOTTOMRIGHT',
x = -250
}
end

function QueueStatusBar:Layout()
QueueStatusButton:ClearAllPoints()
QueueStatusButton:SetPoint('CENTER', self)
QueueStatusButton:SetParent(self)

local w, h = QueueStatusButton:GetSize()
local pW, pH = self:GetPadding()

self:TrySetSize(w + pW, h + pH)
end


-- module
local QueueStatusBarModule = Addon:NewModule('QueueStatusBar', 'AceEvent-3.0')

function QueueStatusBarModule:Load()
self.frame = QueueStatusBar:New()
end

function QueueStatusBarModule:Unload()
if self.frame then
self.frame:Free()
self.frame = nil
end
end
19 changes: 7 additions & 12 deletions Dominos/bars/stanceBar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ function StanceBar:AcquireButton(index)
end

function StanceBar:OnAttachButton(button)
button:Show()
button:UpdateHotkeys()
Addon:GetModule('ButtonThemer'):Register(button, 'Class Bar')
Addon:GetModule('Tooltips'):Register(button)
end
Expand Down Expand Up @@ -136,29 +138,22 @@ function StanceBarModule:UpdateNumForms()
end

function StanceBarModule:OnFirstLoad()
-- banish the current stance bar
local StanceBar = _G.StanceBar
if StanceBar then
-- banish the current stance bar
StanceBar.ignoreFramePositionManager = true
StanceBar:UnregisterAllEvents()
StanceBar.SetParent(Addon.ShadowUIParent)
StanceBar.Hide()
StanceBar:SetParent(Addon.ShadowUIParent)
StanceBar:ClearAllPoints()
StanceBar:SetPoint('CENTER')
StanceBar:Hide()

-- and its buttons, too
for _, button in pairs(StanceBar.actionButtons) do
button:UnregisterAllEvents()
button:SetAttribute('statehidden', true)
button:Hide()
end

-- With 8.2 and later there's more restrictions on frame anchoring
-- if something happens to be attached to a restricted frame. This
-- causes issues with moving the action bars around, so we perform a
-- clear all points to avoid some frame dependency issues. We then
-- follow it up with a SetPoint to handle the cases of bits of the
-- UI code assuming that this element has a position.
StanceBar.ClearAllPoints()
StanceBar.SetPoint('CENTER')
end

-- turn off stance bar related action bar events
Expand Down
7 changes: 4 additions & 3 deletions Dominos/localization/localization.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ L.ConfigModeExit = 'Exit Config Mode'
L.ConfigModeHelp = 'Drag any bar to move it. Right Click to configure. Middle Click or Shift-Right Click to toggle visibility.'
L.CopyDesc = 'Copies settings from <profile>'
L.DeleteDesc = 'Deletes <profile>'
L.EncounterBarDisplayName = HUD_EDIT_MODE_ENCOUNTER_BAR_LABEL or "Encounter Bar"
L.ExtraBarDescription = "Displays zone and encounter specific abilities"
L.ExtraBarDisplayName = HUD_EDIT_MODE_EXTRA_ABILITIES_LABEL or "Extra Bar"
L.EncounterBarDisplayName = HUD_EDIT_MODE_ENCOUNTER_BAR_LABEL or "Encounter Bar"
L.GridDensity = "Density"
L.Hidden = "Hidden"
L.HideBar = 'Middle Click or Shift-Right Click to hide'
Expand All @@ -39,14 +39,15 @@ L.ListDesc = 'Lists all profiles'
L.MenuBarDisplayName = "Menu"
L.MouseMovementTip = 'Drag with the Left Button to move.'
L.NewPlayer = 'Created new profile for %s'
L.PossessBarDisplayName = HUD_EDIT_MODE_POSSESS_ACTION_BAR_LABEL or 'Possess Bar'
L.PetBarDisplayName = HUD_EDIT_MODE_PET_ACTION_BAR_LABEL or "Pet Action Bar"
L.PossessBarDisplayName = HUD_EDIT_MODE_POSSESS_ACTION_BAR_LABEL or 'Possess Bar'
L.PrintVersionDesc = 'Prints the current version'
L.ProfileCopied = 'Copied settings from "%s"'
L.ProfileCreated = 'Created new profile "%s"'
L.ProfileDeleted = 'Deleted profile "%s"'
L.ProfileLoaded = 'Set profile to "%s"'
L.ProfileReset = 'Reset profile "%s"'
L.QueueStatusBarDisplayName = "Queue Status"
L.ResetDesc = 'Returns to default settings'
L.RollBarDisplayName = "Rolls"
L.SaveDesc = 'Saves current settings and switches to <profile>'
Expand All @@ -66,10 +67,10 @@ L.Shown = "Shown"
L.ShowOptionsDesc = 'Shows the options menu'
L.ShowOptionsTip = 'Right Click to show the options menu'
L.TalkingHeadBarDisplayName = HUD_EDIT_MODE_TALKING_HEAD_FRAME_LABEL or "Talking Heads"
L.TotemBarDisplayName = "Totem Bar"
L.TipRollBar = 'Displays frames for rolling on items when in a group.'
L.TipVehicleBar = [[Displays controls to aim and exit a vehicle.\nAll other vehicle actions are displayed on the possess bar.]]
L.ToggleFramesDesc = 'Toggles the given <frameList>'
L.TotemBarDisplayName = "Totem Bar"
L.Updated = 'Updated to v%s'
L.VehicleBarDisplayName = HUD_EDIT_MODE_VEHICLE_LEAVE_BUTTON_LABEL or BINDING_NAME_VEHICLEEXIT
L.WrongBuildWarning = "You're running a %s version for %s on a %s server. Things may not work"
18 changes: 18 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Dominos Changelog

## 10.0.0-alpha3

* Added a new pet bar implementation
* Added a queue status bar
* Added support for Warrior stances
* Reorganized menu buttons (thanks Daenarys)
* Turned the extra bar back on (it *probably* works without any additional adjustments needed)

### Known Issues

* This version does not support classic versions of WoW
* Action bars do not support spell flyout actions at the moment (Blizzard bug).
You'll receive an error if you try to use one.
* The possess bar and vehicle exit bars are not implemented. You can use the
builtin versions.
* Not all action bars support cast on key press at the moment (Blizzard bug)
* Not all action bars support hold to cast at the moment (Blizzard bug)

## 10.0.0-alpha2

* Action button proxying implemented. Action Bars 1, 3, 4, 5, 6, 13, and 14 now
Expand Down

0 comments on commit c41a795

Please sign in to comment.