WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Oculus <hmd>.addMessagePanel (https://forum.worldviz.com/showthread.php?t=5065)

mshukun 06-11-2014 08:20 AM

Oculus <hmd>.addMessagePanel
 
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"))?

Code:

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


All times are GMT -7. The time now is 04:30 AM.

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