- hbox->pack_start(*manage(chk_reverse = new Gtk::CheckButton("Rev")), false, true);
- chk_reverse->signal_toggled().connect(sigc::mem_fun(this, &TrainPanel::ui_reverse_changed));
-
- Gtk::HBox *func_box = new Gtk::HBox(false, 5);
- vbox->add(*manage(func_box));
- const R2C2::VehicleType::FunctionMap &funcs = train.get_loco_type().get_functions();
- for(R2C2::VehicleType::FunctionMap::const_iterator i=funcs.begin(); i!=funcs.end(); ++i)
- {
- Gtk::CheckButton *&chk = chk_funcs[i->first];
- chk = new Gtk::CheckButton(i->second);
- func_box->pack_start(*manage(chk), false, true);
- chk->signal_toggled().connect(sigc::bind(sigc::mem_fun(this, &TrainPanel::ui_function_changed), i->first));
- }
+ sld_speed = dynamic_cast<GLtk::Slider *>(get_item(widgets, "sld_speed"));
+ sld_speed->set_range(0, train.get_loco_type().get_maximum_speed()/train.get_client().get_catalogue().get_scale()*3.6);
+ sld_speed->signal_value_changed.connect(sigc::mem_fun(this, &TrainPanel::ui_speed_changed));