Skip to content

Fix #347: Make Target::setCostumeIndex() virtual #368

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix #347: Make Target::setCostumeIndex() virtual
  • Loading branch information
adazem009 committed Dec 12, 2023
commit 0f6b84cb4f7f4370026b5fee56992ba72bd2f03e
2 changes: 1 addition & 1 deletion include/scratchcpp/sprite.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class LIBSCRATCHCPP_EXPORT Sprite : public Target
double size() const;
void setSize(double newSize);

void setCostumeIndex(int newCostumeIndex);
void setCostumeIndex(int newCostumeIndex) override;

double direction() const;
void setDirection(double newDirection);
Expand Down
2 changes: 1 addition & 1 deletion include/scratchcpp/stage.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class LIBSCRATCHCPP_EXPORT Stage : public Target

bool isStage() const override;

void setCostumeIndex(int newCostumeIndex);
void setCostumeIndex(int newCostumeIndex) override;

int tempo() const;
void setTempo(int newTempo);
Expand Down
2 changes: 1 addition & 1 deletion include/scratchcpp/target.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class LIBSCRATCHCPP_EXPORT Target
int findComment(const std::string &id) const;

int costumeIndex() const;
void setCostumeIndex(int newCostumeIndex);
virtual void setCostumeIndex(int newCostumeIndex);

std::shared_ptr<Costume> currentCostume() const;

Expand Down