]> git.llucax.com Git - z.facultad/75.42/plaqui.git/blobdiff - Constructor/cistern.cpp
Ahora el tanque gira bien
[z.facultad/75.42/plaqui.git] / Constructor / cistern.cpp
index 31bd36745dee3b05dfc0ff997ac835b155c9ff83..ef12915dc8b77acf1d1dae470a955fad46bf9505 100644 (file)
@@ -4,7 +4,7 @@ Cistern::Cistern()
 {
        imageE = Gdk::Pixbuf::create_from_file("tanque_e.png");
        imageO = Gdk::Pixbuf::create_from_file("tanque_o.png");
-       null = Gdk::Pixbuf::create_from_file("null.png");
+       null = Gdk::Pixbuf::create_from_file("tanque_null.png");
        imgActual = 0;
        image = imageE;
        set_size_request(image->get_width(), image->get_height());
@@ -16,7 +16,6 @@ Cistern::~Cistern()
 
 bool Cistern::on_button_press_event(GdkEventButton *event)
 {
-       int w, h;
        if ((event->type == GDK_BUTTON_PRESS) && ( event->button ==2)){
                image = null; 
                image->render_to_drawable(get_window(),get_style()->get_black_gc(),0,0,0,0,image->get_width(),image->get_height(),Gdk::RGB_DITHER_NONE,0,0);
@@ -29,8 +28,7 @@ bool Cistern::on_button_press_event(GdkEventButton *event)
                                imgActual = 0;
                                image = imageE;                 
                }
-               get_size_request(w, h);
-               set_size_request(h, w);         
+               set_size_request(image->get_width(),image->get_height());
                image->render_to_drawable(get_window(),get_style()->get_black_gc(),0,0,0,0,image->get_width(),image->get_height(),Gdk::RGB_DITHER_NONE,0,0);
        }
        if ((event->type == GDK_BUTTON_PRESS) && ( event->button == 3)){