File: pudding-listbox-1.py

package info (click to toggle)
soya-doc 0.14-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, squeeze, wheezy
  • size: 15,264 kB
  • ctags: 1,039
  • sloc: python: 4,334; makefile: 9; sh: 5
file content (21 lines) | stat: -rw-r--r-- 543 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

# Example of Pudding list object, by Reto Spoerri (thanks :-))

import soya, soya.pudding, soya.pudding.listbox

soya.init(width = 800, height = 600, fullscreen=False)

soya.pudding.init()

rootWidget = soya.pudding.core.RootWidget(width = 800, height = 600)

soya.set_root_widget(rootWidget)
scene = soya.World()

list = ["obj0","obj1","obj2","obj3","obj4","obj5","obj6"]
a = soya.pudding.listbox.ListBox( rootWidget, list )

camera = soya.Camera( scene )
rootWidget.add_child( camera )

soya.pudding.main_loop.MainLoop( scene ).main_loop()