Thread Tools Display Modes
07-13-17, 06:23 AM   #1
Layback_
An Onyxian Warder
Join Date: Feb 2016
Posts: 358
Have anyone tried to externally set size or point of windows created by "Details!"?

Hi all,

Title says pretty much all.

I'm currently trying to externally set size and position of windows created by "Details!".

AFAIK, Details, thankfully, offers plenty of APIs for developers to deal with. However, I could have not found an API that fulfills my need.

Thus, I have tried to modify its SV externally and also attempted to forcibly ClearAllPoints(), SetPoint() and SetSize() (externally as well), but didn't work out

I'm pretty sure there must be a way to solve this since those windows are also frames.

Could I get some help?

Thank you!


*EDIT: Seems like I figured out for sizing.

Each Details' window object has SetSize function embedded, but not for positioning

Lua Code:
  1. local window = Details:GetInstance(1);
  2. window:SetSize(x, y);

However, it would mess up those built in sticky window feature if I set size this way.

Last edited by Layback_ : 07-13-17 at 07:37 AM.
  Reply With Quote
07-13-17, 02:34 PM   #2
niffboy
Premium Member
Premium Member
Join Date: Mar 2010
Posts: 6
I don't code, and my reply is probably not what you're looking for, but the addonskins addon from here:

http://www.tukui.org/addons/index.php?act=view&id=128

sets the windows of Details! perfectly. Maybe you can see how they do it or ask the addon author for help.
  Reply With Quote
07-13-17, 06:25 PM   #3
Layback_
An Onyxian Warder
Join Date: Feb 2016
Posts: 358
Originally Posted by niffboy View Post
I don't code, and my reply is probably not what you're looking for, but the addonskins addon from here:

http://www.tukui.org/addons/index.php?act=view&id=128

sets the windows of Details! perfectly. Maybe you can see how they do it or ask the addon author for help.
Hi niffboy,

Yeah, I've also seen AddonSkins addon to see if that could solve my concern, but unfortunately it didn't.

Thank you for your reply, anyways!
  Reply With Quote
07-14-17, 10:01 PM   #4
aallkkaa
A Warpwood Thunder Caller
 
aallkkaa's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2017
Posts: 98
I use :ClearAllPoints() and :SetPoint(...) in a personal addon of mine (not published) successfully with Details! windows.

But I use a different method to acquire the Details! window frame object. Here's the snippet for it:
lua Code:
  1. -- Look for Details! frames and use the first one available
  2. local AlkaT_TPAMeter_testFrame, i = nil, 1;
  3. repeat
  4.     AlkaT_TPAMeter_testFrame = _G["Details_WindowFrame"..i];
  5.     i = i + 1;
  6. until AlkaT_TPAMeter_testFrame or i == 8;
  7. AlkaTCore_Modules.TPAMeters.Meter_testFrame = AlkaT_TPAMeter_testFrame;
  8. AlkaTCore_Modules.TPAMeters.Meter_frame = _G["DetailsBaseFrame"..i-1];
Do note I use _G["Details_WindowFrame"..i] to look for the frame but then I store _G["DetailsBaseFrame"..i-1] for later handling!
  Reply With Quote
07-15-17, 03:11 AM   #5
Layback_
An Onyxian Warder
Join Date: Feb 2016
Posts: 358
Originally Posted by aallkkaa View Post
I use :ClearAllPoints() and :SetPoint(...) in a personal addon of mine (not published) successfully with Details! windows.

But I use a different method to acquire the Details! window frame object. Here's the snippet for it:
lua Code:
  1. -- Look for Details! frames and use the first one available
  2. local AlkaT_TPAMeter_testFrame, i = nil, 1;
  3. repeat
  4.     AlkaT_TPAMeter_testFrame = _G["Details_WindowFrame"..i];
  5.     i = i + 1;
  6. until AlkaT_TPAMeter_testFrame or i == 8;
  7. AlkaTCore_Modules.TPAMeters.Meter_testFrame = AlkaT_TPAMeter_testFrame;
  8. AlkaTCore_Modules.TPAMeters.Meter_frame = _G["DetailsBaseFrame"..i-1];
Do note I use _G["Details_WindowFrame"..i] to look for the frame but then I store _G["DetailsBaseFrame"..i-1] for later handling!
Hi aallkkaa,

Your approach seems interesting

I'll have it a shot, now and see how I go with it

Thank you!!

Last edited by Layback_ : 07-15-17 at 03:23 AM.
  Reply With Quote
07-15-17, 05:51 AM   #6
Layback_
An Onyxian Warder
Join Date: Feb 2016
Posts: 358
Originally Posted by Layback_ View Post
Hi aallkkaa,

Your approach seems interesting

I'll have it a shot, now and see how I go with it

Thank you!!
It worked

According to Details' API, :GetInstance(i) should return a window object, so I thought it would definitely be a frame widget, but it was in fact a plain Lua table. Thus I tried to find a frame within that table which I couldn't

Last edited by Layback_ : 07-15-17 at 05:55 AM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Have anyone tried to externally set size or point of windows created by "Details!"?


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