Thread Tools Display Modes
09-27-17, 02:59 AM   #1
Layback_
An Onyxian Warder
Join Date: Feb 2016
Posts: 358
Has anyone tried to set size and position of 'Skada' windows externally?

Hi all,

I guess this might be a bit inappropriate question to ask in 'this' forum as it is more like a specific addon related question.

But, I honestly had nowhere else to ask this since official forum for 'Skada' seems to be dead
(I made a comment on its project page tho...)


So, I am attempting to write a code which will alter 'Skada' windows' size and position externally and I tried something like this so far.

Lua Code:
  1. local skadaWindows = Skada:GetWindows();
  2.  
  3. for i = 1, #skadaWindows do
  4.     local barGroup = skadaWindows[i].bargroup;
  5.  
  6.     barGroup:SetSize(WIDTH, HEIGHT);
  7.  
  8.     if i == 1 then
  9.         barGroup:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT");
  10.     else
  11.         barGroup:SetPoint("LEFT", skadaWindows[i - 1].bargroup, "RIGHT");
  12.     end
  13. end

This would partially work, but also cause a taint where the bar size is not being re-sized with its parent, a window...
(well... tbh it can't be said a "taint" as what I've done here is to re-size the window, not a bar...)


↑ You see that the right end of bar is sticking out after re-sizing

I can't be sure, but Skada seems to utilize AceGUI to create its objects which I've never played with


Any helps, please?

Last edited by Layback_ : 09-27-17 at 05:56 AM.
  Reply With Quote
09-27-17, 10:11 AM   #2
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,871
I had an small addon back when that just moved/sized "SkadaBarWindowSkada". No idea if things have changed since.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
09-27-17, 04:44 PM   #3
Layback_
An Onyxian Warder
Join Date: Feb 2016
Posts: 358
Originally Posted by Fizzlemizz View Post
I had an small addon back when that just moved/sized "SkadaBarWindowSkada". No idea if things have changed since.
Hi Fizzlemizz,

So you mean that you have used :SetSize() and :SetPoint() functions for "SkadaBarWindowSkada"?

If so, that's same as what I have done here.

Skada:GetWindows() will return all the available windows and .bargroup accesses the frame that you've mentioned
  Reply With Quote
09-27-17, 05:54 PM   #4
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,871
My UI uses recount by default but the addon allowed people to subsitute it for Skada.

It just parented SkadaBarWindowSkada to one of my textures then ClearAllPoint() followed by two SetPoints for "TOPRIGHT" and "BOTTOMLEFT".

I'll DL Skada and make sure it still works (no-one has complained to date).

Edit: Downloaded, tested, threw in a SetSize() for good measure and it placed Skada where it should without any problem. Moved/resized Skada /ReloadUI and Skada is back where I placed it.

I do this in a function that is "delayed" after entering world until certain other frames have been created (none of them Skada related) so I don't know if that might be the difference.

After moving/sizing
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 09-27-17 at 07:35 PM.
  Reply With Quote
09-27-17, 08:15 PM   #5
Layback_
An Onyxian Warder
Join Date: Feb 2016
Posts: 358
Hi again Fizzlemizz,

I'm not sure if I'm seeing correctly, but if you zoom in, it seems like yours is also having the bar sticking out of the window.

mmmmmmmmm... dunno why the image is not being added on post...

I just made an attachment.
Attached Thumbnails
Click image for larger version

Name:	Cap 2017-09-28 12-11-21-184.png
Views:	178
Size:	66.0 KB
ID:	8988  
  Reply With Quote
09-27-17, 09:10 PM   #6
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,871
That maybe luck of the draw (the overlap being so small) and Skada doesn't like going of the edge of the screen.

After setting the position of SkadaBarWindowSkada, you might try :

Code:
local scr = SkadaBarWindowSkada.resizebutton:GetScript("OnMouseDown")
scr(SkadaBarWindowSkada.resizebutton, "LeftButton")
scr = SkadaBarWindowSkada.resizebutton:GetScript("OnMouseUp")
scr(SkadaBarWindowSkada.resizebutton, "LeftButton")
Edited for correct frame name.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 09-27-17 at 10:54 PM.
  Reply With Quote
09-27-17, 11:21 PM   #7
Layback_
An Onyxian Warder
Join Date: Feb 2016
Posts: 358
Originally Posted by Fizzlemizz View Post
That maybe luck of the draw (the overlap being so small) and Skada doesn't like going of the edge of the screen.

After setting the position of SkadaBarWindowSkada, you might try :

Code:
local scr = SkadaBarWindowSkada.resizebutton:GetScript("OnMouseDown")
scr(SkadaBarWindowSkada.resizebutton, "LeftButton")
scr = SkadaBarWindowSkada.resizebutton:GetScript("OnMouseUp")
scr(SkadaBarWindowSkada.resizebutton, "LeftButton")
Edited for correct frame name.
So that's like tricking a window that resizebutton has been clicked by forcibly calling a function?

That's genius

-- EDIT #1

Got it

Worked like a charm
Attached Thumbnails
Click image for larger version

Name:	Cap 2017-09-28 15-30-42-535.jpg
Views:	267
Size:	34.3 KB
ID:	8989  

Last edited by Layback_ : 09-27-17 at 11:34 PM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Has anyone tried to set size and position of 'Skada' windows externally?

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