1

Topic: Knobs - Generic Controls - image control

I'm trying to create a kiosk interface.
I would like my user feedback to be driven by an integer value output by my script.
If I set the control style to meter it reflects the integer value but the buttons and leds all seem to just be either on or off.
How does the "Image Control" control style work. How do I associate an image with it?

2

Re: Knobs - Generic Controls - image control

Here is a quick example of image control...

May not be what you are wanting to do, but you are doing a script, so you may be able to incorporate this feature into what you are already doing.

Good luck,

Fergy

Post's attachments

Attachment icon Image Control.npa 465.19 kb, 615 downloads since 2015-07-08 

Make it intuitive, never leave them guessing.

3

Re: Knobs - Generic Controls - image control

Thanks for the reply, I can't see or edit the script for some reason, could  you post the code?

4

Re: Knobs - Generic Controls - image control

# This script takes the router number and converts it to a friendly
# name for the selected channel

BGM_Selection = [ "0.jpg", "1.jpeg", "2.jpeg",
"3.jpg", "4.jpg", "5.jpg"]

n = inputs[0].value_get()
message.string_set( BGM_Selection[n] )

I stole this from myself, which is why it says BGM Selection, instead of Image Control (didn't take the time to make this simple change).

Fergy

Make it intuitive, never leave them guessing.

5

Re: Knobs - Generic Controls - image control

I'm sorry, but I don't see how the script is associated with the Image Control. There's no wiring node or control alias, the only association I see is the label 'Message' in the control properties dialog.

6

Re: Knobs - Generic Controls - image control

Hi,

All Scott has done is copied out the 'message' panel from the live python block and instead of leaving it as a standard text box to display the 'string name', he's just changed it's control style to an image control.  (If you open the python block and watch what happens to the 'message' block when you alter the integer - I'm sure you'll see what's happening)

The string still passes from the script to this copied object - it's just how the message block object it's being displayed that has changed.

Lee 8)

Last edited by Lee Freer (2015-07-13 15:34:26)

7

Re: Knobs - Generic Controls - image control

Thank  you!

8

Re: Knobs - Generic Controls - image control

No problem,

Feel free to email us any other queries.  big_smile

Lee