Skip to content

Commit

Permalink
Fix touch events not working on the banner
Browse files Browse the repository at this point in the history
  • Loading branch information
Reco1I committed Dec 24, 2024
1 parent 47fa7f5 commit 565aa46
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/ru/nsu/ccfit/zuev/osu/MainScene.java
Original file line number Diff line number Diff line change
Expand Up @@ -494,11 +494,12 @@ public void loadBannerSprite() {
return;
}

BannerSprite banners = BannerLoader.loadBannerSprite();
if (banners != null) {
banners.setPosition(Config.getRES_WIDTH() - 10f, Config.getRES_HEIGHT() - 10f);
banners.setOrigin(Anchor.BottomRight);
scene.attachChild(banners);
BannerSprite sprite = BannerLoader.loadBannerSprite();
if (sprite != null) {
sprite.setPosition(Config.getRES_WIDTH() - 10f, Config.getRES_HEIGHT() - 10f);
sprite.setOrigin(Anchor.BottomRight);
scene.attachChild(sprite);
scene.registerTouchArea(sprite);
}
}

Expand Down

0 comments on commit 565aa46

Please sign in to comment.