moonspy
Junior Member
Registered: Oct 2009
From:
|
Found some info my self, but haven't discovered how to put everything together..
If I understand correctly I need to make maki code for the url opening part..
I try to keep everything simple..
player.xml file
<!-- Element definition -->
<elements>
<bitmap id="player.background" file="player/Sunset.jpg"
gammagroup="Backgrounds"/>
<bitmap id="player.button.previous" file="player/blue-previous.png"
gammagroup="Buttons"/>
<bitmap id="player.button.play" file="player/blue-play.png"
gammagroup="Buttons"/>
<bitmap id="player.button.pause" file="player/blue-pause.png"
gammagroup="Buttons"/>
<bitmap id="player.button.stop" file="player/blue-stop.png"
gammagroup="Buttons"/>
<bitmap id="player.button.next" file="player/blue-next.png"
gammagroup="Buttons"/>
<bitmap id="player.button.yourbutton" file="player/url.png"
gammagroup="Buttons"/>
</elements>
<!-- Playback Buttons Group Definition -->
<groupdef id="player.normal.playbuttons" name="Player buttons">
<button
id="Prev"
action="PREV"
x="25" y="0"
image="player.button.previous"
tooltip="Previous"
/>
<button
id="Next"
action="NEXT"
x="50" y="0"
image="player.button.next"
tooltip="Next"
/>
<button
id="Play"
action="PLAY"
x="0" y="25"
image="player.button.play"
tooltip="Play"
/>
<button
id="Pause"
action="PAUSE"
x="25" y="25"
image="player.button.pause"
tooltip="Pause"
/>
<button
id="Stop"
action="STOP"
x="50" y="25"
image="player.button.stop"
tooltip="Stop"
/>
<button
id="Yourbutton"
action="?????????"
x="100" y="100"
image="player.button.stop"
tooltip="Stop"
/>
</groupdef>
<!-- Song File Information and Visualization Group Definition -->
<groupdef id="player.normal" name="Winamp">
<text
id="timer"
display="time"
x="120" y="50"
w="30" h="20"
font="wasabi.font.default" fontsize="12"
timecolonwidth="7"
/>
<!-- Song File Information-->
<text
id="infoline" ticker="1"
display="songinfo" default=""
x="160" y="50"
w="200" h="20"
font="wasabi.font.default" fontsize="12" ghost="1"
/>
<!-- Visualization -->
<vis
id="vis"
x="160" y="12"
w="300" h="100"
/>
</groupdef>
<!-- Main Window: Container and Layout -->
<container id="main" name="Main Window" default_x="0" default_y="0" default_visible="1">
<layout id="normal" background="player.background">
<group id="player.normal" />
<group id="player.normal.playbuttons" x="12" y="12" />
</layout>
</container>
testi.M file
#include std.mi
Global Button yourbutton;
System.onScriptLoaded()
{
Layout mainLayout = getContainer("main").getLayout("normal");
yourbutton = mainLayout.getObject("your.button");
}
yourbutton.onLeftButtonUp(int x,int y)
{
system.navigateUrl("http://www.di.fm/..../...pls");
}
So from here can compile the testi.m to maki, but nothing hapens when i try the button..
I know that something is missing, but what and from where..
Do the button "action" indicates somehow that there is code behind it?
Any help is appreciated.. thanks
moonspy
Quick Link | Report this post to a moderator | IP: Logged
|