Old 22nd July 2002, 06:30   #1
AndrewMackowski
Member
 
Join Date: Mar 2002
Posts: 92
Getting/Setting Prefs in MAKI

I'm trying to make a script that reads the preferences when the skin's loaded, and finds out whether "Always on Top" and "Doublesize Mode" are enabled. How do I read the preferences?

P.S. I tried doing it the way that "Shuffle", "Rep", and "Xfade" are read from the prefs in the baseskin, but mine didn't work.
AndrewMackowski is offline   Reply With Quote
Old 23rd July 2002, 01:37   #2
Plague
f(caffeine){
return wasabi;
}
(Forum King)
 
Plague's Avatar
 
Join Date: Jul 2001
Location: Sweden
Posts: 3,984
code:

// Set buttons status
ConfigItem item;
item = Config.getItem("Playlist editor");
if (item != NULL) {
attr_repeat = item.getAttribute("repeat");
attr_shuffle = item.getAttribute("shuffle");
}
item = Config.getItem("Audio options");
if (item != NULL) {
attr_crossfade = item.getAttribute("Enable crossfading");
}
item = Config.getItem("Options");
if (item != NULL) {
attr_aot = item.getAttribute("Always on top");
}

Boolean XFade = StringToInteger(attr_crossfade.getData());
Boolean Shuffle = StringToInteger(attr_shuffle.getData());
Boolean Repeat = StringToInteger(attr_repeat.getData());
Boolean AOT = StringToInteger(attr_aot.getData());



is this what you wanted?

-Plague
Plague is offline   Reply With Quote
Old 23rd July 2002, 03:49   #3
AndrewMackowski
Member
 
Join Date: Mar 2002
Posts: 92
well, before I made this post, I looked at that part of "sysfunc.m", and I copied it and adjusted it to try to get it to work for Doublesize and Always-on-Top, but it didn't work...
AndrewMackowski is offline   Reply With Quote
Old 23rd July 2002, 18:51   #4
Plague
f(caffeine){
return wasabi;
}
(Forum King)
 
Plague's Avatar
 
Join Date: Jul 2001
Location: Sweden
Posts: 3,984
well, you have always on top in the above code and I can assure you it's working..

for double size, why not just check the size of the window(s)?

edit:
oh, and the above code is NOT from sysfunc.m
it's from the wa2 - wa3 converter template and it's been altered already, adding always on top..
It does work, coz I'm using it myself..

-Plague
Plague is offline   Reply With Quote
Old 24th July 2002, 03:11   #5
AndrewMackowski
Member
 
Join Date: Mar 2002
Posts: 92
alright thanks Plague. I must have misread ur code the first time I looked at it

btw/, how do you find out what the section/attribute is called? like how do you know it's "Options" and "Always on top"--there's no "OPtions" section in my Studio.xnf

Last edited by AndrewMackowski; 24th July 2002 at 03:26.
AndrewMackowski is offline   Reply With Quote
Old 24th July 2002, 16:28   #6
spleen
Senior Member
 
spleen's Avatar
 
Join Date: Feb 2002
Location: Split, Croatia
Posts: 180
Send a message via ICQ to spleen
Quote:
btw/, how do you find out what the section/attribute is called? like how do you know it's "Options" and "Always on top"--there's no "OPtions" section in my Studio.xnf
Use "Configurification Registry" to find out that IDs.
AFAIK, Preferences' IDs don't work (yet).
spleen is offline   Reply With Quote
Old 24th July 2002, 18:01   #7
Plague
f(caffeine){
return wasabi;
}
(Forum King)
 
Plague's Avatar
 
Join Date: Jul 2001
Location: Sweden
Posts: 3,984
hmm, yeah.. Thats why doublesize wont work yet like that..
coz configurification registry doesnt have doublesize option yet..

-Plague
Plague is offline   Reply With Quote
Old 25th July 2002, 04:28   #8
AndrewMackowski
Member
 
Join Date: Mar 2002
Posts: 92
how do I get to "Configurification Registry"?
AndrewMackowski is offline   Reply With Quote
Old 25th July 2002, 04:42   #9
Plague
f(caffeine){
return wasabi;
}
(Forum King)
 
Plague's Avatar
 
Join Date: Jul 2001
Location: Sweden
Posts: 3,984
it's in the "windows" submenu...

-Plague
Plague is offline   Reply With Quote
Old 26th July 2002, 05:12   #10
AndrewMackowski
Member
 
Join Date: Mar 2002
Posts: 92
ahhh I didn't have the latest build of WA3. Now that I have it, what's the difference between "Configurification" and "Preferences"? Is Configurification just a developer's tool that will be removed in the final release?


Btw/, I did figure out how to do a "Double Size" toggle button:
code:
<togglebutton
ACTION="doublesize"
id="more.2x" rectrgn="1"
x="256" y="76"
image="main.more.2x"
downImage="main.more.2x.pressed"
activeImage="main.more.2x.pressed"
tooltip="Double Size"
/>



I found out this while looking in "Locales\English.xml"...look at each keyboard shortcut's "accelerator"--you'll find many actions that aren't listed in any tutorial...including "toggle_always_on_top" and "preferences"...damn I wish I had seen this earlier...
AndrewMackowski is offline   Reply With Quote
Old 26th July 2002, 16:12   #11
Plague
f(caffeine){
return wasabi;
}
(Forum King)
 
Plague's Avatar
 
Join Date: Jul 2001
Location: Sweden
Posts: 3,984
yeah thats the way to do doublesize from XML, I thought you wanted to do it from Maki...

-Plague
Plague is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Skinning and Design > Modern Skins

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

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

Forum Jump