PDA

View Full Version : Oculus <hmd>.addMessagePanel


mshukun
06-11-2014, 08:20 AM
Thank you very much for adding Oculus addMessagePanel in the Vizard 5!! I have a couple of questions regarding "addMessagePanel".

Q1: Can I change message in the "addMessagePanel" without removing and recreating "addMessagePanel" object (e.g. info_panel.message("Hello"))?


import viz
import viztask
import oculus

viz.go()

questions = ["Q1:", "Q2:", "Q3:"]
hmd = oculus.Rift()
viz.link(hmd.getSensor(), viz.MainView)

def test():
for index in range(len(questions)):
if index <= len(questions):
yield viztask.waitKeyChar("q")
print questions[index]
#Create the message panel
info_panel = hmd.addMessagePanel(questions[index], pos=(0,0,3))
yield viztask.waitTime(2)
#Remove the message panel
info_panel.remove()

viztask.schedule(test())



Q2: Are there any ways to set visibility to be ON/OFF for the "addMessagePanel"?



Thank you in advance.
Makiko

masaki
06-11-2014, 10:57 AM
Hello,

Q1: info_panel.setText('hello')
Q2: info_panel.visible(0)

Best,
Masaki

mshukun
06-16-2014, 07:06 AM
It worked!! Thank you so much!!

Makiko