projects
/
laserbrain_demo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
exhibit ui
[laserbrain_demo]
/
src
/
app.cc
diff --git
a/src/app.cc
b/src/app.cc
index
7f173f3
..
0ac331b
100644
(file)
--- a/
src/app.cc
+++ b/
src/app.cc
@@
-364,7
+364,7
@@
static void update(float dt)
} else {
// TODO do this properly
// set the position of the left hand at a suitable position for the exhibit UI
} else {
// TODO do this properly
// set the position of the left hand at a suitable position for the exhibit UI
- dir = transpose(mouse_view_matrix.upper3x3()) * Vec3(-0.47, 0, -1);
+ dir = rotate(Vec3(-0.46, -0.1, -1), Vec3(0, 1, 0), deg_to_rad(-avatar.body_rot));
exslot_left.node.set_position(avatar.pos + dir * 30); // magic: distance in front
}
exslot_left.node.set_position(avatar.pos + dir * 30); // magic: distance in front
}
@@
-617,6
+617,22
@@
void app_keyboard(int key, bool pressed)
case 'x':
exman->load(mscn, "data/exhibits");
break;
case 'x':
exman->load(mscn, "data/exhibits");
break;
+
+ case KEY_UP:
+ exui_scroll(-1);
+ break;
+
+ case KEY_DOWN:
+ exui_scroll(1);
+ break;
+
+ case KEY_LEFT:
+ exui_change_tab(-1);
+ break;
+
+ case KEY_RIGHT:
+ exui_change_tab(1);
+ break;
}
}
}
}