Thread Tools Display Modes
09-16-14, 03:30 AM   #1
BabyRay
An Aku'mai Servant
Join Date: Sep 2009
Posts: 39
KGPanels -> changing resolution

Hello,

after changing the resolution from 1680x1050 to 1920x1080 I had to adjust KGPanels. Worked well so far. Only I have the problem that is as can not move along the chat window and the panel. So I adjusted the size of the panel and then adjusted the chat window to the panel. After both now fit into each other, I want the whole now move pixels accurately. That does not work because it only shifts the panel. The only way is to move the two together via the chat window. What but not pixel is then accurately and on top of that a fiddly job.
Is there a better solution?
  Reply With Quote
09-16-14, 09:50 PM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Use these commands to move the frame exactly where you want it:

Code:
/run ChatFrame1:ClearAllPoints()
/run ChatFrame1:SetPoint("BOTTOMLEFT", UIParent, 100, 25)
/run ChatFrame1:SetUserPlaced(true)
/run ChatFrame1:SetSize(600, 200)
In the SetPoint command, the first number is the horizontal offset from the specified point, and the second is the vertical. Positive numbers move left/up, while negative numbers move right/down. In the SetSize command, the first number is the width, and the second is the height.

Then invoke the default UI's own function to save the position and size so they'll be loaded again in the future:

Code:
/run FCF_SavePositionAndDimensions(ChatFrame1)
If you want to see the currently saved position and size for reference:

Code:
/dump GetChatWindowSavedPosition(ChatFrame1)
/dump GetChatWindowSavedDimensions(ChatFrame1)
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
09-21-14, 02:15 AM   #3
BabyRay
An Aku'mai Servant
Join Date: Sep 2009
Posts: 39
Thank you Phanx.

I use this macro to get the name of my chatframe
Code:
/script DEFAULT_CHAT_FRAME:AddMessage(GetMouseFocus():GetName());
My Chatframe called "ChatFrame1Tab"


Code:
/dump GetChatWindowSavedPosition(ChatFrame1)
/dump GetChatWindowSavedDimensions(ChatFrame1)
I try´d your macro and changed the name of the chatframe too.
But everytime i only get this:

/dump value=GetChatWindowSavedPosition(ChatFrame1)
/dump value=GetChatWindowSavedDimensions(ChatFrame1)

i make something wrong i think
  Reply With Quote
09-22-14, 02:29 AM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by BabyRay View Post
My Chatframe called "ChatFrame1Tab"
No, it's not. That's the name of the tab attached to the chat frame. The chat frame itself is just "ChatFrame1".

Originally Posted by BabyRay View Post
I try´d your macro and changed the name of the chatframe too.
But everytime i only get this:
Upon further investigation, the two Get functions actually require just a number, not a name or reference.

Code:
/dump GetChatWindowSavedPosition(1)
/dump GetChatWindowSavedDimensions(1)
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
10-18-14, 04:44 PM   #5
BabyRay
An Aku'mai Servant
Join Date: Sep 2009
Posts: 39
hello,

after my break I am again placed at the interface and tried my luck with the macros.
Works well so far.

Here is the macro I use.



Code:
/run ChatFrame1:ClearAllPoints()
/run ChatFrame1:SetPoint("BOTTOMLEFT", UIParent, 52, 88)
/run ChatFrame1:SetUserPlaced(true)
/run ChatFrame1:SetSize(520, 135)
Code:
/run ChatFrame2:ClearAllPoints()
/run ChatFrame2:SetPoint("BOTTOMLEFT", UIParent, 52, 88)
/run ChatFrame2:SetUserPlaced(true)
/run ChatFrame2:SetSize(520, 135)
Code:
/run ChatFrame3:ClearAllPoints()
/run ChatFrame3:SetPoint("BOTTOMLEFT", UIParent, 52, 88)
/run ChatFrame3:SetUserPlaced(true)
/run ChatFrame3:SetSize(520, 135)
Code:
/run SkadaBarWindowRecount:ClearAllPoints()
/run SkadaBarWindowRecount:SetPoint("BOTTOMLEFT", UIParent, 15, 274)
/run SkadaBarWindowRecount:SetUserPlaced(true)
/run SkadaBarWindowRecount:SetSize(340, 180)
Code:
/run SkadaBarWindowOmen:ClearAllPoints()
/run SkadaBarWindowOmen:SetPoint("BOTTOMLEFT", UIParent, 1565, 275) <--- 1 px different to loot like the other Windows :D
/run SkadaBarWindowOmen:SetUserPlaced(true)
/run SkadaBarWindowOmen:SetSize(340, 180)

