Path: blob/master/editor/project_manager/quick_settings_dialog.h
21138 views
/**************************************************************************/1/* quick_settings_dialog.h */2/**************************************************************************/3/* This file is part of: */4/* GODOT ENGINE */5/* https://godotengine.org */6/**************************************************************************/7/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */8/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */9/* */10/* Permission is hereby granted, free of charge, to any person obtaining */11/* a copy of this software and associated documentation files (the */12/* "Software"), to deal in the Software without restriction, including */13/* without limitation the rights to use, copy, modify, merge, publish, */14/* distribute, sublicense, and/or sell copies of the Software, and to */15/* permit persons to whom the Software is furnished to do so, subject to */16/* the following conditions: */17/* */18/* The above copyright notice and this permission notice shall be */19/* included in all copies or substantial portions of the Software. */20/* */21/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */22/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */23/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */24/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */25/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */26/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */27/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */28/**************************************************************************/2930#pragma once3132#include "scene/gui/dialogs.h"3334class Button;35class EditorSettingsDialog;36class Label;37class MarginContainer;38class OptionButton;39class PanelContainer;40class VBoxContainer;4142class QuickSettingsDialog : public AcceptDialog {43GDCLASS(QuickSettingsDialog, AcceptDialog);4445#ifndef ANDROID_ENABLED46Vector<String> editor_languages;47#endif48Vector<String> editor_styles;49Vector<String> editor_themes;50Vector<String> editor_scales;51Vector<String> editor_network_modes;52Vector<String> editor_check_for_updates;53Vector<String> editor_directory_naming_conventions;5455void _fetch_setting_values();56void _update_current_values();5758PanelContainer *settings_list_panel = nullptr;59VBoxContainer *settings_list = nullptr;6061void _add_setting_control(const String &p_text, Control *p_control);6263#ifndef ANDROID_ENABLED64// The language selection dropdown doesn't work on Android (as the setting isn't saved), see GH-60353.65// Also, the dropdown it spawns is very tall and can't be scrolled without a hardware mouse.66OptionButton *language_option_button = nullptr;67#endif68OptionButton *style_option_button = nullptr;69OptionButton *theme_option_button = nullptr;70OptionButton *scale_option_button = nullptr;71OptionButton *network_mode_option_button = nullptr;72OptionButton *check_for_update_button = nullptr;73OptionButton *directory_naming_convention_button = nullptr;7475Label *custom_theme_label = nullptr;76EditorSettingsDialog *editor_settings_dialog = nullptr;7778#ifndef ANDROID_ENABLED79void _language_selected(int p_id);80#endif81void _style_selected(int p_id);82void _theme_selected(int p_id);83void _scale_selected(int p_id);84void _network_mode_selected(int p_id);85void _check_for_update_selected(int p_id);86void _directory_naming_convention_selected(int p_id);87void _set_setting_value(const String &p_setting, const Variant &p_value, bool p_restart_required = false);88void _show_full_settings();8990Label *restart_required_label = nullptr;91Button *restart_required_button = nullptr;9293void _request_restart();9495protected:96void _notification(int p_what);97static void _bind_methods();9899public:100void update_size_limits(const Size2 &p_max_popup_size);101102QuickSettingsDialog();103};104105106