Quick Sign In:  

Forum: VirtualDJ Plugins

Topic: SBDJ Battery Status - Page: 2

Dieser Teil des Themas ist veraltet und kann veraltete oder falsche Informationen enthalten

Think I'll add this to my skin, I'm guessing if the percentage wont transfer to a textzone, it wont transfer to a bar meter either?
Perhaps I could create a low, medium and high to create the appearance of a bar meter?
 

geposted Sun 31 Oct 10 @ 2:19 am
99% sure you can't use a variable in a textzone- at the moment anyway.

Would be good if we could ina future release!!
 

geposted Sun 31 Oct 10 @ 2:23 am
SupaconPRO InfinityMember since 2005
Halo, this is a cumbersome, terrible hack, but this should work as a demo 10-pixel high bar meter that shows an increment for each pixel. It should be obvious how to extend this. I haven't tested this code, but here it is:


--Battery Indicator Bar Meter
<button action="var_greater $battery_percent 90 ? on : off">
<size width="10" height="1"/>
<pos x="10" y="1"/>
<selected x="+0" y="+1000"/>
</button>
<button action="var_greater $battery_percent 80 ? on : off">
<size width="10" height="1"/>
<pos x="10" y="2"/>
<selected x="+0" y="+1000"/>
</button>
<button action="var_greater $battery_percent 70 ? on : off">
<size width="10" height="1"/>
<pos x="10" y="3"/>
<selected x="+0" y="+1000"/>
</button>
<button action="var_greater $battery_percent 60 ? on : off">
<size width="10" height="1"/>
<pos x="10" y="4"/>
<selected x="+0" y="+1000"/>
</button>
<button action="var_greater $battery_percent 50 ? on : off">
<size width="10" height="1"/>
<pos x="10" y="5"/>
<selected x="+0" y="+1000"/>
</button>
<button action="var_greater $battery_percent 40 ? on : off">
<size width="10" height="1"/>
<pos x="10" y="6"/>
<selected x="+0" y="+1000"/>
</button>
<button action="var_greater $battery_percent 30 ? on : off">
<size width="10" height="1"/>
<pos x="10" y="7"/>
<selected x="+0" y="+1000"/>
</button>
<button action="var_greater $battery_percent 20 ? on : off">
<size width="10" height="1"/>
<pos x="10" y="8"/>
<selected x="+0" y="+1000"/>
</button>
<button action="var_greater $battery_percent 10 ? on : off">
<size width="10" height="1"/>
<pos x="10" y="9"/>
<selected x="+0" y="+1000"/>
</button>
<button action="var_greater $battery_percent 0 ? on : off">
<size width="10" height="1"/>
<pos x="10" y="10"/>
<selected x="+0" y="+1000"/>
</button>
 

geposted Sun 31 Oct 10 @ 5:01 am
Looks quite good, might have a shot at that. thanks. =)
 

geposted Sun 31 Oct 10 @ 5:51 am
SBDJPRO Infinity Member since 2006
I wish I could make it a bit easier...
 

geposted Sun 31 Oct 10 @ 7:01 am
However its much better than what we had before, Still Happy!
 

geposted Sun 31 Oct 10 @ 7:37 am
SBDJPRO Infinity Member since 2006
Couldn't you do something with panels in the skin to allow you to use different colours on the way down too?
 

geposted Sun 31 Oct 10 @ 11:16 am
Wouldn't need to be panneled. Just create 10 different images within the BMP and then each drop down points to the relevant image.

My idea would be 100%, 90%, 80%, 70% and 60% = GREEN
Then - 50%, 40%, 30% = ORANGE
Then 20% - RED & BLINK
Then 10% - RED AND BLINKFAST

Not implemented it yet - but thats the theory.
 

geposted Sun 31 Oct 10 @ 1:03 pm
SBDJPRO Infinity Member since 2006
Cool. I've not had a play with the skin aspect - all my skins are fairly basic and done with vector graphics!
 

geposted Sun 31 Oct 10 @ 1:26 pm
OK so no textzone support for this plugin, right?? I'm not the greatest at this script stuff but I tried eveything I know and got nothing.

Huey
 

geposted Sun 31 Oct 10 @ 3:32 pm
Correct Huey.

Unfortunately at the moment the is no way to return text from a variable VDJ script.
 

geposted Sun 31 Oct 10 @ 3:37 pm
Ok thanks Dan. Well atleast it'll blink when unplugged.

Huey
 

geposted Sun 31 Oct 10 @ 3:40 pm
SBDJPRO Infinity Member since 2006
I can't do anything about textzones I'm afraid; VDJ doesn't appear to support it at present.

You can still implement a battery meter and even approximated text as is.
 

geposted Sun 31 Oct 10 @ 5:38 pm
SBDJPRO Infinity Member since 2006
Good news. I've found a way to display a VDJScript variable in a textzone.

Example:

<textzone>
<pos x="0" y="0"/>
<size width="100" height="18"/>
<text font="Tahoma" size="10" align="center" weight="bold" color="#d1d3d4" format="`get var $battery_percent`%"/>
</textzone>


As you can see if you enclose your VDJScript command in `` quotes it will be evaluated by VDJ.
 

geposted Sun 31 Oct 10 @ 6:09 pm
SupaconPRO InfinityMember since 2005
Woot! That's great news, Scott.

BTW, could you add these code samples into the post at the top of the thread to make it easier for new users/skinners to get this information in one spot? I know that posts can only be edited for an hour, but I'm expecting that you have special powers.
 

geposted Sun 31 Oct 10 @ 6:12 pm
SBDJPRO Infinity Member since 2006
I wouldn't say special powers, but yes I can. I might issue an update to the plugin too with the time remaining in three relevant variables (hours, minutes, secs) for construction in a textzone.
 

geposted Sun 31 Oct 10 @ 6:14 pm
SupaconPRO InfinityMember since 2005
Were you also going to implement some other metrics and such? You were talking about temperatures, for instance. Do you think there is any risk of making the program less stable, or causing problems in some systems by introducing this sort of thing?

Oh, also I just thought that it might be interesting to show memory utilization and such. I mean... don't get me wrong, your plugin is already great and more than useful, but if these things are easy enough to add in, and you were already considering it, I thought you might find the suggestion interesting :)
 

geposted Sun 31 Oct 10 @ 6:17 pm
SBDJPRO Infinity Member since 2006
Indeed it's a potential idea. I'll probably implement system metrics in a different plugin though - they can be funny on some systems and I'd like to be able to keep them seperate if you see what I mean.
 

geposted Sun 31 Oct 10 @ 6:27 pm
SBDJPRO Infinity Member since 2006
This is probably going to help you guys out with a few other skin elements too now I imagine :)
 

geposted Sun 31 Oct 10 @ 6:45 pm
djdadPRO InfinityDevelopment ManagerMember since 2005


These shots are from my new VMS4 Decks skin (will be uploaded tonight)

 

geposted Sun 31 Oct 10 @ 7:12 pm
66%