Code Editor: Add button to toggle between search and search+replace modes

This commit is contained in:
Elliot Fontaine
2024-09-07 15:14:38 +02:00
parent 5675c76461
commit 86762f0a03
2 changed files with 25 additions and 0 deletions

View File

@ -70,6 +70,7 @@ class FindReplaceBar : public HBoxContainer {
SEARCH_PREV,
};
Button *toggle_replace_button = nullptr;
LineEdit *search_text = nullptr;
Label *matches_label = nullptr;
Button *find_prev = nullptr;
@ -106,12 +107,14 @@ class FindReplaceBar : public HBoxContainer {
void _show_search(bool p_with_replace, bool p_show_only);
void _hide_bar(bool p_force_focus = false);
void _update_toggle_replace_button(bool p_replace_visible);
void _editor_text_changed();
void _search_options_changed(bool p_pressed);
void _search_text_changed(const String &p_text);
void _search_text_submitted(const String &p_text);
void _replace_text_submitted(const String &p_text);
void _toggle_replace_pressed();
protected:
void _notification(int p_what);