#include "guicast.h"
#include "mutex.inc"
#include "mwindow.inc"
+#include "question.h"
#include "preferences.inc"
#include "preferencesthread.inc"
const char* category_to_text(int category);
int text_to_category(const char *category);
+ const char *busy();
+
int current_dialog;
int thread_running;
int redraw_indexes;
int rerender;
int close_assets;
int reload_plugins;
+ int reset_caches;
PreferencesWindow *window;
MWindow *mwindow;
// Copy of mwindow preferences
int set_current_dialog(int number);
int update_framerate();
void update_rates();
+ void confirm_update(const char *reason, int close);
void show_dialog() { dialog->show_window(0); }
MWindow *mwindow;
PreferencesThread *thread;
ArrayList<BC_ListBoxItem*> categories;
PreferencesCategory *category;
PreferencesButton *category_button[CATEGORIES];
-
-private:
PreferencesDialog *dialog;
+ PreferencesConfirmDialog *confirm_dialog;
};
class PreferencesButton : public BC_GenericButton
{
public:
PreferencesOK(MWindow *mwindow, PreferencesThread *thread);
+ ~PreferencesOK();
int keypress_event();
int handle_event();
int resize_event(int w, int h);
MWindow *mwindow;
PreferencesThread *thread;
+ PreferencesConfirmDialog *confirm_dialog;
+};
+
+class PreferencesConfirmDialog : public BC_DialogThread
+{
+public:
+ PreferencesConfirmDialog(PreferencesThread *thread,
+ const char *reason, int close);
+ ~PreferencesConfirmDialog();
+ BC_Window *new_gui();
+ void handle_done_event(int result);
+
+ PreferencesThread *thread;
+ PreferencesConfirmWindow *qwindow;
+ char query[BCTEXTLEN];
+ int close;
};
+class PreferencesConfirmWindow : public QuestionWindow
+{
+public:
+ PreferencesConfirmWindow(PreferencesConfirmDialog *dialog);
+ ~PreferencesConfirmWindow();
+
+ PreferencesConfirmDialog *dialog;
+};
+
+
class PreferencesCancel : public BC_GenericButton
{
public: