better number formatting for tickets per second

This commit is contained in:
Ellpeck 2020-06-12 17:45:33 +02:00
parent cf8fcab88c
commit 0ab9b9b9cb
2 changed files with 7 additions and 9 deletions

View file

@ -57,14 +57,12 @@ namespace Android {
var adLayout = new LinearLayout(this) {Orientation = Orientation.Vertical};
adLayout.SetGravity(GravityFlags.Bottom);
var ad = new AdView(this) {
AdSize = AdSize.SmartBanner,
#if DEBUG
AdUnitId = "ca-app-pub-3940256099942544/6300978111"
#else
AdUnitId = "ca-app-pub-5754829579653773/7841535920"
#endif
AdUnitId = "ca-app-pub-5754829579653773/7841535920",
AdSize = AdSize.SmartBanner
};
ad.LoadAd(new AdRequest.Builder().Build());
ad.LoadAd(new AdRequest.Builder()
.AddTestDevice("14B965C6457E17D2808061ADF7E34923")
.Build());
adLayout.AddView(ad);
// total layout that is displayed

View file

@ -76,7 +76,7 @@ namespace TouchyTickets {
ticketGroup.AddChild(new Paragraph(Anchor.AutoCenter, 10000, p => PrettyPrintNumber(GameImpl.Instance.Tickets) + "<i ticket>", true) {
TextScale = 0.3F
});
ticketGroup.AddChild(new Paragraph(Anchor.AutoCenter, 1, p => GameImpl.Instance.Map.TicketsPerSecond.ToString("0.##") + "<i ticket>/s", true) {
ticketGroup.AddChild(new Paragraph(Anchor.AutoCenter, 1, p => GameImpl.Instance.Map.TicketsPerSecond.ToString("0,#.##") + "<i ticket>/s", true) {
PositionOffset = new Vector2(0, -8)
});
BigInteger lastTickets = 0;
@ -461,7 +461,7 @@ namespace TouchyTickets {
return string.Empty;
var pos = map.SelectedPosition.Value;
var attraction = map.GetAttractionAt(pos);
return attraction.GetGenerationRate(map, pos).ToString("0.##") + "<i ticket>/s";
return attraction.GetGenerationRate(map, pos).ToString("0,#.##") + "<i ticket>/s";
}, true));
}