From 881d9f44da5ca434819502b10bfece9bc5f950d4 Mon Sep 17 00:00:00 2001 From: Aaron Mueller Date: Wed, 7 Dec 2011 21:42:42 +0100 Subject: [PATCH] Fix a display issue with the wires --- editor/src/display.c | 2 +- editor/src/event_callbacks.c | 7 ++++++- editor/src/main.c | 2 +- editor/src/main_gui.glade | 1 + 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/editor/src/display.c b/editor/src/display.c index 887024d..b12ae13 100644 --- a/editor/src/display.c +++ b/editor/src/display.c @@ -92,8 +92,8 @@ void display() { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); setScene(); - drawLEDs(RENDER_MODE); drawWires(); + drawLEDs(RENDER_MODE); } // Picking function diff --git a/editor/src/event_callbacks.c b/editor/src/event_callbacks.c index 45fa5ab..6d05df9 100644 --- a/editor/src/event_callbacks.c +++ b/editor/src/event_callbacks.c @@ -16,7 +16,7 @@ gboolean on_drawing_area_configure_event(GtkWidget *widget, GdkEventConfigure *e if (!gdk_gl_drawable_gl_begin(glDrawable, glContext)) return FALSE; setScene(); - + gdk_gl_drawable_gl_end(glDrawable); return FALSE; } @@ -45,3 +45,8 @@ void on_drawing_area_realize(GtkWidget *widget, gpointer data) { gdk_gl_drawable_gl_end(glDrawable); } + +void on_drawing_area_key_press_event(GtkWidget *widget, gpointer data) { + g_print("pressed"); +} + diff --git a/editor/src/main.c b/editor/src/main.c index fc12acb..d1a7741 100644 --- a/editor/src/main.c +++ b/editor/src/main.c @@ -73,7 +73,7 @@ int main(int argc, char *argv[]) { drawingArea = glade_xml_get_widget(xml, "drawing_area"); gtk_widget_set_gl_capability(drawingArea, glConfig, NULL, TRUE, GDK_GL_RGBA_TYPE); - + gtk_widget_show(window); gtk_main(); diff --git a/editor/src/main_gui.glade b/editor/src/main_gui.glade index 0f4f4ce..0bf1120 100644 --- a/editor/src/main_gui.glade +++ b/editor/src/main_gui.glade @@ -101,6 +101,7 @@ 500 True +