From: Mikko Rasa Date: Thu, 25 Apr 2013 11:08:39 +0000 (+0300) Subject: Adapt event handlers to library changes X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=54d520566470a4b21b2a6eac3e2943d6305dcfa1;p=r2c2.git Adapt event handlers to library changes --- diff --git a/source/designer/cameracontroller.cpp b/source/designer/cameracontroller.cpp index 29eb4c0..f8d1a53 100644 --- a/source/designer/cameracontroller.cpp +++ b/source/designer/cameracontroller.cpp @@ -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() diff --git a/source/designer/designer.cpp b/source/designer/designer.cpp index ed3cd70..da89771 100644 --- a/source/designer/designer.cpp +++ b/source/designer/designer.cpp @@ -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)); diff --git a/source/designer/manipulator.cpp b/source/designer/manipulator.cpp index 83a093a..2e16311 100644 --- a/source/designer/manipulator.cpp +++ b/source/designer/manipulator.cpp @@ -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)); } diff --git a/source/engineer/engineer.cpp b/source/engineer/engineer.cpp index 48fd8d1..e19c11e 100644 --- a/source/engineer/engineer.cpp +++ b/source/engineer/engineer.cpp @@ -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);