Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   Modern Skins (http://forums.winamp.com/forumdisplay.php?f=123)
-   -   newbie question (http://forums.winamp.com/showthread.php?t=171217)

avatar_888 27th February 2004 13:59

newbie question
 
hey,

i'm modifying a modern skin and i want to add a double click action to the actual body of the skin itself but i can't work out how to - i can add add a dbl click action to one of the buttons but can't work out where to put the code to get events from the main body of the skin


thanks in advance

EdgeOfEpsilon 27th February 2004 16:02

Well for that you really need a MAKI script... something like...

code:

//Kickarse Dbl-click plugin

#include "../../std.mi";

Global Layer MainImg;

System.onScriptLoaded() {

Layer MainImg = getContainer("ID_of_player_window").getLayout("Normal").getObject("ID_of_image");

}

MainImg.onDblLeftClick() {

<Do whatever>

}

System.onScriptUnloading() {
delete MainImg;
}



More on MAKI scripting

What exactly do you want to do? New context menu? I'm always interested in Modern Skin mods, and I wonder if you could share your work (privately of course).

avatar_888 28th February 2004 13:10

thanks for the info, but it is a script file really nesecary? it just seems like a somewhat complicated way of doing something that i assumed would be very simple

all i'm trying to do is modify this skin so that it will minimize when the frame is double clicked

UUL 28th February 2004 16:11

well it is neccesary

hammerhead 28th February 2004 16:25

I don't think it's imperative :)

Try 'dblclickaction=""', I think that's it.

avatar_888 28th February 2004 16:32

hammerhead:

i tried that but i didnt know where to put it to operate on the frame of the skin... just as a test i put that code under the pause button and it worked fine to minimize the window but i couldnt get it working on a 'non-button'


i haven't got around to trying out the code that edgeofepsilon posted yet but i'll give that a go this evening hopefully


cheers for the help though guys

UUL 28th February 2004 16:34

that will only work on a button wouldn't it?

avatar_888 29th February 2004 11:32

ok i tried to compile the script above, but the compiler simply tells me that onDblLeftClick() is not a function of the layer class... any ideas?

UUL 29th February 2004 12:05

code:
extern GuiObject.onLeftButtonDblClk(int x, int y);

avatar_888 29th February 2004 13:50

ok i got the script compilling and included (although for now i've just set it to stop playback rather than minimize 'cause that wouldn't compile) but nothing happens... is there any way i can check if i've used the correct window/image id's?


All times are GMT. The time now is 06:44.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.