From d551a552124d6a6efc78b32767ffac8d2d5db001 Mon Sep 17 00:00:00 2001 From: daleclack Date: Sat, 30 Mar 2024 23:15:31 +0800 Subject: [PATCH] Replace title bar for Game App --- Gtk4_Reset/src/game_app/GameApp.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Gtk4_Reset/src/game_app/GameApp.cpp b/Gtk4_Reset/src/game_app/GameApp.cpp index 0fd46b3..b346468 100644 --- a/Gtk4_Reset/src/game_app/GameApp.cpp +++ b/Gtk4_Reset/src/game_app/GameApp.cpp @@ -1,10 +1,12 @@ #include "GameApp.h" #include #include +#include "MyTitleBar.h" struct _GameApp { GtkWindow parent_instance; + MyTitleBar *title_bar; GtkWidget *label; GtkWidget *btn_1, *btn_2, *btn_3, *btn_4; GtkWidget *btn_go, *btn_exit; @@ -81,6 +83,8 @@ static void game_app_init(GameApp *self) { // Initalize template gtk_widget_init_template(GTK_WIDGET(self)); + self->title_bar = my_titlebar_new(); + my_titlebar_set_window(self->title_bar, self); // Link Signals g_signal_connect(self->btn_1, "clicked", G_CALLBACK(btns_clicked), self);