You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
TextureButton Update min size on any texture change
This commit is contained in:
@@ -295,11 +295,13 @@ void TextureButton::set_normal_texture(const Ref<Texture2D> &p_normal) {
|
|||||||
void TextureButton::set_pressed_texture(const Ref<Texture2D> &p_pressed) {
|
void TextureButton::set_pressed_texture(const Ref<Texture2D> &p_pressed) {
|
||||||
pressed = p_pressed;
|
pressed = p_pressed;
|
||||||
update();
|
update();
|
||||||
|
minimum_size_changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextureButton::set_hover_texture(const Ref<Texture2D> &p_hover) {
|
void TextureButton::set_hover_texture(const Ref<Texture2D> &p_hover) {
|
||||||
hover = p_hover;
|
hover = p_hover;
|
||||||
update();
|
update();
|
||||||
|
minimum_size_changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextureButton::set_disabled_texture(const Ref<Texture2D> &p_disabled) {
|
void TextureButton::set_disabled_texture(const Ref<Texture2D> &p_disabled) {
|
||||||
@@ -310,6 +312,7 @@ void TextureButton::set_disabled_texture(const Ref<Texture2D> &p_disabled) {
|
|||||||
void TextureButton::set_click_mask(const Ref<BitMap> &p_click_mask) {
|
void TextureButton::set_click_mask(const Ref<BitMap> &p_click_mask) {
|
||||||
click_mask = p_click_mask;
|
click_mask = p_click_mask;
|
||||||
update();
|
update();
|
||||||
|
minimum_size_changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
Ref<Texture2D> TextureButton::get_normal_texture() const {
|
Ref<Texture2D> TextureButton::get_normal_texture() const {
|
||||||
|
|||||||
Reference in New Issue
Block a user