From 9686af58a908d981fc2136dd91ba5ffcf0c1682b Mon Sep 17 00:00:00 2001 From: daleclack Date: Sat, 30 Mar 2024 23:18:31 +0800 Subject: [PATCH] Replace title bar for game 24 --- Gtk4_Reset/src/game24_app/Game24App.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Gtk4_Reset/src/game24_app/Game24App.cpp b/Gtk4_Reset/src/game24_app/Game24App.cpp index 6c4a9bd..05ec672 100644 --- a/Gtk4_Reset/src/game24_app/Game24App.cpp +++ b/Gtk4_Reset/src/game24_app/Game24App.cpp @@ -1,12 +1,14 @@ #include "Game24.h" #include "Game24App.h" #include +#include "MyTitleBar.h" static Game24 main_game; struct _Game24App { GtkWindow parent_instance; + MyTitleBar *title_bar; GtkWidget *label_numbers; // Child widgets GtkWidget *entry_ans; GtkWidget *btnstart, *btnnext, *btnclear, @@ -107,6 +109,8 @@ static void game24_app_init(Game24App *self) gtk_widget_init_template(GTK_WIDGET(self)); gtk_window_set_title(GTK_WINDOW(self), "24 Game"); gtk_window_set_icon_name(GTK_WINDOW(self), "24game"); + self->title_bar = my_titlebar_new(); + my_titlebar_set_window(self->title_bar, self); // Default value to start game self->winned = TRUE;