View Single Post
  #2  
Old 11-21-2017, 01:36 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,467
It's possible to create custom layouts by adding vizdlg panels to the vizinfo panel. Texture quads can be added directly to panels. Here's an example:

Code:
import viz
import vizinfo
import vizdlg

viz.go()

dojo = viz.addChild('dojo.osgb')
info = vizinfo.InfoPanel('Custom info panel')

row1 = vizdlg.Panel(layout=vizdlg.LAYOUT_HORZ_TOP,background=False,border=False)
radio1 = row1.addItem(viz.addRadioButton('images'))
texture1 = viz.addTexture('images/tile_grass.jpg')
quad1 = viz.addTexQuad(texture=texture1, scale=[100,100,1], align=viz.ALIGN_CENTER)
row1.addItem(quad1)
info.addItem(row1)

row2 = vizdlg.Panel(layout=vizdlg.LAYOUT_HORZ_TOP,background=False,border=False)
radio2 = row2.addItem(viz.addRadioButton('images'))
texture2 = viz.addTexture('images/tile_stone.jpg')
quad2 = viz.addTexQuad(texture=texture2, scale=[100,100,1], align=viz.ALIGN_CENTER)
row2.addItem(quad2)
info.addItem(row2)
Reply With Quote