async Task CreateResourcesAsync(CanvasAnimatedControl sender) { // c.TargetElapsedTime = new TimeSpan(0, 0, 0, 0, 200); // c.Paused = true; Statics.CrownImage = await CanvasBitmap.LoadAsync(sender, "game\\crown.png"); Statics.LeftColumnWidth = (int)sender.Size.Width - Statics.RightColumnWidth - Statics.RightColumnPadding * 2 - Statics.LeftColumnPadding * 2; Statics.CanvasHeight = (int)sender.Size.Height; Statics.ColumnDividerTop = new Vector2(Statics.LeftColumnWidth + Statics.LeftColumnPadding * 2, 0); Statics.ColumnDividerBottom = new Vector2(Statics.LeftColumnWidth + Statics.LeftColumnPadding * 2, (float)sender.Size.Height); rlbProminent = new RichListBoxProminent(sender.Device, new Vector2(Statics.LeftColumnWidth + Statics.LeftColumnPadding * 2 + Statics.RightColumnPadding, Statics.RightColumnPadding), Statics.RightColumnWidth, "Census of Recent Contentions", Statics.FontLarge, 15, Statics.FontSmall, Statics.FontLarge); rlbLeaderboard = new RichListBoxLeaderboard(sender.Device, new Vector2(rlbProminent.Position.X, rlbProminent.Position.Y + rlbProminent.Height + Statics.RightColumnPadding), rlbProminent.Width, (int)sender.Size.Height - rlbProminent.Height - Statics.RightColumnPadding * 3, "Champions of the Realm", Statics.FontLarge, Statics.FontSmall, Statics.FontMedium); // initialize leaderboard listbox Leaderboard.AttachedListbox = rlbLeaderboard; Leaderboard.InitializeListboxInfo(); // resets map, listbox, debug frame count Reset(sender); }
async Task CreateResourcesAsync(CanvasAnimatedControl sender) { // c.TargetElapsedTime = new TimeSpan(0, 0, 0, 0, 200); // c.Paused = true; Statics.CrownImage = await CanvasBitmap.LoadAsync(sender, "game\\crown.png"); Statics.LeftColumnWidth = (int)sender.Size.Width - Statics.RightColumnWidth - Statics.RightColumnPadding * 2 - Statics.LeftColumnPadding * 2; Statics.CanvasHeight = (int)sender.Size.Height; Statics.ColumnDividerTop = new Vector2(Statics.LeftColumnWidth + Statics.LeftColumnPadding * 2, 0); Statics.ColumnDividerBottom = new Vector2(Statics.LeftColumnWidth + Statics.LeftColumnPadding * 2, (float)sender.Size.Height); rlbProminent = new RichListBoxProminent(sender.Device, new Vector2(Statics.LeftColumnWidth + Statics.LeftColumnPadding * 2 + Statics.RightColumnPadding, Statics.RightColumnPadding), Statics.RightColumnWidth, "Census of Recent Contentions", Statics.FontLarge, 15, Statics.FontSmall, Statics.FontLarge); rlbLeaderboard = new RichListBoxLeaderboard(sender.Device, new Vector2(rlbProminent.Position.X, rlbProminent.Position.Y + rlbProminent.Height + Statics.RightColumnPadding), rlbProminent.Width, (int)sender.Size.Height - rlbProminent.Height - Statics.RightColumnPadding * 3, "Champions of the Realm", Statics.FontLarge, Statics.FontSmall, Statics.FontMedium); // initialize leaderboard listbox Leaderboard.AttachedListbox = rlbLeaderboard; Leaderboard.InitializeListboxInfo(); // resets map, listbox, debug frame count Reset(sender); }