Add keyboard shortcut for Clear Output
This commit is contained in:
parent
37aab45091
commit
77b4256718
1 changed files with 2 additions and 0 deletions
|
@ -29,6 +29,7 @@
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
#include "editor_log.h"
|
#include "editor_log.h"
|
||||||
|
|
||||||
|
#include "core/os/keyboard.h"
|
||||||
#include "editor_node.h"
|
#include "editor_node.h"
|
||||||
#include "scene/gui/center_container.h"
|
#include "scene/gui/center_container.h"
|
||||||
#include "scene/resources/dynamic_font.h"
|
#include "scene/resources/dynamic_font.h"
|
||||||
|
@ -154,6 +155,7 @@ EditorLog::EditorLog() {
|
||||||
clearbutton = memnew(Button);
|
clearbutton = memnew(Button);
|
||||||
hb->add_child(clearbutton);
|
hb->add_child(clearbutton);
|
||||||
clearbutton->set_text(TTR("Clear"));
|
clearbutton->set_text(TTR("Clear"));
|
||||||
|
clearbutton->set_shortcut(ED_SHORTCUT("editor/clear_output", TTR("Clear Output"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_K));
|
||||||
clearbutton->connect("pressed", this, "_clear_request");
|
clearbutton->connect("pressed", this, "_clear_request");
|
||||||
|
|
||||||
log = memnew(RichTextLabel);
|
log = memnew(RichTextLabel);
|
||||||
|
|
Loading…
Reference in a new issue