Added some obvious errors explanations

This commit is contained in:
qarmin 2019-09-25 10:28:50 +02:00
parent e9f49a6d5a
commit 17732fe698
125 changed files with 435 additions and 458 deletions

View file

@ -98,22 +98,22 @@ NodePath ViewportTexture::get_viewport_path_in_scene() const {
int ViewportTexture::get_width() const {
ERR_FAIL_COND_V(!vp, 0);
ERR_FAIL_COND_V_MSG(!vp, 0, "Viewport Texture must be set to use it.");
return vp->size.width;
}
int ViewportTexture::get_height() const {
ERR_FAIL_COND_V(!vp, 0);
ERR_FAIL_COND_V_MSG(!vp, 0, "Viewport Texture must be set to use it.");
return vp->size.height;
}
Size2 ViewportTexture::get_size() const {
ERR_FAIL_COND_V(!vp, Size2());
ERR_FAIL_COND_V_MSG(!vp, Size2(), "Viewport Texture must be set to use it.");
return vp->size;
}
RID ViewportTexture::get_rid() const {
//ERR_FAIL_COND_V(!vp, RID());
//ERR_FAIL_COND_V_MSG(!vp, RID(), "Viewport Texture must be set to use it.");
return proxy;
}
@ -123,7 +123,7 @@ bool ViewportTexture::has_alpha() const {
}
Ref<Image> ViewportTexture::get_data() const {
ERR_FAIL_COND_V(!vp, Ref<Image>());
ERR_FAIL_COND_V_MSG(!vp, Ref<Image>(), "Viewport Texture must be set to use it.");
return VS::get_singleton()->texture_get_data(vp->texture_rid);
}
void ViewportTexture::set_flags(uint32_t p_flags) {