Home AMX User Forum AMX Design Tools

Multi-state buttons/ bargraphs.

Any good advice on making color changing buttons?

One idea I had was to make a multistate general button with 16 states, one for each color I want to display, but I don't know a way to display discreet States. The button goes From 1-16 non-stop. Is there a send-command to display a mid state?

Another Idea is to make a custom multi-state "bargraph" and drive it by doing a send. level. But that's a workaround I'd like to avoid.

I will keep sifting through software history for the time being, maybe I'll find the answer.

I also suspect I'll be diving into the Chameleon Colors to make my odd shaped buttonsbe able to change colors..

Another thought is to manipulate the color pallette, but I don't think that is currently possible either. Maybe I can just do a color change with ^BMF...%CF

I still think I should be able to find a "display state" command...

-Charlie

Comments

  • Joe HebertJoe Hebert Posts: 2,159
    ccoburn wrote:
    One idea I had was to make a multistate general button with 16 states, one for each color I want to display, but I don't know a way to display discreet States. The button goes From 1-16 non-stop. Is there a send-command to display a mid state?...Another Idea is to make a custom multi-state "bargraph" and drive it by doing a send. level. But that's a workaround I'd like to avoid.

    If you don?t the level approach then you can use the ^ANI SEND_COMMAND to send a multi-state button to a particular state. Attached is a sample TP4 file that when dropped into Panel Preview will demonstrate the command by using the loopback port.

    HTH
  • viningvining Posts: 4,368
    You can also set the button up as a multi-state bargraph. Set the range low to 1 and the range hi to the amount of states desired and then just send level commands with the level being the number of the desired state.

    The ^ANI command works just as well.
  • ccoburnccoburn Posts: 11
    Thanks...

    Thanks Joe, that's exactly what I was looking for.

    I was looking for a "state" command and had forgotten about the animation commands.
    Someone once told that animations had to start with state 1. I guess they were very wrong...

    -Charlie
  • DHawthorneDHawthorne Posts: 4,584
    ccoburn wrote:
    Thanks Joe, that's exactly what I was looking for.

    I was looking for a "state" command and had forgotten about the animation commands.
    Someone once told that animations had to start with state 1. I guess they were very wrong...

    -Charlie
    Personally, I find SEND_LEVEL more intuitive, and it's more clear in the code exactly what you are doing. Strictly a preference though, ^ANI does the same job.
  • a_riot42a_riot42 Posts: 1,624
    I have always wondered how to stop an animation during its sequence based on user input, but I haven't figured out a way. For instance, having an animation running repeatedly but then stop running, displaying the image at the stopped state, when the user hits a button. Imagine a roulette wheel animation that the user could stop when they hit a button. I called AMX support and they didn't know how either.
    Anyone tried this?
    Thanks,
    Paul
  • viningvining Posts: 4,368
    Set up a timeline and in the timeline event increment a variable up to the number of states of your multi-bar graph (animation not bargraph) which goes back to 1 when that number is reached. On every timeline event send the level of that variable to display its corresponding animated state. On a button push stop the timeline.
Sign In or Register to comment.