set_title("Constructor");
- ico_canio = Gdk::Pixbuf::create_from_file("item_canio.png");
- ico_y = Gdk::Pixbuf::create_from_file("item_y.png");
- ico_codo = Gdk::Pixbuf::create_from_file("item_codo.png");
- ico_tanque = Gdk::Pixbuf::create_from_file("item_tanque.png");
+ ico_canio = Gdk::Pixbuf::create_from_file("canio_n.png");
+ ico_y = Gdk::Pixbuf::create_from_file("y_n.png");
+ ico_codo = Gdk::Pixbuf::create_from_file("codo_o.png");
+ ico_tanque = Gdk::Pixbuf::create_from_file("tanque_e.png");
refGlade->get_widget("btn_canio", btn_canio);
refGlade->get_widget("btn_codo", btn_codo);
void Constructor::on_main_menu_quit()
{
+ delete this;
Gtk::Main::quit();
//hide();
}
if ((selection_data->length >= 0) && (selection_data->format == 8)) {
CItem *a;
if (strcmp((const char *)selection_data->data, "item_codo.png")==0)
- a = new Splitter();//Gtk::manage( new Splitter() );
+ a = new Splitter();
else if (strcmp((const char *)selection_data->data, "item_canio.png")==0)
- a = new Conduct();//Gtk::manage( new Conduct() );
+ a = new Conduct();
else if (strcmp((const char *)selection_data->data, "item_y.png")==0)
- a = new Union();//Gtk::manage( new Union() );
+ a = new Union();
else if (strcmp((const char *)selection_data->data, "item_tanque.png")==0)
- a = new Cistern();//Gtk::manage( new Cistern() );
+ a = new Cistern();
else
- a = new CItem();//Gtk::manage( new CItem((const char *)selection_data->data) );
+ a = new CItem();
//Seteo el ID del item
+ Glib::ustring name("item");
a->set_id(++id);
+ a->set_name( name );
if ( can_drop(a, i*32, j*32) ) {
workplace->put(*a, i*32, j*32);
//Apunto al workplace