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?
Perhaps I could create a low, medium and high to create the appearance of a bar meter?
Posté 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!!
Would be good if we could ina future release!!
Posté Sun 31 Oct 10 @ 2:23 am
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>
Posté Sun 31 Oct 10 @ 5:01 am
Looks quite good, might have a shot at that. thanks. =)
Posté Sun 31 Oct 10 @ 5:51 am
I wish I could make it a bit easier...
Posté Sun 31 Oct 10 @ 7:01 am
However its much better than what we had before, Still Happy!
Posté Sun 31 Oct 10 @ 7:37 am
Couldn't you do something with panels in the skin to allow you to use different colours on the way down too?
Posté 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.
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.
Posté Sun 31 Oct 10 @ 1:03 pm
Cool. I've not had a play with the skin aspect - all my skins are fairly basic and done with vector graphics!
Posté 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
Huey
Posté 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.
Unfortunately at the moment the is no way to return text from a variable VDJ script.
Posté Sun 31 Oct 10 @ 3:37 pm
Ok thanks Dan. Well atleast it'll blink when unplugged.
Huey
Huey
Posté Sun 31 Oct 10 @ 3:40 pm
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.
You can still implement a battery meter and even approximated text as is.
Posté Sun 31 Oct 10 @ 5:38 pm
Good news. I've found a way to display a VDJScript variable in a textzone.
Example:
As you can see if you enclose your VDJScript command in `` quotes it will be evaluated by VDJ.
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.
Posté Sun 31 Oct 10 @ 6:09 pm
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.
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.
Posté Sun 31 Oct 10 @ 6:12 pm
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.
Posté Sun 31 Oct 10 @ 6:14 pm
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 :)
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 :)
Posté Sun 31 Oct 10 @ 6:17 pm
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.
Posté Sun 31 Oct 10 @ 6:27 pm
This is probably going to help you guys out with a few other skin elements too now I imagine :)
Posté Sun 31 Oct 10 @ 6:45 pm
These shots are from my new VMS4 Decks skin (will be uploaded tonight)
Posté Sun 31 Oct 10 @ 7:12 pm