Remove deprecated sprite_number property from Sprite and Entity, closes #305
sprite_number was a legacy alias for sprite_index. All code should use sprite_index directly. Removed from getsetters, setProperty/getProperty/ hasProperty in UISprite and UIEntity, animation property handling, and type stubs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
4a3854dac1
commit
c15d836e79
9 changed files with 20 additions and 26 deletions
|
|
@ -154,13 +154,13 @@ void Animation::startEntity(std::shared_ptr<UIEntity> target) {
|
|||
}
|
||||
else if constexpr (std::is_same_v<T, int>) {
|
||||
// For entities, we might need to handle sprite_index differently
|
||||
if (targetProperty == "sprite_index" || targetProperty == "sprite_number") {
|
||||
if (targetProperty == "sprite_index") {
|
||||
startValue = target->sprite.getSpriteIndex();
|
||||
}
|
||||
}
|
||||
else if constexpr (std::is_same_v<T, std::vector<int>>) {
|
||||
// For sprite animation frame lists, get current sprite index
|
||||
if (targetProperty == "sprite_index" || targetProperty == "sprite_number") {
|
||||
if (targetProperty == "sprite_index") {
|
||||
startValue = target->sprite.getSpriteIndex();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue