Thread Tools Display Modes
05-26-10, 11:45 PM   #1
Ferous
Sheer Sense of Doom
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 863
SetScale

Hello there! I am here to bug you all again! Mwahahhahahah! Welll.. I wouldn't make a new thread if I didn't need help and I need help if it is available at all.

I have this script below:

Code:
SLASH_MYSCRIPT1 = "/scale";
SlashCmdList["MYSCRIPT"] = function(cmd)
	Minimap:SetScale(tonumber(cmd))
	Minimap:SetResizable(true)
end
And it allows my minimap to be scaled ingame, however it ain't saving the scale after logout or reload and I assumed that the script

Code:
Minimap:SetResizable(true)
Made it to where it saves the size much like:

Code:
Minimap:SetUserPlaced(true)
And was curious why it ain't saving?

Any help is appreciated and thank you for your time!
  Reply With Quote
05-27-10, 12:16 AM   #2
Freebaser
A Molten Kobold Bandit
 
Freebaser's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 135
Minimap:SetResizable(true) isn't doing anything if its inside that slash cmd when the ui is loading.
  Reply With Quote
05-27-10, 12:52 AM   #3
Ferous
Sheer Sense of Doom
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 863
yeah I took it out :P But it still ain't saving.. I am still playing with it :P My brain hurts >.>

here is everything if anyone is curious.

http://pastie.org/979464

Maybe I messed up somewhere.. I wish I could see it :P

Last edited by Ferous : 05-27-10 at 12:58 AM.
  Reply With Quote
05-27-10, 12:54 AM   #4
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,936
When you say it isn't saving are you checking the WTF file to see if it is physically saving and not using what was saved or is it actually not saving to the file ?
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
  Reply With Quote
05-27-10, 12:59 AM   #5
Ferous
Sheer Sense of Doom
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 863
Originally Posted by Xrystal View Post
When you say it isn't saving are you checking the WTF file to see if it is physically saving and not using what was saved or is it actually not saving to the file ?
It's not saving the minimap scale between loading of screen or log out, player login, etc.

Do I have to used saved variables for that? >.>

I'm thinking I do, but if I really do have to use saved variables, is there a reference anywhere that could possibly help me out adding saved variables? I've been looking at past threads, but some are very old and I don't know if that is a good reference or not.
  Reply With Quote
05-27-10, 01:16 AM   #6
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,936
I'm not sure if blizzard saves scaling settings in its auto save files.

I know it stores the position and sizing although not always the position and size you were planning on rofl. The blizzard cvars and saved variables are loaded with VARIABLES_LOADED or rather that event is triggered once they have finished their stuff rofl.

You could use that to see if frame:GetScale() returns what you initially used frame:SetScale() with. That would the first step to see if it ignores the scaling you did or if it deals with it but does something different rofl.

As to using your own SavedVariables. wowwiki is a good resource for that. This page may help you figure that stuff out if it works out that you need to use it : http://www.wowwiki.com/Saving_variab..._game_sessions

Also, on a side note, from what I found out while playing with the watch frame positioning and sizing etc there is a file called layout-local.txt in your characters wtf folder that seems to be where they store the individual layout of some but not all frames.

Ah, here it is. The frame layouts stored there seem to be done if you use the function http://www.wowwiki.com/API_Frame_SetUserPlaced and there are a few key conditions that you might want to see if that could be why it doesn't work for you.

However, like I said, I doubt that it stores the scaling. Here is an example of one of the frames for one of my characters:

Frame: MinimapCluster
FrameLevel: 6
Anchor: BOTTOM
X: -6
Y: 30
W: 192
H: 192

A quick search for scale and a scan for anything that could mean scale found nothing in the file.

So worst case scenario you will need to store and restore the scaling.
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » SetScale


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