StyleBoxTexture: Texture instead of RES for texture and normal_map.

This commit is contained in:
Pieter-Jan Briers 2018-02-22 19:27:35 +01:00
parent edd07270c2
commit b51a86a57a
3 changed files with 10 additions and 10 deletions

View file

@ -59,11 +59,11 @@
</member> </member>
<member name="modulate_color" type="Color" setter="set_modulate" getter="get_modulate"> <member name="modulate_color" type="Color" setter="set_modulate" getter="get_modulate">
</member> </member>
<member name="normal_map" type="Resource" setter="set_normal_map" getter="get_normal_map"> <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map">
</member> </member>
<member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect"> <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect">
</member> </member>
<member name="texture" type="Resource" setter="set_texture" getter="get_texture"> <member name="texture" type="Texture" setter="set_texture" getter="get_texture">
</member> </member>
</members> </members>
<signals> <signals>

View file

@ -101,7 +101,7 @@ StyleBox::StyleBox() {
} }
} }
void StyleBoxTexture::set_texture(RES p_texture) { void StyleBoxTexture::set_texture(Ref<Texture> p_texture) {
if (texture == p_texture) if (texture == p_texture)
return; return;
@ -112,12 +112,12 @@ void StyleBoxTexture::set_texture(RES p_texture) {
_change_notify("texture"); _change_notify("texture");
} }
RES StyleBoxTexture::get_texture() const { Ref<Texture> StyleBoxTexture::get_texture() const {
return texture; return texture;
} }
void StyleBoxTexture::set_normal_map(RES p_normal_map) { void StyleBoxTexture::set_normal_map(Ref<Texture> p_normal_map) {
if (normal_map == p_normal_map) if (normal_map == p_normal_map)
return; return;
@ -125,7 +125,7 @@ void StyleBoxTexture::set_normal_map(RES p_normal_map) {
emit_changed(); emit_changed();
} }
RES StyleBoxTexture::get_normal_map() const { Ref<Texture> StyleBoxTexture::get_normal_map() const {
return normal_map; return normal_map;
} }

View file

@ -112,11 +112,11 @@ public:
void set_region_rect(const Rect2 &p_region_rect); void set_region_rect(const Rect2 &p_region_rect);
Rect2 get_region_rect() const; Rect2 get_region_rect() const;
void set_texture(RES p_texture); void set_texture(Ref<Texture> p_texture);
RES get_texture() const; Ref<Texture> get_texture() const;
void set_normal_map(RES p_normal_map); void set_normal_map(Ref<Texture> p_normal_map);
RES get_normal_map() const; Ref<Texture> get_normal_map() const;
void set_draw_center(bool p_enabled); void set_draw_center(bool p_enabled);
bool is_draw_center_enabled() const; bool is_draw_center_enabled() const;