| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
#pragma once |
| 32 |
|
| 33 |
#include "scene/gui/dialogs.h" |
| 34 |
|
| 35 |
class Button; |
| 36 |
class EditorSettingsDialog; |
| 37 |
class Label; |
| 38 |
class MarginContainer; |
| 39 |
class OptionButton; |
| 40 |
class PanelContainer; |
| 41 |
class VBoxContainer; |
| 42 |
|
| 43 |
class QuickSettingsDialog : public AcceptDialog { |
| 44 |
GDCLASS(QuickSettingsDialog, AcceptDialog); |
| 45 |
|
| 46 |
#ifndef ANDROID_ENABLED |
| 47 |
Vector<String> editor_languages; |
| 48 |
#endif |
| 49 |
Vector<String> editor_styles; |
| 50 |
Vector<String> editor_themes; |
| 51 |
Vector<String> editor_scales; |
| 52 |
Vector<String> editor_network_modes; |
| 53 |
Vector<String> editor_check_for_updates; |
| 54 |
Vector<String> editor_directory_naming_conventions; |
| 55 |
|
| 56 |
void _fetch_setting_values(); |
| 57 |
void _update_current_values(); |
| 58 |
|
| 59 |
PanelContainer *settings_list_panel = nullptr; |
| 60 |
VBoxContainer *settings_list = nullptr; |
| 61 |
|
| 62 |
void _add_setting_control(const String &p_text, Control *p_control); |
| 63 |
|
| 64 |
#ifndef ANDROID_ENABLED |
| 65 |
|
| 66 |
|
| 67 |
OptionButton *language_option_button = nullptr; |
| 68 |
#endif |
| 69 |
OptionButton *style_option_button = nullptr; |
| 70 |
OptionButton *theme_option_button = nullptr; |
| 71 |
OptionButton *scale_option_button = nullptr; |
| 72 |
OptionButton *network_mode_option_button = nullptr; |
| 73 |
OptionButton *check_for_update_button = nullptr; |
| 74 |
OptionButton *directory_naming_convention_button = nullptr; |
| 75 |
|
| 76 |
Label *custom_theme_label = nullptr; |
| 77 |
EditorSettingsDialog *editor_settings_dialog = nullptr; |
| 78 |
|
| 79 |
#ifndef ANDROID_ENABLED |
| 80 |
void _language_selected(int p_id); |
| 81 |
#endif |
| 82 |
void _style_selected(int p_id); |
| 83 |
void _theme_selected(int p_id); |
| 84 |
void _scale_selected(int p_id); |
| 85 |
void _network_mode_selected(int p_id); |
| 86 |
void _check_for_update_selected(int p_id); |
| 87 |
void _directory_naming_convention_selected(int p_id); |
| 88 |
void _set_setting_value(const String &p_setting, const Variant &p_value, bool p_restart_required = false); |
| 89 |
void _show_full_settings(); |
| 90 |
|
| 91 |
Label *restart_required_label = nullptr; |
| 92 |
Button *restart_required_button = nullptr; |
| 93 |
|
| 94 |
void _request_restart(); |
| 95 |
|
| 96 |
protected: |
| 97 |
void _notification(int p_what); |
| 98 |
static void _bind_methods(); |
| 99 |
|
| 100 |
public: |
| 101 |
void update_size_limits(const Size2 &p_max_popup_size); |
| 102 |
|
| 103 |
QuickSettingsDialog(); |
| 104 |
}; |