You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2026-01-05 19:31:35 +00:00
Properly update frame range after modifying the vframe/hframes, closes #7624
This commit is contained in:
@@ -237,7 +237,7 @@ void Sprite::set_vframes(int p_amount) {
|
||||
vframes = p_amount;
|
||||
update();
|
||||
item_rect_changed();
|
||||
_change_notify("frame");
|
||||
_change_notify();
|
||||
}
|
||||
int Sprite::get_vframes() const {
|
||||
|
||||
@@ -250,7 +250,7 @@ void Sprite::set_hframes(int p_amount) {
|
||||
hframes = p_amount;
|
||||
update();
|
||||
item_rect_changed();
|
||||
_change_notify("frame");
|
||||
_change_notify();
|
||||
}
|
||||
int Sprite::get_hframes() const {
|
||||
|
||||
|
||||
@@ -502,7 +502,7 @@ void Sprite3D::set_vframes(int p_amount) {
|
||||
ERR_FAIL_COND(p_amount < 1);
|
||||
vframes = p_amount;
|
||||
_queue_update();
|
||||
_change_notify("frame");
|
||||
_change_notify();
|
||||
}
|
||||
int Sprite3D::get_vframes() const {
|
||||
|
||||
@@ -514,7 +514,7 @@ void Sprite3D::set_hframes(int p_amount) {
|
||||
ERR_FAIL_COND(p_amount < 1);
|
||||
hframes = p_amount;
|
||||
_queue_update();
|
||||
_change_notify("frame");
|
||||
_change_notify();
|
||||
}
|
||||
int Sprite3D::get_hframes() const {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user