diff options
Diffstat (limited to 'src/gui/MachinaGUI.cpp')
-rw-r--r-- | src/gui/MachinaGUI.cpp | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/src/gui/MachinaGUI.cpp b/src/gui/MachinaGUI.cpp index e283530..cc22cf8 100644 --- a/src/gui/MachinaGUI.cpp +++ b/src/gui/MachinaGUI.cpp @@ -41,13 +41,14 @@ namespace machina { namespace gui { MachinaGUI::MachinaGUI(SPtr<machina::Engine> engine) - : _refresh(false) - , _evolve(false) - , _unit(TimeUnit::BEATS, 19200) + : _unit(TimeUnit::BEATS, 19200) , _engine(engine) , _client_model(new machina::client::ClientModel()) , _controller(new machina::Controller(_engine, *_client_model.get())) , _maid(new Raul::Maid()) + , _refresh(false) + , _evolve(false) + , _chain_mode(true) { _canvas = SPtr<MachinaCanvas>(new MachinaCanvas(this, 1600*2, 1200*2)); @@ -80,6 +81,8 @@ MachinaGUI::MachinaGUI(SPtr<machina::Engine> engine) xml->get_widget("zoom_normal_but", _zoom_normal_button); xml->get_widget("zoom_full_but", _zoom_full_button); xml->get_widget("arrange_but", _arrange_button); + xml->get_widget("chain_but", _chain_button); + xml->get_widget("fan_but", _fan_button); xml->get_widget("load_target_but", _load_target_button); xml->get_widget("evolve_toolbar", _evolve_toolbar); xml->get_widget("evolve_but", _evolve_button); @@ -115,6 +118,11 @@ MachinaGUI::MachinaGUI(SPtr<machina::Engine> engine) _arrange_button->signal_clicked().connect( sigc::mem_fun(this, &MachinaGUI::arrange)); + _chain_button->signal_toggled().connect( + sigc::mem_fun(this, &MachinaGUI::chain_toggled)); + _fan_button->signal_toggled().connect( + sigc::mem_fun(this, &MachinaGUI::fan_toggled)); + _menu_file_open->signal_activate().connect( sigc::mem_fun(this, &MachinaGUI::menu_file_open)); _menu_file_save->signal_activate().connect( @@ -687,6 +695,22 @@ MachinaGUI::record_toggled() } void +MachinaGUI::chain_toggled() +{ + if (_chain_button->get_active()) { + _chain_mode = true; + } +} + +void +MachinaGUI::fan_toggled() +{ + if (_fan_button->get_active()) { + _chain_mode = false; + } +} + +void MachinaGUI::on_new_object(SPtr<client::ClientObject> object) { _canvas->on_new_object(object); |