16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 18:09:18 +02:00

build 180621. serial port input device continuous independent brake control, scenery item selection and info, minor bug fixes, tweaks and refactoring

This commit is contained in:
tmj-fstate
2018-06-22 01:48:44 +02:00
parent 6b705d38dd
commit c0bf973c58
16 changed files with 188 additions and 201 deletions

View File

@@ -75,7 +75,7 @@ mouse_input::button( int const Button, int const Action ) {
if( true == FreeFlyModeFlag ) {
// world editor controls
// currently we only handle view panning in this mode
// TODO: separate behaviour when the scenery editor is active and in 'regular' free fly mode
if( Action == GLFW_RELEASE ) {
// if it's the right mouse button that got released we were potentially in view panning mode; stop it
if( Button == GLFW_MOUSE_BUTTON_RIGHT ) {
@@ -84,6 +84,19 @@ mouse_input::button( int const Button, int const Action ) {
}
else {
// button press
if( Button == GLFW_MOUSE_BUTTON_LEFT ) {
// the left button selects scene node
// further behaviour can vary depending on whether we're in editor mode
auto const *node { GfxRenderer.Update_Pick_Node() };
if( true == EditorModeFlag ) {
// NOTE: until we have proper editor object in place we set the current node manually
editor::Node = node;
}
else {
// launch on_click event associated with to the node
// TODO: implement
}
}
if( Button == GLFW_MOUSE_BUTTON_RIGHT ) {
// the right button activates mouse panning mode
m_pickmodepanning = true;