Old 3rd March 2007, 23:28   #1
Schmeet
Major Dude
 
Schmeet's Avatar
 
Join Date: Oct 2004
Location: The timid west
Posts: 1,444
Two images for the same button

Hey guys.

Just wondering if this is at all possible:

I have a button made up of a background and a glow effect for the symbol. Is it possible to have the glow symbol on top of the background and have them both do the same action?

If that is, then can it be taken further to have them change when pressed?

I'm wondering because when I come to do the colour themes I want the glow to change colour and not the background for the button, but when the button is pressed for it to look like it's gone inwards.
Schmeet is offline   Reply With Quote
Old 4th March 2007, 02:03   #2
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
It is certainly possible, how much maki do you know?

It is possible to have the glow button as just a layer, using the 'ghost' property (ie when you click it the click is passed on to whatever object is beneath it). Then whenever the button below is clicked, the layer is moved down (and up again when the button is released).

does not sound like something that will take too long or be too complicated, i could possibly knock it together for you tomorrow if you want.
hammerhead is offline   Reply With Quote
Old 4th March 2007, 11:51   #3
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
Re: Two images for the same button

PHP Code:

#include "../../../lib/std.mi"

Global Button b;
Global 
Layer l;

Global 
String lImageUplImageDown;

System.OnScriptLoaded()
{
    
string param GetParam(); //comma delimited - ButtonID,LayerID,LayerDownBitmapID

    
GetScriptGroup().FindObject(GetToken(param","1));
    
GetScriptGroup().FindObject(GetToken(param","2));

    
lImageUp l.GetXmlParam("image");
    
lImageDown GetToken(param","3);
}

b.OnLeftButtonDown(int xint y)
{
    
l.SetXmlParam("image"lImageDown);
}

b.OnLeftButtonUp(int xint y)
{
    
l.SetXmlParam("image"lImageUp);

this should work. use it like this:

<script file="scripts/scriptname.maki" param="NameOfButton,NameOfLayer,IdOfBitmapForLayerDown" />

place it just under the button and layer in the same group.
hammerhead is offline   Reply With Quote
Old 4th March 2007, 22:48   #4
Schmeet
Major Dude
 
Schmeet's Avatar
 
Join Date: Oct 2004
Location: The timid west
Posts: 1,444
Thanks a lot. I not going to be able to test it until tomorrow but i definately appreciate your time.

Cheers.
Schmeet 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