56 lines
1.3 KiB
C++
56 lines
1.3 KiB
C++
#ifndef DLG_MAIN_MENU
|
|
#define DLG_MAIN_MENU
|
|
|
|
#include "Dialog.h"
|
|
#include "Button.h"
|
|
#include "DropDownList.h"
|
|
#include "Checkbox.h"
|
|
|
|
#include <SDL3/SDL.h>
|
|
|
|
#include <vector>
|
|
|
|
using namespace std;
|
|
|
|
class DlgMainMenu : public Dialog {
|
|
private:
|
|
vector<Dialog *> dialogs;
|
|
|
|
Checkbox *always_on_top_checkbox;
|
|
Checkbox *enable_sound_checkbox;
|
|
Checkbox *open_menu_on_start_checkbox;
|
|
Checkbox *run_away_from_mouse_checkbox;
|
|
DropDownList *skin_list;
|
|
|
|
bool app_exit;
|
|
bool show_menu;
|
|
vector<string> settings_changed_list;
|
|
|
|
SDL_Surface *preview_sfe;
|
|
public:
|
|
DlgMainMenu();
|
|
~DlgMainMenu();
|
|
void draw();
|
|
bool onMousePress(int x, int y);
|
|
bool onMouseRelease(int x, int y);
|
|
void readSettings();
|
|
void writeSettings();
|
|
static void contCallback(void *p, Item *i);
|
|
void cont();
|
|
static void quitCallback(void *p, Item *i);
|
|
void quit();
|
|
static void settingsChangedCallback(void *p, Item *i);
|
|
void settingsChanged(Item *i);
|
|
void setAppExit(bool app_exit);
|
|
bool isAppExit();
|
|
bool isAlwaysOnTop();
|
|
bool isEnableSound();
|
|
bool isRunAwayFromMouse();
|
|
string getSkin();
|
|
string getChangedSetting();
|
|
void setPreviewSurface(SDL_Surface *preview_sfe);
|
|
bool loadBackground();
|
|
};
|
|
|
|
#endif
|