From 32affd77a1c34560b23eef3c8796e14f3192bf4a Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Wed, 1 Jul 2020 00:59:33 +0200 Subject: [PATCH] moved the star buy sound to the correct place --- TouchyTickets/Ui.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TouchyTickets/Ui.cs b/TouchyTickets/Ui.cs index f405073..2ebd5ea 100644 --- a/TouchyTickets/Ui.cs +++ b/TouchyTickets/Ui.cs @@ -318,7 +318,6 @@ namespace TouchyTickets { upgradeHeader.AddChild(new Paragraph(Anchor.AutoCenter, 1, p => GameImpl.Instance.Stars + "", true) {TextScale = 0.3F}); upgradeHeader.AddChild(new Button(Anchor.AutoCenter, new Vector2(0.8F, 30), Localization.Get("EarnStar")) { PositionOffset = new Vector2(0, 4), - ActionSound = new SoundEffectInfo(Assets.BuySound), OnUpdated = (e, time) => ((Button) e).IsDisabled = GameImpl.Instance.GetBuyableStars() <= 0, OnPressed = e => { var infoBox = new Group(Anchor.TopLeft, Vector2.One, false) { @@ -330,6 +329,7 @@ namespace TouchyTickets { OnPressed = e2 => this.uiSystem.Remove(e2.Root.Name) }); panel.AddChild(new Button(Anchor.AutoInlineIgnoreOverflow, new Vector2(0.5F, 30), Localization.Get("Yes")) { + ActionSound = new SoundEffectInfo(Assets.BuySound), OnPressed = e2 => { this.uiSystem.Remove(e2.Root.Name); @@ -639,7 +639,7 @@ namespace TouchyTickets { SetHeightBasedOnChildren = true, PositionOffset = new Vector2(0, 1), ChildPadding = new Vector2(4), - ActionSound = new SoundEffectInfo(MlemGame.LoadContent("Sounds/StarBuy")), + ActionSound = new SoundEffectInfo(Assets.BuySound), OnPressed = e => { GameImpl.Instance.Stars -= upgrade.Price; GameImpl.Instance.Platform.AddResourceEvent(true, "Stars", upgrade.Price, "Upgrade", upgrade.Name);