Handle clickable [url] tags in print_rich() editor output log
Since this uses `OS.shell_open()`, this allows the use of any standard URL including `file://` paths, `mailto:`, custom protocols set up by the user, etc.
This commit is contained in:
@ -192,6 +192,10 @@ void EditorLog::_load_state() {
|
||||
is_loading_state = false;
|
||||
}
|
||||
|
||||
void EditorLog::_meta_clicked(const String &p_meta) {
|
||||
OS::get_singleton()->shell_open(p_meta);
|
||||
}
|
||||
|
||||
void EditorLog::_clear_request() {
|
||||
log->clear();
|
||||
messages.clear();
|
||||
@ -407,6 +411,7 @@ EditorLog::EditorLog() {
|
||||
log->set_v_size_flags(SIZE_EXPAND_FILL);
|
||||
log->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
log->set_deselect_on_focus_loss_enabled(false);
|
||||
log->connect("meta_clicked", callable_mp(this, &EditorLog::_meta_clicked));
|
||||
vb_left->add_child(log);
|
||||
|
||||
// Search box
|
||||
|
||||
Reference in New Issue
Block a user