44 if (arg == GTK_RESPONSE_YES) {
49 _(
"Can't load requested tileset."));
60 GtkWidget *dialog, *label;
63 dialog = gtk_dialog_new_with_buttons(
_(
"Preferred tileset"),
68 _(
"_Keep current tileset"),
72 gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_YES);
73 gtk_window_set_destroy_with_parent(GTK_WINDOW(dialog),
TRUE);
76 _(
"Modpack suggests using %s tileset.\n"
77 "It might not work with other tilesets.\n"
78 "You are currently using tileset %s."),
81 label = gtk_label_new(buf);
82 gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), label);
83 gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_CENTER);
84 gtk_widget_show(label);
86 g_signal_connect(dialog,
"response",
92 gtk_dialog_run(GTK_DIALOG(dialog));
94 gtk_widget_destroy(dialog);
void setup_dialog(GtkWidget *shell, GtkWidget *parent)
char forced_tileset_name[512]
void popup_tileset_suggestion_dialog(void)
static void tileset_suggestion_callback(GtkWidget *dlg, gint arg)
struct packet_ruleset_control control
char preferred_tileset[MAX_LEN_NAME]
int fc_snprintf(char *str, size_t n, const char *format,...)
#define sz_strlcpy(dest, src)
const char * tileset_basename(const struct tileset *t)
void tileset_error(enum log_level level, const char *tset_name, const char *format,...)
bool tilespec_reread(const char *new_tileset_name, bool game_fully_initialized, float scale)