You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2026-01-07 19:53:17 +00:00
Add size warning to Viewport Node
(cherry picked from commits855f4dc193and760095e28d)
This commit is contained in:
committed by
Rémi Verschelde
parent
8fd7efef84
commit
5c64458d9e
@@ -2981,12 +2981,14 @@ Control *Viewport::get_modal_stack_top() const {
|
||||
}
|
||||
|
||||
String Viewport::get_configuration_warning() const {
|
||||
|
||||
/*if (get_parent() && !Object::cast_to<Control>(get_parent()) && !render_target) {
|
||||
|
||||
return TTR("This viewport is not set as render target. If you intend for it to display its contents directly to the screen, make it a child of a Control so it can obtain a size. Otherwise, make it a RenderTarget and assign its internal texture to some node for display.");
|
||||
}*/
|
||||
|
||||
if (size.x == 0 || size.y == 0) {
|
||||
return TTR("Viewport size must be greater than 0 to render anything.");
|
||||
}
|
||||
return String();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user