You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
[macOS/Windows] Add Emoji & Symbols context menu item to LineEdit/TextEdit to show system character picker.
This commit is contained in:
@@ -481,6 +481,9 @@ void TextEditor::_edit_option(int p_op) {
|
||||
case BOOKMARK_REMOVE_ALL: {
|
||||
code_editor->remove_all_bookmarks();
|
||||
} break;
|
||||
case EDIT_EMOJI_AND_SYMBOL: {
|
||||
code_editor->get_text_editor()->show_emoji_and_symbol_picker();
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -560,6 +563,10 @@ void TextEditor::_prepare_edit_menu() {
|
||||
|
||||
void TextEditor::_make_context_menu(bool p_selection, bool p_can_fold, bool p_is_folded, Vector2 p_position) {
|
||||
context_menu->clear();
|
||||
if (DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_EMOJI_AND_SYMBOL_PICKER)) {
|
||||
context_menu->add_item(TTR("Emoji & Symbols"), EDIT_EMOJI_AND_SYMBOL);
|
||||
context_menu->add_separator();
|
||||
}
|
||||
if (p_selection) {
|
||||
context_menu->add_shortcut(ED_GET_SHORTCUT("ui_cut"), EDIT_CUT);
|
||||
context_menu->add_shortcut(ED_GET_SHORTCUT("ui_copy"), EDIT_COPY);
|
||||
|
||||
Reference in New Issue
Block a user