Reference: GUIs

Organizing GUIs with vizinfo

Vizinfo is a library of Vizard commands which provide a handy way to organize GUI displays. When you create a vizinfo object, you can add basic GUI elements to that object and they'll appear as a list in the order in which they were added. These lists can include sliders, buttons, and check boxes and labels for those items. The color, size and appearance of the vizinfo object and its logo can changed and the entire object can be animated to shrink and expand.  

 

 

 

import vizinfo
#Add the vizinfo object with a message.
infoObject = vizinfo.add('Give me feedback!')
#Give it a title.
infoObject.title('Vizinfo box')
#Add GUI elements with labels.
button = infoObject.add(viz.BUTTON, 'Push me')
slider = infoObject.add(viz.SLIDER, 'Slide me')
check = infoObject.add(viz.CHECKBOX, 'Check me')
#Adjust the parameters of one of the GUI elements.
slider.vertical()

 

 

Property

Description

Command

alignment

Set the alignment of the vizinfo box.

myVizinfoBox.aligment(alignment flag)

background color

Set the background of the vizinfo box.

myVizinfoBox.bgcolor(color flag)

border color

Set the border color of the vizinfo box.

myVizinfoBox.bordercolor(color flag)

dragability

Set whether or not the user can drag the vizinfo box across the screen using the mouse.

myVizinfoBox.drag(on or off flag)

expand

Animate the expansion of the vizinfo box from the icon.

myVizinfoBox.expand()

icon texture

Set the texture used for the icon.

myVizinfoBox.icon()

message

Set the content of the message.

myVizinfoBox.message(string)

message color

Set the color of the message.

myVizinfoBox.messagecolor(color flag)

scale

Set the scale of the vizinfo box.

myVizinfoBox.scale( x, y )

shrinkage

Animate the shrinking of the vizinfo box into the icon.

myVizinfoBox.shrink()

title

Set the title of the box.

myVizinfoBox.title(string)

title background color

Set the title's background color.

myVizinfoBox.titlebgcolor(color flag)

title color

Set the title's color.

myVizinfoBox.titlecolor(color flag)

visibility

Set the visibility of the vizinfo box.

myVizinfoBox.visible(on or off flag)

position on the screen

Sets the default message.

myVizinfoBox.translate( x, y)

See also

In this section:

User interface basics

GUI elements

Getting data from GUI elements

GUI appearance

vizinfo

vizmenu

vizinput

vizdlg

vizconfig

viztip

Displaying HTML

GUI command table

Other sections:

Event Basics

Action basics

Text node basics

Example scripts:

vizInfo

vizMenu

Prompt