1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Added show and hide methods and updated doc API.

This commit is contained in:
Wagner Scholl Lemos
2022-02-15 10:25:18 -03:00
parent fdeed6ea06
commit 160ee4ef8e
3 changed files with 24 additions and 0 deletions

View File

@@ -67,6 +67,14 @@ void CanvasLayer::set_visible(bool p_visible) {
}
}
void CanvasLayer::show() {
set_visible(true);
}
void CanvasLayer::hide() {
set_visible(false);
}
bool CanvasLayer::is_visible() const {
return visible;
}
@@ -295,6 +303,8 @@ void CanvasLayer::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_visible", "visible"), &CanvasLayer::set_visible);
ClassDB::bind_method(D_METHOD("is_visible"), &CanvasLayer::is_visible);
ClassDB::bind_method(D_METHOD("show"), &CanvasLayer::show);
ClassDB::bind_method(D_METHOD("hide"), &CanvasLayer::hide);
ClassDB::bind_method(D_METHOD("set_transform", "transform"), &CanvasLayer::set_transform);
ClassDB::bind_method(D_METHOD("get_transform"), &CanvasLayer::get_transform);