How to create a menu selector or scroll bar
-
I am needing to create a scroll bar for an LCD menu. Say five items in list, each list item has a box around it. Each box has a blue background with white text. When KEY("x") is pressed the scroll bar would advance to the next item and reverse the box colors to background white and text to blue.
With each press it needs to advance to the next box while changing the colors on the box it's leaving from back to what they were before it was highlighted. Follow me? I would need it to keep looping from 1st box to last box then repeat back to 1st box. I'm sure this can be done with a script, but I wouldn't know how to write it anyone willing to help?
Think of your TV's remote control, when in setup mode pressing a button scrolls though it's menu options.
Is this possible with SP 3.2?
Thanks
Joe -
-
Is this something to do with sketchy physics?
(is that what 3.2 means in the last question?) -
@unknownuser said:
Is this something to do with sketchy physics?
I also guess so...
Joe: we have a SP subforum. Would you like me to move your topic there?
-
My bad....I don't know why I thought I was posting to the right group. Yes please move my post to your SP subform.
Thanks
Joe -
Hey!
I made a model that I think works with your requirements.
"X" is used to move the menu.
To see how it works: turn on "View Hidden Group", and the script is in the big box on the side.Hope this works. You can add several menu steps if you want that.
-
Hello Hpnisse.... Thank you very much for taking the time to create a sample script for me. While I didn't know how to write it, I certainly understand it and will have no problems editing to work with the remote control device I created. I did figure out how to hide and unhide an object with an onTick script but that was as far as I got yesterday.
I will show you the model once I incorporate your script. - Thanks again, Joe
-
Hello Tim, Thanks again for the help. I used the script to control two sets of menu selectors. One is the ANGLE (left to right) the other is DISTANCE. The remote control is used to launch a missle from it's launch pad but have only included the remote control in this attachment. It seems to work as i wanted but it has locked up sketchup on two occassions out of about 30 or test runs.
PS I sent this message yesterday but it never left my outbox, so i've moved it here
-
Hello again!
I'm glad you liked the "script", and that you got it to work for your model, which by the way was really well done!
My Sketchup crashes sometimes, I do not know if it has to do with SP3.2 but it usually work out if you have autosave on, then you have something to go back to if it would crash.
Is there anything else, just ask! -
Tim, without your script I couldn't have brought my vision into focus. I remember QuickBasic and Pascal from highschool and have a decent undertanding of arrays and variables so it wasn't much of an effort to edit your script to fit my model... Thanks again and I may take you up on your offer for future help. I am creating a virutal prototype for a toy.
PS I'm an old school DOS user so I am in the habit of saving my work with almost every major change. Most of the time I save things under two names while doing a lot of editing or experimenting so I always have a "restore" point of sorts.
-Joe
San Antonio, Texas USA
Advertisement