How do I use the ^JST command to shift text off a button to the left?
Joe Hebert
Posts: 2,159
I am trying to make text on a button shift to the left and off the button during runtime by using the ^JST (Set Text Alignment) SEND_COMMAND. I can make the text move to the right and off the button by using ^JST and I can make the text shift to the left 0 position but I can?t get it to go negative and have the text move off the left side (like you would see with a marquee).
If I do pass in a negative left (x) with the ^JST command the text goes to the 0 X position and then moves down the Y axis instead of negative on the X axis. I can tween a multi-state button in TPDesign 4 to get the effect that I?m looking for, however, I need to manually tween a multi-state general button at runtime by using the ^JST command because the length of the text to be displayed is dynamic. Doesn?t the ^JST command accept negatives?
I?ve attached an image which shows the problem I?m having and here is the definition of the ^JST command:
What am I doing wrong? Can anyone help and get me to where I need to go?
Thanks,
Joe
If I do pass in a negative left (x) with the ^JST command the text goes to the 0 X position and then moves down the Y axis instead of negative on the X axis. I can tween a multi-state button in TPDesign 4 to get the effect that I?m looking for, however, I need to manually tween a multi-state general button at runtime by using the ^JST command because the length of the text to be displayed is dynamic. Doesn?t the ^JST command accept negatives?
I?ve attached an image which shows the problem I?m having and here is the definition of the ^JST command:
"'^JST-<vt addr range>,<button states range>,<new text alignment>'"
Set Text Alignment, use numeric keypad layout (1 = left, top
5 = center, middle 9 = right, bottom). 0 can be used for absolution
position. The alignment of 0 is followed by ',<left>,<top>'. The left
and top coordinate are relative to the upper left corner of the button.
What am I doing wrong? Can anyone help and get me to where I need to go?
Thanks,
Joe
0
Comments
I could also accomplish the same type effect by changing the actual text on the fly but that would generate way too much SEND_COMMAND traffic plus I wouldn?t be able to drop just part of a character off of the left and it would look too choppy.
I?m also trying to see if I can pause and resume this animation but I haven?t figured that part out yet. I posted a thread about that here: http://www.amxforums.com/showthread.php?s=&threadid=341
Thanks a lot for your reply and thanks for having this changed in the next rev of the firmware. (any idea how far out we are with the next upgrade?)
If you have any other thoughts regarding how I can do this I would appreciate it. Maybe I can abandon this whole idea if there is a marquee type button coming down the line.
Thanks again,
Joe