快速登录:  

Forum: VirtualDJ Skins

话题: Button Showing Number Of Beats To Next Cue

由于该帖子已年深日久,可能包含陈旧过时或描述错误的信息。

I'm trying to modify a skin and change what is displayed on Hot Cue 1 button. I've got the basics sorted but I want it to show a beat countdown to Hot Cue 2, which I got working but it continues to count after Hot Cue 2 has passed. I'd rather it stop or remove counter. I've tried this:

<text size="15" format="`%Btocue2 > 0 ? 1\n%Btocue2 : 1`"/>

In theory that should work if you can query %Btocue2. All I get is a blank button. Any ideas and thanks in advance....
 

发表时间 Thu 11 Jun 15 @ 7:57 am
 

发表时间 Thu 11 Jun 15 @ 8:13 am
Actually, I'm having a mare.... Trying to modify the appearance of the Hot Cue button (show beats to next cue) depending on whether the next Hot Cue Position has been reached. I know it's the query that isn't working:

<button class="sidebutton" x="+6" y="+37" action="hot_cue 1" rightclick="holding 2000ms ? delete_cue 1 : goto_cue 1"><text size="15" action="var_greater '%Btocue2' 0 ? get_text '1' : get_text '1\n%Btocue2'"/></button>

Can any body save my sanity?
 

发表时间 Sun 14 Jun 15 @ 10:02 am
Try something like this:

<button class="sidebutton" x="+6" y="+37" action="hot_cue 1" rightclick="holding 2000ms ? delete_cue 1 : goto_cue 1">
...
</button>

<textzone visibility="get_text '%PBfromcue1' & param_cast 'integer' & param_bigger 0 ? true : false">
....
<text size="15" format="'%Btcue2'"/>
</textzone>

So the text zone will only show up if %Pfromcue1 >0

Hope this helps ;o)
 

发表时间 Sun 14 Jun 15 @ 11:54 am
Thanks for the advice.... Just to make 100% sure I understand the syntax.... The button element is closed before the textzone element is created and therefore the whole line would look like this:

<button class="sidebutton" x="+6" y="+37" action="hot_cue 1" rightclick="holding 2000ms ? delete_cue 1 : goto_cue 1"></button><textzone visibility="get_text '%PBfromcue1' & param_cast 'integer' & param_bigger 0 ? true : false"><text size="15" format="'%Btcue2'"/></textzone>
 

发表时间 Sun 14 Jun 15 @ 12:21 pm
I prefer two elements. If you will place it in one element:
<button class="sidebutton" action="hot_cue 1" rightclick="holding 2000ms ? delete_cue 1 : goto_cue 1">
<pos x="+6" y="+37" />
<text visibility="get_text '%PBfromcue1' & param_cast 'integer' & param_bigger 0 ? true : false" size="15" format="'%Btcue2'"/>
</button>

should work.
skin-wiki:
http://www.virtualdj.com/wiki/SkinSDK8.html
 

发表时间 Sun 14 Jun 15 @ 1:56 pm
Thanks...

Must have read the wiki like 20 times and slowly starting to get to grips with it :-)
 

发表时间 Sun 14 Jun 15 @ 2:10 pm
What skin do you want to modify?
 

发表时间 Sun 14 Jun 15 @ 2:28 pm
I'm playing around with V8 by Fruit... It has almost everything I want, but just want to tweak a couple of things.
 

发表时间 Sun 14 Jun 15 @ 2:59 pm
One thing I'm struggling to get my head around is that if the <textzone> element is not contained withing the button element, how does VDJ knows which button to print the text on? Is it just the last defined element?
 

发表时间 Mon 15 Jun 15 @ 2:48 am
So I tried this today and it didn't work. I just got the normal display all of the time i.e. beat counter. ??
 

发表时间 Mon 15 Jun 15 @ 8:18 am
fatalfunk wrote :
One thing I'm struggling to get my head around is that if the <textzone> element is not contained withing the button element, how does VDJ knows which button to print the text on? Is it just the last defined element?

It doesn't.
A textzone prints a text where you tell it to print by it's <pos /> coordintes.
You can print on top of ANY element you may think off since Version 8 just layers the graphics one above each other.
In other words a <textzone /> doesn't need to be contained in anything.
 

发表时间 Mon 15 Jun 15 @ 8:47 am
Ah, what I thought. Thanks for the info.
 

发表时间 Mon 15 Jun 15 @ 9:48 am


(陈旧帖子或论坛版块会自动关闭)