Old 20th June 2002, 19:44   #1
DJGrenola
Registered User
 
DJGrenola's Avatar
 
Join Date: May 2002
Location: Can't remember
Posts: 268
#477 and resize()

Anybody else had any problems with these two ? Can't seem to use resize() to move an object for love nor money, not that I have either.

DJG
DJGrenola is offline   Reply With Quote
Old 20th June 2002, 20:15   #2
Naamloos
Forum King
 
Naamloos's Avatar
 
Join Date: Mar 2001
Location: irc.tehflap.org/*******
Posts: 3,085
code:

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

Global Layout mainnormal;
Global Int Width, Height;

System.onScriptLoaded() {

Layout mainnormal = getContainer("Main").getLayout("Normal");
Width = System.getViewportWidth();
Height = System.getViewportHeight();

mainnormal.resize(0, 0, Width, Height);

}


works for me in builds 477 and 478
Naamloos is offline   Reply With Quote
Old 20th June 2002, 20:21   #3
DJGrenola
Registered User
 
DJGrenola's Avatar
 
Join Date: May 2002
Location: Can't remember
Posts: 268
I must be cursed, I never seem to be able to get stuff to work that other people have no problem with =)

Do you have a link for #478, I can't seem to find it ?

Cheers,

DJG
DJGrenola is offline   Reply With Quote
Old 20th June 2002, 20:45   #4
cmisker
Major Dude
 
cmisker's Avatar
 
Join Date: Nov 2001
Location: Emmen, The Netherlands
Posts: 681
Send a message via ICQ to cmisker Send a message via AIM to cmisker Send a message via Yahoo to cmisker
Look at the sticky in the WA3 Discussion forum.

Wanna see my Winamp 3?
cmisker is offline   Reply With Quote
Old 21st June 2002, 00:50   #5
DJGrenola
Registered User
 
DJGrenola's Avatar
 
Join Date: May 2002
Location: Can't remember
Posts: 268
Thanks for that.

I've made a couple of skins to demonstrate the problem I'm having. The attached .zip contains two skins, layertest466.wal and layertest478.wal (which will probably work with 477 as well, not tested it). As you should see, the build 466 skin works as expected (just move the mouse over the 'g' logo), whereas the #478 one does not.

The files used to create the skins are also in the zipfile, inside the content directory. Neither the skin or the MAKI is doing anything particularly complicated. I've reproduced them here:

code:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<WinampAbstractionLayer version="0.8">

<skininfo>
<name>Curved Slider demo 1</name>
</skininfo>

<!-- beta 3 includes -->
<!-- <include file="../default/xml/studio.xml"/>
<include file="../default/xml/eq.xml"/>
<include file="../default/xml/thinger.xml"/>
<include file="../default/xml/minibrowser.xml"/>
<include file="../default/xml/components.xml"/>
<include file="../default/xml/gamma-presets.xml"/> -->

<!-- #477/478 includes -->
<include file="../default/system/skin.xml"/>
<include file="../default/xml/eq.xml"/>
<include file="../default/xml/thinger.xml"/>
<include file="../default/xml/pledit.xml"/>
<include file="../default/xml/video.xml"/>
<include file="../default/xml/color-presets.xml"/>

<elements>

<!-- bitmaps -->
<bitmap id="bg" file="bg.png"/>
<bitmap id="knob" file="knob.png"/>

</elements>

<container id="main" name="layerdemo1" default_x="0" default_y="0" default_visible="1">
<layout id="normal" background="bg">

<button id="testlayer" image="knob" downimage="knob" action=""/>

</layout>
</container>

<script file="maki.maki" id="scriptage"/>

</WinampAbstractionLayer>



and the MAKI (simplicity itself):
code:

//#include "d:\Program Files\winamp3\lib\std.mi"
#include "d:\Program Files\winamp3_478\lib\std.mi"

Global GuiObject go;

System.onScriptLoaded () {
messageBox ("script started", "", 0, "");
go = System.getContainer("main").getLayout("normal").getObject("testlayer");
}

System.onScriptUnloading() {}

go.onMouseMove (int x, int y) {
go.resize (x - go.getWidth() / 2,y - go.getWidth() / 2,go.getWidth(),go.getHeight());
}



The two are identical apart from the <include> and #include blocks which change for the two platforms. (you can also change the winampAbstractionLayer version if you're feeling picky.)

Now then, can anybody tell me what's going on here ? I'd be eternally grateful if someone could.

Thanks in advance,

DJG
Attached Files
File Type: zip wa3skin.zip (7.0 KB, 81 views)
DJGrenola 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