diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2021-10-01 16:36:28 +0200 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2022-04-29 20:25:05 +0200 |
commit | d567369c8fa9bf801977c7e728ece65fcb6cfa64 (patch) | |
tree | 220cd3c9b60ac6aa38020757e77a4b0dd9aa81aa /scene | |
parent | 63addc328678c4718758b61590975152a37fcd98 (diff) |
Tweak the Viewport configuration warning to mention 2×2 size requirement
Diffstat (limited to 'scene')
-rw-r--r-- | scene/main/viewport.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index 5fef8d4b5f..8f1fedaac2 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -821,6 +821,7 @@ void Viewport::_set_size(const Size2i &p_size, const Size2i &p_size_2d_override, RS::get_singleton()->viewport_set_size(viewport, 0, 0); } _update_global_transform(); + update_configuration_warnings(); update_canvas_items(); @@ -2821,8 +2822,8 @@ Variant Viewport::gui_get_drag_data() const { TypedArray<String> Viewport::get_configuration_warnings() const { TypedArray<String> warnings = Node::get_configuration_warnings(); - if (size.x == 0 || size.y == 0) { - warnings.push_back(RTR("Viewport size must be greater than 0 to render anything.")); + if (size.x <= 1 || size.y <= 1) { + warnings.push_back(RTR("The Viewport size must be greater than or equal to 2 pixels on both dimensions to render anything.")); } return warnings; } |