mirror of
https://github.com/godotengine/godot.git
synced 2025-10-28 12:14:44 +00:00
Cleanup and bind remaing methods in TextEdit
This commit is contained in:
parent
0a32a6907b
commit
ae4dcb8918
9 changed files with 2570 additions and 2477 deletions
|
|
@ -427,9 +427,11 @@ void TextEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
|
|||
|
||||
if (mb.is_valid()) {
|
||||
if (mb->get_button_index() == MOUSE_BUTTON_RIGHT) {
|
||||
int col, row;
|
||||
CodeEdit *tx = code_editor->get_text_editor();
|
||||
tx->_get_mouse_pos(mb->get_global_position() - tx->get_global_position(), row, col);
|
||||
|
||||
Point2i pos = tx->get_line_column_at_pos(mb->get_global_position() - tx->get_global_position());
|
||||
int row = pos.y;
|
||||
int col = pos.x;
|
||||
|
||||
tx->set_move_caret_on_right_click_enabled(EditorSettings::get_singleton()->get("text_editor/cursor/right_click_moves_caret"));
|
||||
bool can_fold = tx->can_fold_line(row);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue