]> git.tdb.fi Git - r2c2.git/commitdiff
Adapt event handlers to library changes
authorMikko Rasa <tdb@tdb.fi>
Thu, 25 Apr 2013 11:08:39 +0000 (14:08 +0300)
committerMikko Rasa <tdb@tdb.fi>
Thu, 25 Apr 2013 11:08:39 +0000 (14:08 +0300)
source/designer/cameracontroller.cpp
source/designer/designer.cpp
source/designer/manipulator.cpp
source/engineer/engineer.cpp

index 29eb4c0694edb7c267296ddc623ab6cfa46ae359..f8d1a53b8b1b6279cfc97441d417eaa0ad877e18 100644 (file)
@@ -18,11 +18,11 @@ CameraController::CameraController(View3D &v, Input::Keyboard &k, Input::Mouse &
        ctrl_pressed(false),
        drag_mode(NONE)
 {
-       mouse.signal_button_press.connect(sigc::mem_fun(this, &CameraController::button_press));
-       mouse.signal_button_release.connect(sigc::mem_fun(this, &CameraController::button_release));
-       mouse.signal_axis_motion.connect(sigc::mem_fun(this, &CameraController::axis_motion));
-       keyboard.signal_button_press.connect(sigc::mem_fun(this, &CameraController::key_press));
-       keyboard.signal_button_release.connect(sigc::mem_fun(this, &CameraController::key_release));
+       mouse.signal_button_press.connect(sigc::bind_return(sigc::mem_fun(this, &CameraController::button_press), false));
+       mouse.signal_button_release.connect(sigc::bind_return(sigc::mem_fun(this, &CameraController::button_release), false));
+       mouse.signal_axis_motion.connect(sigc::bind_return(sigc::mem_fun(this, &CameraController::axis_motion), false));
+       keyboard.signal_button_press.connect(sigc::bind_return(sigc::mem_fun(this, &CameraController::key_press), false));
+       keyboard.signal_button_release.connect(sigc::bind_return(sigc::mem_fun(this, &CameraController::key_release), false));
 }
 
 void CameraController::top_down()
index ed3cd700564695a29ab8cde5262c04d057a6c6d6..da897713c8a57987d6f0bd0dcd81a5bde4ca1786 100644 (file)
@@ -42,7 +42,7 @@ Designer::Designer(int argc, char **argv):
        keyboard(window),
        mouse(window),
        ui_res("r2c2.res"),
-       root(ui_res, window),
+       root(ui_res, &window, &keyboard, &mouse),
        base_object(0),
        cur_route(0),
        cur_zone(0),
@@ -106,9 +106,9 @@ Designer::Designer(int argc, char **argv):
        pipeline->add_renderable_for_pass(layout_3d->get_endpoint_scene(), "unlit");
 
        // Setup UI
-       keyboard.signal_button_press.connect(sigc::mem_fun(this, &Designer::key_press));
-       mouse.signal_button_press.connect(sigc::mem_fun(this, &Designer::button_press));
-       mouse.signal_axis_motion.connect(sigc::mem_fun(this, &Designer::axis_motion));
+       keyboard.signal_button_press.connect(sigc::bind_return(sigc::mem_fun(this, &Designer::key_press), false));
+       mouse.signal_button_press.connect(sigc::bind_return(sigc::mem_fun(this, &Designer::button_press), false));
+       mouse.signal_axis_motion.connect(sigc::bind_return(sigc::mem_fun(this, &Designer::axis_motion), false));
        root.signal_tooltip.connect(sigc::mem_fun(this, &Designer::tooltip));
 
        toolbars.push_back(new Layoutbar(*this));
index 83a093a712d77fb98949c1852fadcd6da15b7f1a..2e16311501ee112e6271ce0d9aa7bd3381d1a64c 100644 (file)
@@ -17,8 +17,8 @@ Manipulator::Manipulator(Designer &d, Input::Mouse &m, Selection &s):
        mode(NONE),
        angle(0)
 {
-       mouse.signal_button_press.connect(sigc::mem_fun(this, &Manipulator::button_press));
-       mouse.signal_axis_motion.connect(sigc::mem_fun(this, &Manipulator::axis_motion));
+       mouse.signal_button_press.connect(sigc::bind_return(sigc::mem_fun(this, &Manipulator::button_press), false));
+       mouse.signal_axis_motion.connect(sigc::bind_return(sigc::mem_fun(this, &Manipulator::axis_motion), false));
        selection.signal_changed.connect(sigc::mem_fun(this, &Manipulator::selection_changed));
 }
 
index 48fd8d1757ab4087299c105d5e3f7bffee22f2d2..e19c11e063707a8e7e91383a51044e9ce100f8df 100644 (file)
@@ -52,8 +52,8 @@ Engineer::Engineer(int argc, char **argv):
        window.signal_close.connect(sigc::bind(sigc::mem_fun(this, &Engineer::exit), 0));
 
        root = new GLtk::Root(ui_res, window);
-       mouse.signal_button_press.connect(sigc::mem_fun(this, &Engineer::button_press));
-       mouse.signal_axis_motion.connect(sigc::mem_fun(this, &Engineer::axis_motion));
+       mouse.signal_button_press.connect(sigc::bind_return(sigc::mem_fun(this, &Engineer::button_press), false));
+       mouse.signal_axis_motion.connect(sigc::bind_return(sigc::mem_fun(this, &Engineer::axis_motion), false));
        root->set_visible(true);
 
        main_panel = new MainPanel(*this);