Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Project_Phoenix
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LuFG VR VIS
VR-Group
Project_Phoenix
Commits
b5f13198
Commit
b5f13198
authored
Jul 19, 2018
by
jwendt
Browse files
Options
Downloads
Patches
Plain Diff
small refactoring to desktop navigation behavior
#463
parent
492c7a4b
No related branches found
No related tags found
1 merge request
!156
Feature/#463 mouse keyboard device
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
demos/combustion_demo/src/desktop_navigation_behavior.cpp
+10
-20
10 additions, 20 deletions
demos/combustion_demo/src/desktop_navigation_behavior.cpp
with
10 additions
and
20 deletions
demos/combustion_demo/src/desktop_navigation_behavior.cpp
+
10
−
20
View file @
b5f13198
...
@@ -75,25 +75,15 @@ void DesktopNavigationBehavior::OnMouseMove(int x, int y) {
...
@@ -75,25 +75,15 @@ void DesktopNavigationBehavior::OnMouseMove(int x, int y) {
void
DesktopNavigationBehavior
::
OnMouseButton
(
phx
::
Mouse
::
ButtonId
id
,
void
DesktopNavigationBehavior
::
OnMouseButton
(
phx
::
Mouse
::
ButtonId
id
,
phx
::
Mouse
::
ButtonEvent
event
)
{
phx
::
Mouse
::
ButtonEvent
event
)
{
if
(
event
==
phx
::
Mouse
::
BUTTON_PRESSED
)
{
bool
value_to_set
=
(
event
==
phx
::
Mouse
::
BUTTON_PRESSED
);
if
(
id
==
phx
::
Mouse
::
LEFT_BUTTON
)
{
rotation_mode_
=
true
;
}
if
(
id
==
phx
::
Mouse
::
MIDDLE_BUTTON
)
{
strafe_mode_
=
true
;
}
if
(
id
==
phx
::
Mouse
::
RIGHT_BUTTON
)
{
translation_mode_
=
true
;
}
}
else
{
if
(
id
==
phx
::
Mouse
::
LEFT_BUTTON
)
{
if
(
id
==
phx
::
Mouse
::
LEFT_BUTTON
)
{
rotation_mode_
=
f
alse
;
rotation_mode_
=
v
al
ue_to_
se
t
;
}
}
if
(
id
==
phx
::
Mouse
::
MIDDLE_BUTTON
)
{
if
(
id
==
phx
::
Mouse
::
MIDDLE_BUTTON
)
{
strafe_mode_
=
f
alse
;
strafe_mode_
=
v
al
ue_to_
se
t
;
}
}
if
(
id
==
phx
::
Mouse
::
RIGHT_BUTTON
)
{
if
(
id
==
phx
::
Mouse
::
RIGHT_BUTTON
)
{
translation_mode_
=
false
;
translation_mode_
=
value_to_set
;
}
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment