fixed being able to fade out the ui while swiping

This commit is contained in:
Ellpeck 2020-06-05 21:01:53 +02:00
parent e00b345a81
commit 99b67df6be

View file

@ -110,6 +110,8 @@ namespace TouchyTickets {
map.Draw(time, batch, pos, scale, alpha, false, new RectangleF(Vector2.Zero, mapSize * scale));
},
OnPressed = e => {
if (this.swipeProgress != 0)
return;
var map = GameImpl.Instance.Map;
var infoUi = new Group(Anchor.BottomLeft, new Vector2(1));
infoUi.AddChild(new Button(Anchor.AutoInlineIgnoreOverflow, new Vector2(0.5F, 30), Localization.Get("Back")) {
@ -145,6 +147,8 @@ namespace TouchyTickets {
ChildPadding = new Vector2(4),
PositionOffset = new Vector2(0, 1),
OnPressed = e => {
if (this.swipeProgress != 0)
return;
var map = GameImpl.Instance.Map;
map.PlacingAttraction = attraction.Value.Create();
// set placing position to center of camera's view