diff --git a/engine/gf_draw_common.c b/engine/gf_draw_common.c index b89bd76..220fd8b 100644 --- a/engine/gf_draw_common.c +++ b/engine/gf_draw_common.c @@ -91,11 +91,16 @@ gf_draw_t* gf_draw_create(gf_engine_t* engine, const char* title) { void gf_draw_reshape(gf_draw_t* draw) { gf_draw_driver_reshape(draw); } +gf_gui_id_t button = -1; + /* Runs every frame */ void gf_draw_frame(gf_draw_t* draw) { gf_graphic_color_t color; color.r = color.g = color.b = color.a = 255; - if(!draw->draw_3d) { + if(button == -1) { + button = gf_gui_create_button(draw->gui, 0, 0, 200, 100, "Test"); + } + if(draw->draw_3d) { gf_graphic_draw_texture_polygon(draw, test_texture, color, GF_GRAPHIC_3D, 4, /* clang-format off */ 0.0, 0.0, @@ -112,6 +117,7 @@ void gf_draw_frame(gf_draw_t* draw) { /* clang-format on */ ); } + gf_gui_render(draw->gui); } int gf_draw_step(gf_draw_t* draw) { diff --git a/misc/relation.gv b/misc/relation.gv index 9bdb86d..1f2a7e4 100644 --- a/misc/relation.gv +++ b/misc/relation.gv @@ -76,6 +76,9 @@ digraph relation { subgraph cluster_client { label = "Client Interface"; + ct [ + label = "gf_client_t" + ]; gui [ label = "GUI" ]; @@ -110,6 +113,9 @@ digraph relation { subgraph cluster_server { label = "Server Interface"; + st [ + label = "gf_server_t" + ]; subgraph cluster_physics { label = "Physics Interface"; @@ -158,12 +164,18 @@ digraph relation { uf -> gf; // Engine - gf -> dt; + gf -> ct; - gf -> pt; + gf -> st; gf -> log; + // Client + ct -> dt; + + // Server + st -> pt; + // Log log -> dt; diff --git a/misc/relation.png b/misc/relation.png index dbc77e5..b2cc524 100644 Binary files a/misc/relation.png and b/misc/relation.png differ