WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-18-2009, 05:59 PM
hosier hosier is offline
Member
 
Join Date: Feb 2007
Posts: 31
vizinfo text alignment

I've created a help menu using vizinfo. I then have another function that changes the message of the menu so that I can present the instructions in other languages.

When the help menu first comes up, the text is aligned to the left side of the vizinfo box. When I change the text of the menu, it shifts to the right side of the box.

I'm creating my menu thus:
Code:
# Setup Help Menu
tempmessage  = "Help:\n"
tempmessage += "Select a muscle to closer examine it\n"
tempmessage += "Use the arrow keys to move the selected muscle\n"
tempmessage += "Use the right mouse button to rotate the selected muscle\n"
tempmessage += "Use + to zoom in and - to zoom out on the selected muscle\n"
tempmessage += "Press h to turn help on/off\n"
tempmessage += "Press r to reset the model\n"

HELPMESSAGE["eng"] = tempmessage


tempmessage  = "Ayuda:\n"
tempmessage += "Seleccione un m�culo m� cerca para examinarlo\n"
tempmessage += "Utilice las llaves de flecha para mover el m�culo seleccionado\n"
tempmessage += "Utilice el bot� de rat� derecho para girar el m�culo seleccionado\n"
tempmessage += "Uso + enfocar adentro y - enfocar hacia fuera en el m�culo seleccionado\n"
tempmessage += "Presione h para dar vuelta a ayuda con./desc.\n"
tempmessage += "Presione r para reajustar el modelo\n"

HELPMESSAGE["spa"] = tempmessage



helpmenu = vizinfo.add(HELPMESSAGE["eng"])
helpmenu.shrink()
helpmenu.visible(viz.OFF)
I then create a function attached to a select list:
Code:
def languageradio(name,status):
        global language
        global helpmenu
        global HELPMESSAGE

        language = name
        print "Language: " + language
        helpmenu.message(HELPMESSAGE[language])
        helpmenu.alignment(viz.TEXT_LEFT_TOP)
There is no problem changing what the message is, it's just that the alignment shifts from the left to the right, and I'd really like to keep it aligned to the left. I've tried it with and without the helpmenu.alignment call.

If anybody has any ideas, I'd appreciate it.

Thanks.

Aaron
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Vizard tech tip: Text to Speech Jeff Vizard 1 01-15-2009 09:39 PM
Modifying Vizinfo to Support Re-parenting Tip Gladsomebeast Vizard 0 12-16-2008 05:34 PM
text output jaclyn.bill Vizard 2 10-24-2007 06:37 AM
adding 2D text via script V.shazzle Vizard 3 09-19-2005 02:45 PM
3d Text with Transparent Borders vjosh Vizard 3 12-01-2004 10:50 AM


All times are GMT -7. The time now is 03:40 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC