43 if (arg == GTK_RESPONSE_YES) {
48 _(
"Can't load requested tileset."));
59 GtkWidget *dialog, *label;
62 dialog = gtk_dialog_new_with_buttons(
_(
"Preferred tileset"),
67 _(
"_Keep current tileset"),
71 gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_YES);
72 gtk_window_set_destroy_with_parent(GTK_WINDOW(dialog),
TRUE);
75 _(
"Modpack suggests using %s tileset.\n"
76 "It might not work with other tilesets.\n"
77 "You are currently using tileset %s."),
80 label = gtk_label_new(buf);
81 gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), label);
82 gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_CENTER);
83 gtk_widget_show(label);
85 g_signal_connect(dialog,
"response",
91 gtk_dialog_run(GTK_DIALOG(dialog));
93 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)