From: Nicolás Dimov Date: Thu, 23 Oct 2003 18:39:45 +0000 (+0000) Subject: Bue, ahora se pueden girar los bichos y queda re bonito, pero que ni se les ocurra... X-Git-Tag: svn_import~373 X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/commitdiff_plain/69f9b2a4a210cf2933c2da844183a199ba7ff5da?ds=inline Bue, ahora se pueden girar los bichos y queda re bonito, pero que ni se les ocurra intentar moverlos!!! help me! ahora mientras escribo me doy cuenta que me olvide de agregar una cosa que habia sacado pero para el proximo commit lo arreglo.no es importante. --- diff --git a/Constructor/canio.cpp b/Constructor/canio.cpp index 387ce31..47c1450 100644 --- a/Constructor/canio.cpp +++ b/Constructor/canio.cpp @@ -16,7 +16,8 @@ Canio::~Canio() bool Canio::on_button_press_event(GdkEventButton *event) { - if (event->type == GDK_2BUTTON_PRESS){ + int w, h; + if ((event->type == GDK_BUTTON_PRESS) && ( event->button ==3)){ image = null; //como hago para actualizar????? 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); imgActual++; @@ -28,6 +29,8 @@ bool Canio::on_button_press_event(GdkEventButton *event) imgActual = 0; image = imageN; } + get_size_request(w, h); + set_size_request(h, w); 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); } return true; diff --git a/Constructor/codo.cpp b/Constructor/codo.cpp index baa3aaa..a7f1502 100644 --- a/Constructor/codo.cpp +++ b/Constructor/codo.cpp @@ -18,7 +18,7 @@ Codo::~Codo() bool Codo::on_button_press_event(GdkEventButton *event) { - if (event->type == GDK_2BUTTON_PRESS){ + if ((event->type == GDK_BUTTON_PRESS) && ( event->button == 3)){ image = null; //como hago para actualizar????? 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); imgActual++; @@ -36,6 +36,7 @@ bool Codo::on_button_press_event(GdkEventButton *event) imgActual = 0; image = imageN; } + 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); } return true; diff --git a/Constructor/constructor.cpp b/Constructor/constructor.cpp index 094ff23..449e7c3 100644 --- a/Constructor/constructor.cpp +++ b/Constructor/constructor.cpp @@ -128,7 +128,7 @@ void Constructor::on_item_drop_drag_received(const Glib::RefPtrsignal_drag_begin().connect(SigC::bind( SigC::slot(*this, &Constructor::on_item_drag_begin), a)); + //a->signal_drag_begin().connect(SigC::bind( SigC::slot(*this, &Constructor::on_item_drag_begin), a)); a->show(); listaItems.push_back(a); } diff --git a/Constructor/y.cpp b/Constructor/y.cpp index 3d84582..71e2367 100644 --- a/Constructor/y.cpp +++ b/Constructor/y.cpp @@ -18,7 +18,8 @@ Y::~Y() bool Y::on_button_press_event(GdkEventButton *event) { - if (event->type == GDK_2BUTTON_PRESS){ + int w,h; + if ((event->type == GDK_BUTTON_PRESS) && (event->button == 3 )){ image = null; //como hago para actualizar????? 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); imgActual++; @@ -36,6 +37,8 @@ bool Y::on_button_press_event(GdkEventButton *event) imgActual = 0; image = imageN; } + get_size_request(w, h); + set_size_request(h, w); 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); } return true;