He seems not always to save. After login, I have to use the macros first. and sometimes after a loading screen.

Did I maybe a mistake somewhere in there?

/set synchronizesettings 1

in the config.ini
  Reply With Quote
10-19-14, 08:32 PM   #6
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
You're forgetting the part that tells the game to save the size/position for the future:

Code:
/run FCF_SavePositionAndDimensions(ChatFrame1)
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
10-20-14, 02:37 AM   #7
BabyRay
An Aku'mai Servant
Join Date: Sep 2009
Posts: 39
Code:
/run FCF_SavePositionAndDimensions(ChatFrame1)
/run FCF_SavePositionAndDimensions(ChatFrame2)
/run FCF_SavePositionAndDimensions(ChatFrame3)
/run FCF_SavePositionAndDimensions(SkadaBarWindowRecount)
/run FCF_SavePositionAndDimensions(SkadaBarWindowOmen)
Is it right to do this for every single Window?

Chat1 <- Main ChatFrame
Chat2 <- Combatlog
Chat3 <- Second ChatFrame
Skada... <- for my Skada Frames
  Reply With Quote
10-20-14, 03:53 AM   #8
Talyrius
An Onyxian Warder
 
Talyrius's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 363
Originally Posted by BabyRay View Post
Is it right to do this for every single Window?
No, just chat frames.
  Reply With Quote
10-20-14, 04:22 AM   #9
BabyRay
An Aku'mai Servant
Join Date: Sep 2009
Posts: 39
OK i have to use it for every single charakter, right?

Now i only have the problem with Skada.
I login and its on the wrong position again.
but only some px
Attached Thumbnails
Click image for larger version

Name:	Skada.jpg
Views:	212
Size:	268.0 KB
ID:	8256  
  Reply With Quote
10-20-14, 07:03 AM   #10
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by BabyRay View Post
Now i only have the problem with Skada.
I login and its on the wrong position again.
The simplest solution would be to find where Skada saves that information in its saved variables, and just set those values, with something like the following non-working example code:

Code:
/run Skada.db.profile.framePoint = "TOPLEFT"
/run Skada.db.profile.frameX = 800
/run Skada.db.profile.frameY = 200
Look in Skada's code to see where it sets these values (probably in an OnDragStop script for the window) to find the actual key paths.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
11-04-14, 04:23 PM   #11
BabyRay
An Aku'mai Servant
Join Date: Sep 2009
Posts: 39
Sorry Guys but i need your help again.

I try´d to find out where Skada save the Position but maybe i´m to stupid.
I cant find the right thing.

Every login i´ve to use this macros

Code:
/run SkadaBarWindowRecount:ClearAllPoints()
/run SkadaBarWindowRecount:SetPoint("BOTTOMLEFT", UIParent, 15, 272)
/run SkadaBarWindowRecount:SetUserPlaced(true)
/run SkadaBarWindowRecount:SetSize(340, 180)
Code:
/run SkadaBarWindowOmen:ClearAllPoints()
/run SkadaBarWindowOmen:SetPoint("BOTTOMLEFT", UIParent, 1565, 272)
/run SkadaBarWindowOmen:SetUserPlaced(true)
/run SkadaBarWindowOmen:SetSize(340, 180)
Because Skada move every Login/reload.

Is there any option to save ALL info on blizz server and not on my pc?
chat, buttons , positions and so an?
  Reply With Quote
11-04-14, 09:17 PM   #12
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
There is no way to save addon data -- including the positions of addon frames -- on the server. You could write an addon to copy certain addon data into macros (which are saved on the server) and then restore that data when you log in and your macros are loaded, but you wouldn't be able to store much data that way since macros can only hold 255 characters, and if you're already copying the addon to handle that between computers, you might as well just copy your settings file(s) between computers instead.

Your macros don't save the position and size of between sessions because you're just moving and resizing the frame -- you're not telling Skada to update its record of where to place the frame and how big to make it, so the next time when you log in and Skada creates the frame again, it places and sizes it based on its own record, because it doesn't know you wanted anything else.

You should look in the Skada code to see what code it runs when you move/resize the frame. Or just manually move and resize the frame to the approximate place and size you want, and then edit the addon's saved variables file to make it "pixel perfect" if you want.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » KGPanels -> changing resolution

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