diff --git a/TouchyTickets/Content/Content.mgcb b/TouchyTickets/Content/Content.mgcb index 162240a..81b4a88 100644 --- a/TouchyTickets/Content/Content.mgcb +++ b/TouchyTickets/Content/Content.mgcb @@ -95,3 +95,6 @@ #begin Localization/Localization.nl.json /copy:Localization/Localization.nl.json +#begin Localization/News.nl.json +/copy:Localization/News.nl.json + diff --git a/TouchyTickets/Ui.cs b/TouchyTickets/Ui.cs index 7728468..6b13869 100644 --- a/TouchyTickets/Ui.cs +++ b/TouchyTickets/Ui.cs @@ -401,6 +401,35 @@ namespace TouchyTickets { this.uiSystem.Add("Options", optionsUi); this.swipeRelations = new Element[] {optionsUi, upgradeUi, main, buyUi, modifierUi}; + + var swipeTimer = 0D; + var swipeInfo = new Group(Anchor.BottomCenter, Vector2.One) { + PositionOffset = new Vector2(0, 10), + SetWidthBasedOnChildren = true, + CanBeMoused = false, + OnUpdated = (e, time) => { + if (this.swipeProgress == 0) { + if (swipeTimer > 0) { + swipeTimer -= 0.04F; + } else if (e.DrawAlpha > 0) { + e.DrawAlpha -= 0.05F; + } + } else { + swipeTimer = 1; + if (e.DrawAlpha < 1) + e.DrawAlpha += 0.05F; + } + } + }; + foreach (var ui in this.swipeRelations) { + var tex = new TextureRegion(GameImpl.Instance.SpriteBatch.GetBlankTexture()); + swipeInfo.AddChild(new Image(Anchor.AutoInlineIgnoreOverflow, new Vector2(12, 6), tex) { + MaintainImageAspect = false, + Padding = new Vector2(1), + OnUpdated = (e, time) => ((Image) e).DrawAlpha = this.currentUi == ui ? 1 : 0.35F + }); + } + this.uiSystem.Add("SwipeInfo", swipeInfo).Priority = 200; } public void Update(GameTime time) {