Old 16th January 2003, 16:20   #1
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
Resize Button

Hi everyone,
Is it possible to have a button that resizes the skin back to 100%? And if it is, how would I go about doing so? (when I mean resizing, I mean the stretch resizing, not the component window resizing).
Thanks,
Hammerhead
hammerhead is offline   Reply With Quote
Old 16th January 2003, 20:56   #2
J_Bloggs
Major Dude
 
J_Bloggs's Avatar
 
Join Date: Jan 2002
Posts: 1,778
found this in the std.mi:

/**
resize()

Resize the object to the desired size and position.

@param x The X position where to anchor the object before resize.
@param y The Y position where to anchor the object before resize.
@param w The width you wish the object to have.
@param h The height you wish the object to have.
*/
extern GuiObject.resize(int x, int y, int w, int h);


Don't know if that helps.

¯¯¯¯Joe Bloggs____
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
J_Bloggs is offline   Reply With Quote
Old 16th January 2003, 22:09   #3
Gonzotek
Gunslinger
 
Gonzotek's Avatar
 
Join Date: May 2000
Location: Terminus
Posts: 4,693
It's called scale.

extern Layout.onScale(Double newscalevalue);
extern Double Layout.getScale();
extern Layout.setScale(Double scalevalue);

-=Gonzotek=-

I was away for a while.
But I'm feeling much better now.
Gonzotek is offline   Reply With Quote
Old 17th January 2003, 16:06   #4
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
extern Layout.setScale(Double scalevalue);

Would I fill that with 100 for 100%?
Thanks,
hammerhead
hammerhead is offline   Reply With Quote
Old 17th January 2003, 16:16   #5
Gonzotek
Gunslinger
 
Gonzotek's Avatar
 
Join Date: May 2000
Location: Terminus
Posts: 4,693
No, 1.0 for 100%, 2.0 for 200%, 0.5 for 50%, etc.

-=Gonzotek=-

I was away for a while.
But I'm feeling much better now.
Gonzotek is offline   Reply With Quote
Old 17th January 2003, 16:39   #6
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
k thx. I'll give it a try
hammerhead is offline   Reply With Quote
Old 18th January 2003, 11:47   #7
J_Bloggs
Major Dude
 
J_Bloggs's Avatar
 
Join Date: Jan 2002
Posts: 1,778
Quote:
Originally posted by Gonzotek
No, 1.0 for 100%, 2.0 for 200%, 0.5 for 50%, etc.

-=Gonzotek=-
Would it be possible to be more specific than that, say 0.823 or something?

¯¯¯¯Joe Bloggs____
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
J_Bloggs is offline   Reply With Quote
Old 18th January 2003, 12:03   #8
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
experiment with it. anyway, why so exact?
hammerhead is offline   Reply With Quote
Old 18th January 2003, 12:07   #9
J_Bloggs
Major Dude
 
J_Bloggs's Avatar
 
Join Date: Jan 2002
Posts: 1,778
just wondering if it's possible. It's interesting, I'll experiment later but right now it's 2 in the morning.

¯¯¯¯Joe Bloggs____
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
J_Bloggs is offline   Reply With Quote
Old 18th January 2003, 12:42   #10
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
Exclamation Resize to Full

Heres my rendition of a script to resize to 100%.



quote:
--------------------------------------------------------------------------------
//--------------------------------------------------------------------
//Resize2Full.m
//
// A small script to resize a layout to its full 100%.
//
// Thanks to Gonzotek for giving some maki resize code for this.
// created by Hammerhead aka Kabir Chanrai
//--------------------------------------------------------------------
// USING THIS SCRIPT:
//********************************************************************
// 1.Make sure your container which contains the layout is called 'main',
// and the layout 'normal'. If they are not, change them, or redefine
// them in the .m .
//
// 2.Define the following in your XML layout Normal:
// <button
// id="player.main.resizetofull"
// image="player.resize2full"
// downimage="player.resize2full.down"
// x="?" y="?"
// />
// 3. Copy this script (and Resize2Full.maki) to your scripts folder.
// 4. If you don't have Resize2Full.maki, compile this script.
// 5. Add this line to your script.xml, or anywhere outside the main
// container:
//
// <script id="resize2full" file="scripts/Resize2Full.maki"/>
//
//6. Refresh your skin(F5) and try it out.
//********************************************************************
--------------------------------------------------------------------------------

Have fun!
Hammerhead

PS- JBloggs, no need to experiment, I tried it already. It works.
Attached Files
File Type: zip resize2full.zip (1.8 KB, 80 views)
hammerhead 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