From d51fe99a8b6daa3ec6495a5b3e27b63d752c3783 Mon Sep 17 00:00:00 2001 From: supaiku Date: Thu, 6 Apr 2017 17:35:08 +0200 Subject: [PATCH] Fix highlight typo --- editor/editor_node.cpp | 2 +- editor/plugins/spatial_editor_plugin.cpp | 12 ++++++------ editor/plugins/spatial_editor_plugin.h | 2 +- scene/gui/text_edit.cpp | 22 +++++++++++----------- scene/gui/text_edit.h | 2 +- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 5b5f5001785..03a241855b4 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -1088,7 +1088,7 @@ void EditorNode::_dialog_action(String p_file) { GlobalConfig::get_singleton()->set("application/main_scene", p_file); GlobalConfig::get_singleton()->save(); - //would be nice to show the project manager opened with the hilighted field.. + //would be nice to show the project manager opened with the highlighted field.. } break; case FILE_SAVE_OPTIMIZED: { diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index c00652bc355..d642a3c468e 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -524,7 +524,7 @@ bool SpatialEditorViewport::_gizmo_select(const Vector2 &p_screenpos, bool p_hil return false; if (get_selected_count() == 0) { if (p_hilite_only) - spatial_editor->select_gizmo_hilight_axis(-1); + spatial_editor->select_gizmo_highlight_axis(-1); return false; } @@ -558,7 +558,7 @@ bool SpatialEditorViewport::_gizmo_select(const Vector2 &p_screenpos, bool p_hil if (p_hilite_only) { - spatial_editor->select_gizmo_hilight_axis(col_axis); + spatial_editor->select_gizmo_highlight_axis(col_axis); } else { //handle rotate @@ -598,7 +598,7 @@ bool SpatialEditorViewport::_gizmo_select(const Vector2 &p_screenpos, bool p_hil if (p_hilite_only) { - spatial_editor->select_gizmo_hilight_axis(col_axis + 3); + spatial_editor->select_gizmo_highlight_axis(col_axis + 3); } else { //handle rotate _edit.mode = TRANSFORM_ROTATE; @@ -610,7 +610,7 @@ bool SpatialEditorViewport::_gizmo_select(const Vector2 &p_screenpos, bool p_hil } if (p_hilite_only) - spatial_editor->select_gizmo_hilight_axis(-1); + spatial_editor->select_gizmo_highlight_axis(-1); return false; } @@ -1069,7 +1069,7 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) { spatial_editor->set_over_gizmo_handle(selected_handle); spatial_editor->get_selected()->update_gizmo(); if (selected_handle != -1) - spatial_editor->select_gizmo_hilight_axis(-1); + spatial_editor->select_gizmo_highlight_axis(-1); } } } @@ -2229,7 +2229,7 @@ SpatialEditorSelectedItem::~SpatialEditorSelectedItem() { VisualServer::get_singleton()->free(sbox_instance); } -void SpatialEditor::select_gizmo_hilight_axis(int p_axis) { +void SpatialEditor::select_gizmo_highlight_axis(int p_axis) { for (int i = 0; i < 3; i++) { diff --git a/editor/plugins/spatial_editor_plugin.h b/editor/plugins/spatial_editor_plugin.h index e0d2a389567..734057dc90f 100644 --- a/editor/plugins/spatial_editor_plugin.h +++ b/editor/plugins/spatial_editor_plugin.h @@ -484,7 +484,7 @@ public: void update_transform_gizmo(); - void select_gizmo_hilight_axis(int p_axis); + void select_gizmo_highlight_axis(int p_axis); void set_custom_camera(Node *p_camera) { custom_camera = p_camera; } void set_undo_redo(UndoRedo *p_undo_redo) { undo_redo = p_undo_redo; } diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 3b7ad910d65..7a7ce57ef73 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -812,8 +812,8 @@ void TextEdit::_notification(int p_what) { keyword_color = *col; } - if (select_identifiers_enabled && hilighted_word != String()) { - if (hilighted_word == range) { + if (select_identifiers_enabled && highlighted_word != String()) { + if (highlighted_word == range) { underlined = true; } } @@ -1463,9 +1463,9 @@ void TextEdit::_gui_input(const InputEvent &p_gui_input) { int row, col; _get_mouse_pos(Point2i(mb.x, mb.y), row, col); - if (mb.mod.command && hilighted_word != String()) { + if (mb.mod.command && highlighted_word != String()) { - emit_signal("symbol_lookup", hilighted_word, row, col); + emit_signal("symbol_lookup", highlighted_word, row, col); return; } @@ -1608,13 +1608,13 @@ void TextEdit::_gui_input(const InputEvent &p_gui_input) { if (mm.mod.command && mm.button_mask == 0) { String new_word = get_word_at_pos(Vector2(mm.x, mm.y)); - if (new_word != hilighted_word) { - hilighted_word = new_word; + if (new_word != highlighted_word) { + highlighted_word = new_word; update(); } } else { - if (hilighted_word != String()) { - hilighted_word = String(); + if (highlighted_word != String()) { + highlighted_word = String(); update(); } } @@ -1655,11 +1655,11 @@ void TextEdit::_gui_input(const InputEvent &p_gui_input) { if (k.pressed) { - hilighted_word = get_word_at_pos(get_local_mouse_pos()); + highlighted_word = get_word_at_pos(get_local_mouse_pos()); update(); } else { - hilighted_word = String(); + highlighted_word = String(); update(); } } @@ -3174,7 +3174,7 @@ void TextEdit::insert_text_at_cursor(const String &p_text) { } Control::CursorShape TextEdit::get_cursor_shape(const Point2 &p_pos) const { - if (hilighted_word != String()) + if (highlighted_word != String()) return CURSOR_POINTING_HAND; int gutter = cache.style_normal->get_margin(MARGIN_LEFT) + cache.line_number_w + cache.breakpoint_gutter_width; diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h index e38d484b0d1..4032cf25334 100644 --- a/scene/gui/text_edit.h +++ b/scene/gui/text_edit.h @@ -252,7 +252,7 @@ class TextEdit : public Control { bool raised_from_completion; - String hilighted_word; + String highlighted_word; uint64_t last_dblclk;