Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Dalai Felinto
virtual_reality_viewport
Commits
b7bc11d0
Commit
b7bc11d0
authored
Oct 15, 2015
by
Dalai Felinto
Browse files
Message in slave window to move it to HMD display
parent
3ae7ebe3
Changes
1
Hide whitespace changes
Inline
Side-by-side
space_view3d_virtual_reality/operator.py
View file @
b7bc11d0
...
...
@@ -338,14 +338,47 @@ class VirtualRealityDisplayOperator(bpy.types.Operator):
self
.
_loop
(
context
)
elif
self
.
_slave_status
==
SlaveStatus
.
waituser
:
self
.
_drawDisplayMessage
()
self
.
_drawDisplayMessage
(
context
)
else
:
self
.
_slaveSetup
(
context
)
def
_drawDisplayMessage
(
self
):
"""Message telling user to move the window the HMD display"""
TODO
def
_drawDisplayMessage
(
self
,
context
):
"""
Message telling user to move the window the HMD display
"""
window
=
context
.
window
width
=
window
.
width
height
=
window
.
height
#glColor4f(1.0, 1.0, 1.0, 1.0)
font_id
=
0
# draw some text
x
=
int
(
0.1
*
width
)
y
=
int
(
0.5
*
height
)
font_size
=
int
(
width
*
0.035
)
from
blf
import
(
SHADOW
,
enable
,
shadow
,
shadow_offset
,
position
,
size
,
draw
,
disable
,
)
enable
(
font_id
,
SHADOW
)
shadow
(
font_id
,
5
,
0.0
,
0.0
,
0.0
,
1.0
)
shadow_offset
(
font_id
,
-
2
,
-
2
)
position
(
font_id
,
x
,
y
,
0
)
size
(
font_id
,
font_size
,
72
)
draw
(
font_id
,
"1. Move this window to the external HMD display"
)
position
(
font_id
,
x
,
y
-
int
(
font_size
*
1.5
),
0
)
draw
(
font_id
,
"2. Select
\"
Start
\"
in the main window"
)
disable
(
font_id
,
SHADOW
)
def
_draw_callback_px
(
self
,
context
):
"""
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment