Remove duplicate editor settings definitions
This commit is contained in:
parent
ad76e071fa
commit
d088128b43
20 changed files with 50 additions and 52 deletions
|
@ -134,7 +134,7 @@ void Input::_bind_methods() {
|
|||
void Input::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const {
|
||||
#ifdef TOOLS_ENABLED
|
||||
|
||||
const String quote_style = EDITOR_DEF("text_editor/completion/use_single_quotes", false) ? "'" : "\"";
|
||||
const String quote_style = EDITOR_GET("text_editor/completion/use_single_quotes") ? "'" : "\"";
|
||||
|
||||
String pf = p_function;
|
||||
if (p_idx == 0 &&
|
||||
|
|
|
@ -6010,7 +6010,6 @@ EditorNode::EditorNode() {
|
|||
EDITOR_DEF("run/output/always_clear_output_on_play", true);
|
||||
EDITOR_DEF("run/output/always_open_output_on_play", true);
|
||||
EDITOR_DEF("run/output/always_close_output_on_stop", true);
|
||||
EDITOR_DEF("run/auto_save/save_before_running", true);
|
||||
EDITOR_DEF("interface/editor/save_on_focus_loss", false);
|
||||
EDITOR_DEF_RST("interface/editor/save_each_scene_on_quit", true);
|
||||
EDITOR_DEF("interface/editor/quit_confirmation", true);
|
||||
|
@ -6032,7 +6031,6 @@ EditorNode::EditorNode() {
|
|||
EDITOR_DEF("interface/inspector/resources_to_open_in_new_inspector", "Script,MeshLibrary,TileSet");
|
||||
EDITOR_DEF("interface/inspector/default_color_picker_mode", 0);
|
||||
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT, "interface/inspector/default_color_picker_mode", PROPERTY_HINT_ENUM, "RGB,HSV,RAW", PROPERTY_USAGE_DEFAULT));
|
||||
EDITOR_DEF("run/auto_save/save_before_running", true);
|
||||
EDITOR_DEF("version_control/username", "");
|
||||
EDITOR_DEF("version_control/ssh_public_key_path", "");
|
||||
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING, "version_control/ssh_public_key_path", PROPERTY_HINT_GLOBAL_FILE));
|
||||
|
|
|
@ -460,6 +460,8 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
|
|||
_initial_set("text_editor/files/trim_trailing_whitespace_on_save", false);
|
||||
_initial_set("text_editor/files/autosave_interval_secs", 0);
|
||||
_initial_set("text_editor/files/restore_scripts_on_load", true);
|
||||
_initial_set("text_editor/files/auto_reload_and_parse_scripts_on_save", true);
|
||||
_initial_set("text_editor/files/auto_reload_scripts_on_external_change", false);
|
||||
|
||||
// Tools
|
||||
_initial_set("text_editor/tools/create_signal_callbacks", true);
|
||||
|
@ -498,6 +500,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
|
|||
|
||||
// GridMap
|
||||
_initial_set("editors/grid_map/pick_distance", 5000.0);
|
||||
_initial_set("editors/grid_map/preview_size", 64);
|
||||
|
||||
// 3D
|
||||
_initial_set("editors/3d/primary_grid_color", Color(0.56, 0.56, 0.56, 0.5));
|
||||
|
@ -506,6 +509,9 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
|
|||
// Use a similar color to the 2D editor selection.
|
||||
_initial_set("editors/3d/selection_box_color", Color(1.0, 0.5, 0));
|
||||
hints["editors/3d/selection_box_color"] = PropertyInfo(Variant::COLOR, "editors/3d/selection_box_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
|
||||
_initial_set("editors/3d_gizmos/gizmo_colors/instanced", Color(0.7, 0.7, 0.7, 0.6));
|
||||
_initial_set("editors/3d_gizmos/gizmo_colors/joint", Color(0.5, 0.8, 1));
|
||||
_initial_set("editors/3d_gizmos/gizmo_colors/shape", Color(0.5, 0.7, 1));
|
||||
|
||||
// If a line is a multiple of this, it uses the primary grid color.
|
||||
// Use a power of 2 value by default as it's more common to use powers of 2 in level design.
|
||||
|
|
|
@ -297,8 +297,8 @@ void EditorFileServer::_thread_start(void *s) {
|
|||
|
||||
void EditorFileServer::start() {
|
||||
stop();
|
||||
port = EDITOR_DEF("filesystem/file_server/port", 6010);
|
||||
password = EDITOR_DEF("filesystem/file_server/password", "");
|
||||
port = EDITOR_GET("filesystem/file_server/port");
|
||||
password = EDITOR_GET("filesystem/file_server/password");
|
||||
cmd = CMD_ACTIVATE;
|
||||
}
|
||||
|
||||
|
|
|
@ -321,7 +321,6 @@ void MeshLibraryEditorPlugin::make_visible(bool p_visible) {
|
|||
}
|
||||
|
||||
MeshLibraryEditorPlugin::MeshLibraryEditorPlugin(EditorNode *p_node) {
|
||||
EDITOR_DEF("editors/grid_map/preview_size", 64);
|
||||
mesh_library_editor = memnew(MeshLibraryEditor(p_node));
|
||||
|
||||
p_node->get_viewport()->add_child(mesh_library_editor);
|
||||
|
|
|
@ -825,7 +825,7 @@ bool ScriptEditor::_test_script_times_on_disk(RES p_for_script) {
|
|||
|
||||
bool need_ask = false;
|
||||
bool need_reload = false;
|
||||
bool use_autoreload = bool(EDITOR_DEF("text_editor/files/auto_reload_scripts_on_external_change", false));
|
||||
bool use_autoreload = EDITOR_GET("text_editor/files/auto_reload_scripts_on_external_change");
|
||||
|
||||
for (int i = 0; i < tab_container->get_child_count(); i++) {
|
||||
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
|
||||
|
@ -2419,7 +2419,7 @@ void ScriptEditor::_editor_settings_changed() {
|
|||
_update_script_colors();
|
||||
_update_script_names();
|
||||
|
||||
ScriptServer::set_reload_scripts_on_save(EDITOR_DEF("text_editor/files/auto_reload_and_parse_scripts_on_save", true));
|
||||
ScriptServer::set_reload_scripts_on_save(EDITOR_GET("text_editor/files/auto_reload_and_parse_scripts_on_save"));
|
||||
}
|
||||
|
||||
void ScriptEditor::_autosave_scripts() {
|
||||
|
@ -3655,8 +3655,7 @@ ScriptEditorPlugin::ScriptEditorPlugin(EditorNode *p_node) {
|
|||
|
||||
script_editor->hide();
|
||||
|
||||
EDITOR_DEF("text_editor/files/auto_reload_scripts_on_external_change", true);
|
||||
ScriptServer::set_reload_scripts_on_save(EDITOR_DEF("text_editor/files/auto_reload_and_parse_scripts_on_save", true));
|
||||
ScriptServer::set_reload_scripts_on_save(EDITOR_GET("text_editor/files/auto_reload_and_parse_scripts_on_save"));
|
||||
EDITOR_DEF("text_editor/files/open_dominant_script_on_scene_change", true);
|
||||
EDITOR_DEF("text_editor/external/use_external_editor", false);
|
||||
EDITOR_DEF("text_editor/external/exec_path", "");
|
||||
|
|
|
@ -269,7 +269,7 @@ void ScriptTextEditor::_load_theme_settings() {
|
|||
text_edit->add_color_override("search_result_border_color", search_result_border_color);
|
||||
text_edit->add_color_override("symbol_color", symbol_color);
|
||||
|
||||
text_edit->add_constant_override("line_spacing", EDITOR_DEF("text_editor/theme/line_spacing", 6));
|
||||
text_edit->add_constant_override("line_spacing", EDITOR_GET("text_editor/theme/line_spacing"));
|
||||
|
||||
colors_cache.symbol_color = symbol_color;
|
||||
colors_cache.keyword_color = keyword_color;
|
||||
|
@ -1520,7 +1520,7 @@ void ScriptTextEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data
|
|||
}
|
||||
|
||||
if (d.has("type") && (String(d["type"]) == "files" || String(d["type"]) == "files_and_dirs")) {
|
||||
const String quote_style = EDITOR_DEF("text_editor/completion/use_single_quotes", false) ? "'" : "\"";
|
||||
const String quote_style = EDITOR_GET("text_editor/completion/use_single_quotes") ? "'" : "\"";
|
||||
Array files = d["files"];
|
||||
|
||||
String text_to_drop;
|
||||
|
@ -1573,7 +1573,7 @@ void ScriptTextEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data
|
|||
}
|
||||
|
||||
if (d.has("type") && String(d["type"]) == "obj_property") {
|
||||
const String quote_style = EDITOR_DEF("text_editor/completion/use_single_quotes", false) ? "'" : "\"";
|
||||
const String quote_style = EDITOR_GET("text_editor/completion/use_single_quotes") ? "'" : "\"";
|
||||
const String text_to_drop = String(d["property"]).c_escape().quote(quote_style);
|
||||
|
||||
te->cursor_set_line(row);
|
||||
|
|
|
@ -432,7 +432,7 @@ void ShaderEditor::_check_for_external_edit() {
|
|||
return;
|
||||
}
|
||||
|
||||
bool use_autoreload = bool(EDITOR_DEF("text_editor/files/auto_reload_scripts_on_external_change", false));
|
||||
bool use_autoreload = EDITOR_GET("text_editor/files/auto_reload_scripts_on_external_change");
|
||||
if (shader->get_last_modified_time() != FileAccess::get_modified_time(shader->get_path())) {
|
||||
if (use_autoreload) {
|
||||
_reload_shader_from_disk();
|
||||
|
|
|
@ -6529,9 +6529,9 @@ void SpatialEditor::_bind_methods() {
|
|||
}
|
||||
|
||||
void SpatialEditor::clear() {
|
||||
settings_fov->set_value(EDITOR_DEF("editors/3d/default_fov", 70.0));
|
||||
settings_znear->set_value(EDITOR_DEF("editors/3d/default_z_near", 0.05));
|
||||
settings_zfar->set_value(EDITOR_DEF("editors/3d/default_z_far", 1500.0));
|
||||
settings_fov->set_value(EDITOR_GET("editors/3d/default_fov"));
|
||||
settings_znear->set_value(EDITOR_GET("editors/3d/default_z_near"));
|
||||
settings_zfar->set_value(EDITOR_GET("editors/3d/default_z_far"));
|
||||
|
||||
for (uint32_t i = 0; i < VIEWPORTS_COUNT; i++) {
|
||||
viewports[i]->reset();
|
||||
|
@ -6852,21 +6852,21 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
|
|||
settings_fov->set_max(MAX_FOV);
|
||||
settings_fov->set_min(MIN_FOV);
|
||||
settings_fov->set_step(0.01);
|
||||
settings_fov->set_value(EDITOR_DEF("editors/3d/default_fov", 70.0));
|
||||
settings_fov->set_value(EDITOR_GET("editors/3d/default_fov"));
|
||||
settings_vbc->add_margin_child(TTR("Perspective FOV (deg.):"), settings_fov);
|
||||
|
||||
settings_znear = memnew(SpinBox);
|
||||
settings_znear->set_max(MAX_Z);
|
||||
settings_znear->set_min(MIN_Z);
|
||||
settings_znear->set_step(0.01);
|
||||
settings_znear->set_value(EDITOR_DEF("editors/3d/default_z_near", 0.05));
|
||||
settings_znear->set_value(EDITOR_GET("editors/3d/default_z_near"));
|
||||
settings_vbc->add_margin_child(TTR("View Z-Near:"), settings_znear);
|
||||
|
||||
settings_zfar = memnew(SpinBox);
|
||||
settings_zfar->set_max(MAX_Z);
|
||||
settings_zfar->set_min(MIN_Z);
|
||||
settings_zfar->set_step(0.01);
|
||||
settings_zfar->set_value(EDITOR_DEF("editors/3d/default_z_far", 1500));
|
||||
settings_zfar->set_value(EDITOR_GET("editors/3d/default_z_far"));
|
||||
settings_vbc->add_margin_child(TTR("View Z-Far:"), settings_zfar);
|
||||
|
||||
for (uint32_t i = 0; i < VIEWPORTS_COUNT; ++i) {
|
||||
|
@ -7085,7 +7085,7 @@ SpatialEditorPlugin::~SpatialEditorPlugin() {
|
|||
}
|
||||
|
||||
void EditorSpatialGizmoPlugin::create_material(const String &p_name, const Color &p_color, bool p_billboard, bool p_on_top, bool p_use_vertex_color) {
|
||||
Color instanced_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/instanced", Color(0.7, 0.7, 0.7, 0.6));
|
||||
Color instanced_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/instanced");
|
||||
|
||||
Vector<Ref<SpatialMaterial>> mats;
|
||||
|
||||
|
@ -7126,7 +7126,7 @@ void EditorSpatialGizmoPlugin::create_material(const String &p_name, const Color
|
|||
}
|
||||
|
||||
void EditorSpatialGizmoPlugin::create_icon_material(const String &p_name, const Ref<Texture> &p_texture, bool p_on_top, const Color &p_albedo) {
|
||||
Color instanced_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/instanced", Color(0.7, 0.7, 0.7, 0.6));
|
||||
Color instanced_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/instanced");
|
||||
|
||||
Vector<Ref<SpatialMaterial>> icons;
|
||||
|
||||
|
|
|
@ -135,7 +135,7 @@ void TextEditor::_load_theme_settings() {
|
|||
text_edit->add_color_override("search_result_border_color", search_result_border_color);
|
||||
text_edit->add_color_override("symbol_color", symbol_color);
|
||||
|
||||
text_edit->add_constant_override("line_spacing", EDITOR_DEF("text_editor/theme/line_spacing", 6));
|
||||
text_edit->add_constant_override("line_spacing", EDITOR_GET("text_editor/theme/line_spacing"));
|
||||
|
||||
colors_cache.font_color = text_color;
|
||||
colors_cache.symbol_color = symbol_color;
|
||||
|
|
|
@ -1798,7 +1798,7 @@ void SkeletonSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
|
|||
////
|
||||
|
||||
PhysicalBoneSpatialGizmoPlugin::PhysicalBoneSpatialGizmoPlugin() {
|
||||
create_material("joint_material", EDITOR_DEF("editors/3d_gizmos/gizmo_colors/joint", Color(0.5, 0.8, 1)));
|
||||
create_material("joint_material", EDITOR_GET("editors/3d_gizmos/gizmo_colors/joint"));
|
||||
}
|
||||
|
||||
bool PhysicalBoneSpatialGizmoPlugin::has_gizmo(Spatial *p_spatial) {
|
||||
|
@ -1931,7 +1931,7 @@ void PhysicalBoneSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
|
|||
/////
|
||||
|
||||
RayCastSpatialGizmoPlugin::RayCastSpatialGizmoPlugin() {
|
||||
const Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/shape", Color(0.5, 0.7, 1));
|
||||
const Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/shape");
|
||||
create_material("shape_material", gizmo_color);
|
||||
const float gizmo_value = gizmo_color.get_v();
|
||||
const Color gizmo_color_disabled = Color(gizmo_value, gizmo_value, gizmo_value, 0.65);
|
||||
|
@ -1985,7 +1985,7 @@ void SpringArmSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
|
|||
}
|
||||
|
||||
SpringArmSpatialGizmoPlugin::SpringArmSpatialGizmoPlugin() {
|
||||
Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/shape", Color(0.5, 0.7, 1));
|
||||
Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/shape");
|
||||
create_material("shape_material", gizmo_color);
|
||||
}
|
||||
|
||||
|
@ -2004,7 +2004,7 @@ int SpringArmSpatialGizmoPlugin::get_priority() const {
|
|||
/////
|
||||
|
||||
VehicleWheelSpatialGizmoPlugin::VehicleWheelSpatialGizmoPlugin() {
|
||||
Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/shape", Color(0.5, 0.7, 1));
|
||||
Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/shape");
|
||||
create_material("shape_material", gizmo_color);
|
||||
}
|
||||
|
||||
|
@ -2075,7 +2075,7 @@ void VehicleWheelSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
|
|||
///////////
|
||||
|
||||
SoftBodySpatialGizmoPlugin::SoftBodySpatialGizmoPlugin() {
|
||||
Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/shape", Color(0.5, 0.7, 1));
|
||||
Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/shape");
|
||||
create_material("shape_material", gizmo_color);
|
||||
create_handle_material("handles");
|
||||
}
|
||||
|
@ -2994,7 +2994,7 @@ void BakedIndirectLightGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
|
|||
////
|
||||
|
||||
CollisionObjectGizmoPlugin::CollisionObjectGizmoPlugin() {
|
||||
const Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/shape", Color(0.5, 0.7, 1));
|
||||
const Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/shape");
|
||||
create_material("shape_material", gizmo_color);
|
||||
const float gizmo_value = gizmo_color.get_v();
|
||||
const Color gizmo_color_disabled = Color(gizmo_value, gizmo_value, gizmo_value, 0.65);
|
||||
|
@ -3045,7 +3045,7 @@ void CollisionObjectGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
|
|||
////
|
||||
|
||||
CollisionShapeSpatialGizmoPlugin::CollisionShapeSpatialGizmoPlugin() {
|
||||
const Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/shape", Color(0.5, 0.7, 1));
|
||||
const Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/shape");
|
||||
create_material("shape_material", gizmo_color);
|
||||
const float gizmo_value = gizmo_color.get_v();
|
||||
const Color gizmo_color_disabled = Color(gizmo_value, gizmo_value, gizmo_value, 0.65);
|
||||
|
@ -3643,7 +3643,7 @@ void CollisionShapeSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
|
|||
/////
|
||||
|
||||
CollisionPolygonSpatialGizmoPlugin::CollisionPolygonSpatialGizmoPlugin() {
|
||||
const Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/shape", Color(0.5, 0.7, 1));
|
||||
const Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/shape");
|
||||
create_material("shape_material", gizmo_color);
|
||||
const float gizmo_value = gizmo_color.get_v();
|
||||
const Color gizmo_color_disabled = Color(gizmo_value, gizmo_value, gizmo_value, 0.65);
|
||||
|
@ -4042,7 +4042,7 @@ void JointGizmosDrawer::draw_cone(const Transform &p_offset, const Basis &p_base
|
|||
////
|
||||
|
||||
JointSpatialGizmoPlugin::JointSpatialGizmoPlugin() {
|
||||
create_material("joint_material", EDITOR_DEF("editors/3d_gizmos/gizmo_colors/joint", Color(0.5, 0.8, 1)));
|
||||
create_material("joint_material", EDITOR_GET("editors/3d_gizmos/gizmo_colors/joint"));
|
||||
create_material("joint_body_a_material", EDITOR_DEF("editors/3d_gizmos/gizmo_colors/joint_body_a", Color(0.6, 0.8, 1)));
|
||||
create_material("joint_body_b_material", EDITOR_DEF("editors/3d_gizmos/gizmo_colors/joint_body_b", Color(0.6, 0.9, 1)));
|
||||
|
||||
|
|
|
@ -493,7 +493,7 @@ struct GDScriptCompletionIdentifier {
|
|||
};
|
||||
|
||||
static void _get_directory_contents(EditorFileSystemDirectory *p_dir, Map<String, ScriptCodeCompletionOption> &r_list, String p_ends_with = "") {
|
||||
const String quote_style = EDITOR_DEF("text_editor/completion/use_single_quotes", false) ? "'" : "\"";
|
||||
const String quote_style = EDITOR_GET("text_editor/completion/use_single_quotes") ? "'" : "\"";
|
||||
|
||||
for (int i = 0; i < p_dir->get_file_count(); i++) {
|
||||
ScriptCodeCompletionOption option(p_dir->get_file_path(i), ScriptCodeCompletionOption::KIND_FILE_PATH);
|
||||
|
@ -2239,7 +2239,7 @@ static void _find_call_arguments(const GDScriptCompletionContext &p_context, con
|
|||
Variant base = p_base.value;
|
||||
GDScriptParser::DataType base_type = p_base.type;
|
||||
|
||||
const String quote_style = EDITOR_DEF("text_editor/completion/use_single_quotes", false) ? "'" : "\"";
|
||||
const String quote_style = EDITOR_GET("text_editor/completion/use_single_quotes") ? "'" : "\"";
|
||||
|
||||
#define IS_METHOD_SIGNAL(m_method) (m_method == "connect" || m_method == "disconnect" || m_method == "is_connected" || m_method == "emit_signal")
|
||||
|
||||
|
@ -2408,7 +2408,7 @@ static void _find_call_arguments(const GDScriptCompletionContext &p_context, con
|
|||
}
|
||||
|
||||
static void _find_call_arguments(GDScriptCompletionContext &p_context, const GDScriptParser::Node *p_node, int p_argidx, Map<String, ScriptCodeCompletionOption> &r_result, bool &r_forced, String &r_arghint) {
|
||||
const String quote_style = EDITOR_DEF("text_editor/completion/use_single_quotes", false) ? "'" : "\"";
|
||||
const String quote_style = EDITOR_GET("text_editor/completion/use_single_quotes") ? "'" : "\"";
|
||||
|
||||
if (!p_node || p_node->type != GDScriptParser::Node::TYPE_OPERATOR) {
|
||||
return;
|
||||
|
@ -2536,7 +2536,7 @@ static void _find_call_arguments(GDScriptCompletionContext &p_context, const GDS
|
|||
}
|
||||
|
||||
Error GDScriptLanguage::complete_code(const String &p_code, const String &p_path, Object *p_owner, List<ScriptCodeCompletionOption> *r_options, bool &r_forced, String &r_call_hint) {
|
||||
const String quote_style = EDITOR_DEF("text_editor/completion/use_single_quotes", false) ? "'" : "\"";
|
||||
const String quote_style = EDITOR_GET("text_editor/completion/use_single_quotes") ? "'" : "\"";
|
||||
|
||||
GDScriptParser parser;
|
||||
|
||||
|
@ -3032,10 +3032,10 @@ Error GDScriptLanguage::complete_code(const String &p_code, const String &p_path
|
|||
String GDScriptLanguage::_get_indentation() const {
|
||||
#ifdef TOOLS_ENABLED
|
||||
if (Engine::get_singleton()->is_editor_hint()) {
|
||||
bool use_space_indentation = EDITOR_DEF("text_editor/indent/type", false);
|
||||
bool use_space_indentation = EDITOR_GET("text_editor/indent/type");
|
||||
|
||||
if (use_space_indentation) {
|
||||
int indent_size = EDITOR_DEF("text_editor/indent/size", 4);
|
||||
int indent_size = EDITOR_GET("text_editor/indent/size");
|
||||
|
||||
String space_indent = "";
|
||||
for (int i = 0; i < indent_size; i++) {
|
||||
|
|
|
@ -285,7 +285,7 @@ Dictionary GDScriptTextDocument::resolve(const Dictionary &p_params) {
|
|||
}
|
||||
} else if (item.kind == lsp::CompletionItemKind::Event) {
|
||||
if (params.context.triggerKind == lsp::CompletionTriggerKind::TriggerCharacter && (params.context.triggerCharacter == "(")) {
|
||||
const String quote_style = EDITOR_DEF("text_editor/completion/use_single_quotes", false) ? "'" : "\"";
|
||||
const String quote_style = EDITOR_GET("text_editor/completion/use_single_quotes") ? "'" : "\"";
|
||||
item.insertText = quote_style + item.label + quote_style;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -833,7 +833,7 @@ void GridMapEditor::_icon_size_changed(float p_value) {
|
|||
void GridMapEditor::update_palette() {
|
||||
int selected = mesh_library_palette->get_current();
|
||||
|
||||
float min_size = EDITOR_DEF("editors/grid_map/preview_size", 64);
|
||||
float min_size = EDITOR_GET("editors/grid_map/preview_size");
|
||||
min_size *= EDSCALE;
|
||||
|
||||
mesh_library_palette->clear();
|
||||
|
@ -1315,8 +1315,6 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) {
|
|||
size_slider->connect("value_changed", this, "_icon_size_changed");
|
||||
add_child(size_slider);
|
||||
|
||||
EDITOR_DEF("editors/grid_map/preview_size", 64);
|
||||
|
||||
display_mode = DISPLAY_THUMBNAIL;
|
||||
|
||||
mesh_library_palette = memnew(ItemList);
|
||||
|
|
|
@ -506,10 +506,10 @@ String CSharpLanguage::make_function(const String &, const String &, const PoolS
|
|||
String CSharpLanguage::_get_indentation() const {
|
||||
#ifdef TOOLS_ENABLED
|
||||
if (Engine::get_singleton()->is_editor_hint()) {
|
||||
bool use_space_indentation = EDITOR_DEF("text_editor/indent/type", 0);
|
||||
bool use_space_indentation = EDITOR_GET("text_editor/indent/type");
|
||||
|
||||
if (use_space_indentation) {
|
||||
int indent_size = EDITOR_DEF("text_editor/indent/size", 4);
|
||||
int indent_size = EDITOR_GET("text_editor/indent/size");
|
||||
|
||||
String space_indent = "";
|
||||
for (int i = 0; i < indent_size; i++) {
|
||||
|
|
|
@ -1495,7 +1495,7 @@ NodePath AnimationPlayer::get_root() const {
|
|||
|
||||
void AnimationPlayer::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const {
|
||||
#ifdef TOOLS_ENABLED
|
||||
const String quote_style = EDITOR_DEF("text_editor/completion/use_single_quotes", 0) ? "'" : "\"";
|
||||
const String quote_style = EDITOR_GET("text_editor/completion/use_single_quotes") ? "'" : "\"";
|
||||
#else
|
||||
const String quote_style = "\"";
|
||||
#endif
|
||||
|
|
|
@ -2546,7 +2546,7 @@ bool Control::is_visibility_clip_disabled() const {
|
|||
|
||||
void Control::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const {
|
||||
#ifdef TOOLS_ENABLED
|
||||
const String quote_style = EDITOR_DEF("text_editor/completion/use_single_quotes", 0) ? "'" : "\"";
|
||||
const String quote_style = EDITOR_GET("text_editor/completion/use_single_quotes") ? "'" : "\"";
|
||||
#else
|
||||
const String quote_style = "\"";
|
||||
#endif
|
||||
|
|
|
@ -751,9 +751,8 @@ void LineEdit::_notification(int p_what) {
|
|||
case NOTIFICATION_ENTER_TREE: {
|
||||
#ifdef TOOLS_ENABLED
|
||||
if (Engine::get_singleton()->is_editor_hint() && !get_tree()->is_node_being_edited(this)) {
|
||||
EDITOR_DEF("text_editor/cursor/caret_blink", false);
|
||||
cursor_set_blink_enabled(EditorSettings::get_singleton()->is_caret_blink_active());
|
||||
cursor_set_blink_speed(EDITOR_DEF("text_editor/cursor/caret_blink_speed", 0.65));
|
||||
cursor_set_blink_speed(EDITOR_GET("text_editor/cursor/caret_blink_speed"));
|
||||
|
||||
if (!EditorSettings::get_singleton()->is_connected("settings_changed", this, "_editor_settings_changed")) {
|
||||
EditorSettings::get_singleton()->connect("settings_changed", this, "_editor_settings_changed");
|
||||
|
@ -1777,9 +1776,8 @@ PopupMenu *LineEdit::get_menu() const {
|
|||
|
||||
void LineEdit::_editor_settings_changed() {
|
||||
#ifdef TOOLS_ENABLED
|
||||
EDITOR_DEF("text_editor/cursor/caret_blink", false);
|
||||
cursor_set_blink_enabled(EditorSettings::get_singleton()->is_caret_blink_active());
|
||||
cursor_set_blink_speed(EDITOR_DEF("text_editor/cursor/caret_blink_speed", 0.65));
|
||||
cursor_set_blink_speed(EDITOR_GET("text_editor/cursor/caret_blink_speed"));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -2728,7 +2728,7 @@ NodePath Node::get_import_path() const {
|
|||
|
||||
static void _add_nodes_to_options(const Node *p_base, const Node *p_node, List<String> *r_options) {
|
||||
#ifdef TOOLS_ENABLED
|
||||
const String quote_style = EDITOR_DEF("text_editor/completion/use_single_quotes", 0) ? "'" : "\"";
|
||||
const String quote_style = EDITOR_GET("text_editor/completion/use_single_quotes") ? "'" : "\"";
|
||||
#else
|
||||
const String quote_style = "\"";
|
||||
#endif
|
||||
|
|
|
@ -233,7 +233,7 @@ void ShaderMaterial::_bind_methods() {
|
|||
|
||||
void ShaderMaterial::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const {
|
||||
#ifdef TOOLS_ENABLED
|
||||
const String quote_style = EDITOR_DEF("text_editor/completion/use_single_quotes", 0) ? "'" : "\"";
|
||||
const String quote_style = EDITOR_GET("text_editor/completion/use_single_quotes") ? "'" : "\"";
|
||||
#else
|
||||
const String quote_style = "\"";
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue