Dominos Modification - WoWInterface
Thread Tools Display Modes
11-23-13, 08:36 PM   #1
A Warpwood Thunder Caller
Join Date: Jul 2011
Posts: 96
Dominos Modification

I'm not entirely sure whether this thread belongs in the request or help sub-forum since it's about Dominos which is an add-on that already exists, but I'm putting it in the requests section because I don't know how to go about implementing the modification I'd like and it's more of a request overall. Feel free to move it if necessary.

Cross-post from the WoW Macro & UI forum.

First and foremost, apologies for the long post, but I'm trying to be thorough (there is no TL;DR version). =)

Yesterday, I approached Tuller (the author of Dominos) to see if he'd be willing to write up some quick (not sure how quick, to be honest) and dirty code for an idea I had. I've no idea how to link directly to specific comments on the WoWI site, but, for future reference, they're comments 1878-1881 (http://www.wowinterface.com/download...=9085#comments). As he stated, it's a pretty unique request and he doesn't seem to be too interested in attempting such a modification, so I'm turning to my fellow Lua gurus on WoWInterface.

Anyway, I've broken up my action bars into individual buttons rather than bars through the advanced Dominos function /dom numbuttons 120 and have created a rough draft for a new layout:

Through the built-in Dominos interface, you're able to use the Show States setting to hide or show your action bars (or individual buttons in this case) depending on which WoW conditionals you've set -- This is the same for any action bar add-on, but I'm providing as much information as I can.

I would like to take all of this a step further and I'd like to implement a delay for displaying the action bars/buttons after each of the conditionals are met so that the action bar buttons look to be animated. Here is a rough mock-up video I created to show the forward and reverse "animations" that I'm looking to implement:


I guess what I'm looking for is the ability to create Timer Groups and define which action bar buttons are assigned to each one. Each Timer Group could be set for Combat + X Seconds before it would fade in and display the action bar buttons assigned to it. Timer groups would then fade out, in reverse order, when the conditional was done being met.

What I'm not looking for is a pretty and elegant GUI solution and anything that needs to be hard-coded into the Lua is not a problem. Also, I understand that I will need to re-implement any and all changes that are made each time I upgrade or reinstall Dominos.

Here's some pseudo code to help define my idea (don't laugh):
-- Define Timer Groups (as per the image above)
Group 1 = 7,15,19
Group 2 = 4,5,6,8,9,10
Group 3 = 2,3,11,12,14,16,17,18
Group 4 = 1,13

If conditional = true then
  If Group 1 then
      display (maybe a fade in timer for smooth fade in)
  elseif Group 2 then
      wait 0.1s
      show (with fade in timer)
  else if Group 3 then
      wait 0.2s
      show (with fade in timer)
  elseif Group 4 then
      wait 0.3s
      show (with fade in timer)

Thanks for reading and thanks in advance if you're willing to give this a shot.
  Reply With Quote
11-25-13, 05:55 PM   #2
A Warpwood Thunder Caller
Tuller's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 91
Here's code I've not tested :P

Lua Code:
  1. local Dominos = _G['Dominos']
  2. local UIParent = _G['UIParent']
  4. local FrameGroups = {
  5.     {7, 15, 19},
  6.     {4, 5, 6, 8, 9, 10},
  7.     {2, 3, 11, 12, 14, 16, 17, 18},
  8.     {1, 13}
  9. }
  11. local f = CreateFrame('Frame', nil, UIParent)
  13. local ag = f:CreateAnimationGroup('SmoothAnimationTester')
  15. local ani_OnUpdate = function (self)
  16.     for i, frameId in pairs(self.frames) do
  17.         Dominos.Frame:Get(frameId):SetAlpha(self:GetProgress())
  18.     end
  19. end
  21. for i, frames in pairs(FrameGroups) do
  22.     local a = ag:CreateAnimation('Animation')
  24.     a.frames = frames
  25.     a:SetOrder(i)
  26.     a:SetDuration(1)
  27.     a:SetScript('OnUpdate', ani_OnUpdate)
  28.     a:SetStartDelay((i - 1) / 10)
  29. end
  32. --/run _G['SmoothAnimationTester']:Play()
  Reply With Quote
11-25-13, 08:02 PM   #3
A Warpwood Thunder Caller
Join Date: Jul 2011
Posts: 96
Very cool!

I tossed it into its own add-on (as per you guys on IRC) and it works... for the most part. It doesn't seem to be using the conditional that is set in Dominos and will only run if I use the /slash command you provided (conditional for the test was [combat]100;0). It also only runs forward, but not in reverse (I'm guessing because it's not using the conditional correctly?).

Here's the add-on in its current form if anyone wants to see it in action - Please don't link to offsite download locations. Please upload it to our beta category. Thank you. ~ Cairenn

Thanks, again.

Last edited by Cairenn : 11-25-13 at 09:02 PM.
  Reply With Quote
11-28-13, 10:15 PM   #4
A Warpwood Thunder Caller
Join Date: Jul 2011
Posts: 96
Is there anyone out there who is willing to expand on the code that Tuller was nice enough to supply? Having my action bars (buttons) stand out and be a bit different from most other UIs has been something I've really been looking forward to for quite some time.

  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » Dominos Modification

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off