You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
Added "Clear" button top right of output debug console in editor
This commit is contained in:
@@ -104,6 +104,13 @@ void EditorLog::_close_request() {
|
||||
}
|
||||
|
||||
|
||||
void EditorLog::_clear_request() {
|
||||
|
||||
log->clear();
|
||||
|
||||
}
|
||||
|
||||
|
||||
void EditorLog::add_message(const String& p_msg,bool p_error) {
|
||||
|
||||
|
||||
@@ -167,9 +174,11 @@ void EditorLog::_bind_methods() {
|
||||
|
||||
ObjectTypeDB::bind_method(_MD("_close_request"),&EditorLog::_close_request );
|
||||
ObjectTypeDB::bind_method(_MD("_flip_request"),&EditorLog::_flip_request );
|
||||
ObjectTypeDB::bind_method(_MD("_clear_request"),&EditorLog::_clear_request );
|
||||
//ObjectTypeDB::bind_method(_MD("_dragged"),&EditorLog::_dragged );
|
||||
ADD_SIGNAL( MethodInfo("close_request"));
|
||||
ADD_SIGNAL( MethodInfo("show_request"));
|
||||
ADD_SIGNAL( MethodInfo("clear_request"));
|
||||
}
|
||||
|
||||
EditorLog::EditorLog() {
|
||||
@@ -197,6 +206,11 @@ EditorLog::EditorLog() {
|
||||
//hb->add_child(pd);
|
||||
//pd->connect("dragged",this,"_dragged");
|
||||
//pd->set_default_cursor_shape(Control::CURSOR_MOVE);
|
||||
|
||||
clearbutton = memnew( Button );
|
||||
hb->add_child(clearbutton);
|
||||
clearbutton->set_text("Clear");
|
||||
clearbutton->connect("pressed", this,"_clear_request");
|
||||
|
||||
tb = memnew( TextureButton );
|
||||
hb->add_child(tb);
|
||||
|
||||
Reference in New Issue
Block a user