public FlashingTextCommand(string text, Vector2 localPosition, Color labelColour, bool shouldPauseGame = false, float lifeTime = float.MaxValue) : base(shouldPauseGame, lifeTime) { // Create and add to our parent screen here Label = ParentScreen.AddScreenUIObject(new FlashingLabel(text, localPosition), true, true); Label.Colour = labelColour; }
private void onLoadRequested() { if (BeatmapAvailability.Value.State != DownloadState.LocallyAvailable) { return; } // In the case of spectating, IMultiplayerClient.LoadRequested can be fired while the game is still spectating a previous session. // For now, we want to game to switch to the new game so need to request exiting from the play screen. if (!ParentScreen.IsCurrentScreen()) { ParentScreen.MakeCurrent(); Schedule(onLoadRequested); return; } // The beatmap is queried asynchronously when the selected item changes. // This is an issue with MultiSpectatorScreen which is effectively in an always "ready" state and receives LoadRequested() callbacks // even when it is not truly ready (i.e. the beatmap hasn't been selected by the client yet). For the time being, a simple fix to this is to ignore the callback. // Note that spectator will be entered automatically when the client is capable of doing so via beatmap availability callbacks (see: updateBeatmapAvailability()). if (client.LocalUser?.State == MultiplayerUserState.Spectating && (SelectedItem.Value == null || Beatmap.IsDefault)) { return; } StartPlay(); readyClickOperation?.Dispose(); readyClickOperation = null; }
public CharacterDialogBoxCommand(string characterPortraitTextureAsset, string[] strings, bool shouldPauseGame = true, float lifeTime = float.MaxValue) : base(shouldPauseGame, lifeTime) { Debug.Assert(strings.Length > 0); DialogBox = ParentScreen.AddScreenUIObject(new CharacterDialogBox(characterPortraitTextureAsset, strings, "", ScreenManager.Instance.ScreenCentre), true, true); DialogBox.Hide(); }
public TextDialogBoxCommand(string[] strings, bool shouldPauseGame = true, float lifeTime = float.MaxValue) : base(shouldPauseGame, lifeTime) { Debug.Assert(strings.Length > 0); TextBox = ParentScreen.AddScreenUIObject(new TextDialogBox(strings, "", ScreenManager.Instance.ScreenCentre), true, true); TextBox.Hide(); }
public void Activate() { if (IsRootNode) { return; } ParentScreen.ActivateChildScreen(this); }
public void ActivateChildScreen(IScreen screen) { var child = screen as Screen; var args = new ScreenChangingEventArgs(); child._screenChangingEvent.OnNext(args); if (args.IsHandled && args.IsCanceled) { return; } if (screen == null) { Debug.WriteLine("ActivateChildScreen with null"); return; } if (!Contains(screen)) { throw new ArgumentException("cannot activate screen, because the screen %0 doesn't contains screen %1"); } if (_isMutual) { foreach (var childNode in ChildNodes) { if (childNode == screen) { continue; } childNode.IsActive = false; // _onExitEvent.OnNext(this); } ActiveIndex = screen.Index; } screen.IsActive = true; // _onEnterEvent.OnNext(this); if (IsRootNode) { } else { ParentScreen.ActivateChildScreen(this); } // if (ActiveChanged != null) // ActiveChanged(this); _activeChangedEvent.OnNext(this); }
public override void MouseButtonUp(NSEvent theEvent) { PointF ui_pt = ParentScreen.ScreenToLayer(theEvent.LocationInWindow); if (PointInside(ui_pt)) { OnActivate(); } }
protected virtual void OnDeactivate() { isActivated = false; Debug.Assert(ParentScreen.ContainsEntity(this)); ParentScreen.RemoveEntity(this); if (Deactivated != null) { Deactivated(this); } }
public override void Update(GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen) { base.Update(gameTime, otherScreenHasFocus, coveredByOtherScreen); if (!initialized) { if (initialTime <= 0) { toggleFocus(MainContainer, true); toggleMoveSpeed(MainContainer, true); toggletScaleSpeed(MainContainer, true); initialized = true; } else { initialTime -= gameTime.ElapsedGameTime.Milliseconds; } } if (ParentScreen != null && HideParent) { if (IsExiting && ParentScreen.IsHidden) { ParentScreen.show(); } if (!IsExiting && !ParentScreen.IsHidden) { ParentScreen.hide(); } } // updates parent screen while its fading off // (or if UpdateParent is true) if (ParentScreen != null && !IsExiting && (UpdateParent || ParentScreen.IsFadingOff)) { ParentScreen.Update(gameTime, false, true); } // update IsFadingOff property if (isFadingOff) { if (fadeOffTime > TransitionOffTime.Milliseconds * 2) { isFadingOff = false; } else { fadeOffTime += gameTime.ElapsedGameTime.Milliseconds; } } }
public override void InvalidateToolbar() { InvoiceEntities entity = (InvoiceEntities)CurrentModuleEntity; ARInvoicesInfo mainObject = (ARInvoicesInfo)entity.MainObject; ParentScreen.SetEnableOfToolbarButton(BaseToolbar.ToolbarButtonEdit, true); if (mainObject.ARInvoiceID > 0) { ParentScreen.SetEnableOfToolbarButton(BaseToolbar.ToolbarButtonEdit, false); } base.InvalidateToolbar(); }
public override void InvalidateToolbar() { ICReceiptsInfo receipt = (ICReceiptsInfo)CurrentModuleEntity.MainObject; if (receipt.ICReceiptID > 0) { //ParentScreen.SetEnableOfToolbarButton(BaseToolbar.ToolbarButtonEdit, true); ParentScreen.SetEnableOfToolbarButton(BaseToolbar.ToolbarButtonEdit, receipt.ICReceiptPostedStatus != PostedTransactionStatus.Posted.ToString()); } base.InvalidateToolbar(); }
public virtual bool IsEditable() { BarItem barItem = ParentScreen.GetToolbarButton(BaseToolbar.ToolbarButtonEdit); if (barItem != null && barItem.Visibility != BarItemVisibility.Never && barItem.Enabled) { if (Toolbar.IsNullOrNoneAction() && Toolbar.CurrentObjectID > 0) { return(true); } } return(false); }
void CreateDropdownLayer() { dropdownLayer = CALayer.Create(); dropdownLayer.Bounds = new RectangleF(0, 0, Width, items.Count * Font.LineSize); dropdownLayer.Delegate = new ComboBoxElementDropdownLayerDelegate(this); dropdownLayer.BackgroundColor = new CGColor(0, 0, 0, 1); dropdownLayer.BorderWidth = 1; dropdownLayer.BorderColor = new CGColor(1, 1, 0, 1); dropdownLayer.SetNeedsDisplay(); ParentScreen.AddSublayer(dropdownLayer); }
public override void InvalidateToolbar() { base.InvalidateToolbar(); ProposalEntities entity = (ProposalEntities)CurrentModuleEntity; ARProposalsInfo mainObject = (ARProposalsInfo)entity.MainObject; ParentScreen.SetEnableOfToolbarButton("Approve", false); if (mainObject.ARProposalID > 0) { ParentScreen.SetEnableOfToolbarButton("Approve", true); if (mainObject.ARProposalStatus == "Approve") { ParentScreen.SetEnableOfToolbarButton(BaseToolbar.ToolbarButtonEdit, false); ParentScreen.SetEnableOfToolbarButton("Approve", false); } } }
public virtual void ActionEdit() { //if (ObjectIsEditingByOtherUser(this.Name, Toolbar.CurrentObjectID)) //{ // return; //} if (Toolbar.Edit()) { ParentScreen.InvalidateToolbarAfterActionEdit(); } else { DevExpress.XtraBars.BarButtonItem barbtnEdit = (BarButtonItem)ParentScreen.GetToolbarButton(BaseToolbar.ToolbarButtonEdit); barbtnEdit.Down = false; } }
public override void InvalidateToolbar() { SaleOrderShipmentEntities entity = CurrentModuleEntity as SaleOrderShipmentEntities; ICShipmentsInfo mainObject = entity.MainObject as ICShipmentsInfo; base.InvalidateToolbar(); if (mainObject.ICShipmentID > 0) { ParentScreen.SetEnableOfToolbarButton(BaseToolbar.ToolbarButtonEdit, mainObject.ICShipmentPostedStatus != PostedTransactionStatus.Posted.ToString()); if (mainObject.ICShipmentStatus == ShipmentStatus.Complete) { ParentScreen.SetEnableOfToolbarButton(BaseToolbar.ToolbarButtonEdit, false); ParentScreen.SetEnableOfToolbarButton(BaseToolbar.ToolbarButtonComplete, false); } } }
public override void InvalidateToolbar() { ICShipmentsInfo Shipment = (ICShipmentsInfo)CurrentModuleEntity.MainObject; if (Shipment.ICShipmentID > 0) { ParentScreen.SetEnableOfToolbarButton(ToolbarButtons.PostedTransactions, false); ParentScreen.SetEnableOfToolbarButton(ToolbarButtons.UnPostedTransactions, false); if (Shipment.ICShipmentStatus == ShipmentStatus.Complete.ToString()) { ParentScreen.SetEnableOfToolbarButton(ToolbarButtons.PostedTransactions, Shipment.ICShipmentPostedStatus != PostedTransactionStatus.Posted.ToString()); ParentScreen.SetEnableOfToolbarButton(ToolbarButtons.UnPostedTransactions, Shipment.ICShipmentPostedStatus == PostedTransactionStatus.Posted.ToString()); } } base.InvalidateToolbar(); }
public void Show() { ParentScreen.ModuleParentScreen_Init(); ParentScreen.ShowInTaskbar = false; if (VinaApp.OpenModules.ContainsKey(VinaApp.CurrentModuleName)) { ((BaseModuleERP)VinaApp.OpenModules[VinaApp.CurrentModuleName]).ParentScreen.WindowState = FormWindowState.Minimized; } ParentScreen.Show(); ParentScreen.Focus(); //ActionInvalidate(); //ParentScreen.ShowSearchResultsPanel(); if (ParentScreen.IsExistsGridSearchResult() && Toolbar.CurrentObjectID <= 0) { //ResetSearch(); Search(); } }
public override void InvalidateToolbar() { base.InvalidateToolbar(); AllowanceEntities entity = (AllowanceEntities)CurrentModuleEntity; HRAllowancesInfo mainObject = (HRAllowancesInfo)entity.MainObject; ParentScreen.SetEnableOfToolbarButton(BaseToolbar.ToolbarButtonEdit, true); if (mainObject.HRAllowanceID > 0) { //if(mainObject.HRAllowanceStatus == AllowanceStatus.New.ToString()) //{ // ParentScreen.SetEnableOfToolbarButton(BaseToolbar.ToolbarButtonEdit, true); // ParentScreen.SetEnableOfToolbarButton(BaseToolbar.ToolbarButtonComplete, true); //} //else //{ // ParentScreen.SetEnableOfToolbarButton(BaseToolbar.ToolbarButtonEdit, false); // ParentScreen.SetEnableOfToolbarButton(BaseToolbar.ToolbarButtonComplete, false); //} } }
public virtual void ModuleAfterSaved(int iObjectID) { ParentScreen.Focus(); //Invalidate Toolbar button after save ParentScreen.InvalidateToolbarAfterActionSave(); //Invalidate toolbar in the module's context InvalidateToolbar(); //Invalidate controls //InvalidateFieldGroupControls(BaseToolbar.ModuleNone); //Invalidate search result control InvalidateSearchResultsControl(null, string.Empty); //Save User Audit is Nothing //Set modus action of toolbar to none Toolbar.ModuleAction = BaseToolbar.ModuleNone; }
public MarkpadDocument SaveAs(string path) { var directoryName = Path.GetDirectoryName(path); if (!Directory.Exists(directoryName)) { Directory.CreateDirectory(directoryName); } ParentScreen.WhiteWindow.Get <Button>("ShowSave").Click(); ParentScreen.WhiteWindow.Get <Button>("SaveAsDocument").Click(); var modalWindow = ParentScreen.WhiteWindow.ModalWindow("Save As"); modalWindow.Get <TextBox>(SearchCriteria.ByAutomationId("1001")).Text = path; modalWindow.Get <Button>(SearchCriteria.ByAutomationId("1")).Click(); ParentScreen.WaitWhileBusy(); return(this); }
public override void InvalidateToolbar() { base.InvalidateToolbar(); RewardEntities entity = (RewardEntities)CurrentModuleEntity; HRRewardsInfo mainObject = (HRRewardsInfo)entity.MainObject; ParentScreen.SetEnableOfToolbarButton(BaseToolbar.ToolbarButtonEdit, true); if (mainObject.HRRewardID > 0) { if (mainObject.HRRewardStatus == RewardStatus.New.ToString()) { ParentScreen.SetEnableOfToolbarButton(BaseToolbar.ToolbarButtonEdit, true); ParentScreen.SetEnableOfToolbarButton(BaseToolbar.ToolbarButtonComplete, true); } else { ParentScreen.SetEnableOfToolbarButton(BaseToolbar.ToolbarButtonEdit, false); ParentScreen.SetEnableOfToolbarButton(BaseToolbar.ToolbarButtonComplete, false); } } }
private void onLoadRequested() { if (BeatmapAvailability.Value.State != DownloadState.LocallyAvailable) { return; } // In the case of spectating, IMultiplayerClient.LoadRequested can be fired while the game is still spectating a previous session. // For now, we want to game to switch to the new game so need to request exiting from the play screen. if (!ParentScreen.IsCurrentScreen()) { ParentScreen.MakeCurrent(); Schedule(onLoadRequested); return; } StartPlay(); readyClickOperation?.Dispose(); readyClickOperation = null; }
internal void GiveAnswer(PopupAnswer ok) { PopupAnswer = ok; ParentScreen.ReadAnswer(ok); IsPaused = false; }
private void load() { InternalChildren = new Drawable[] { new GridContainer { RelativeSizeAxes = Axes.Both, Content = new[] { new Drawable[] { new Container { RelativeSizeAxes = Axes.Both, Padding = new MarginPadding { Horizontal = 105, Vertical = 20 }, Child = new GridContainer { RelativeSizeAxes = Axes.Both, RowDimensions = new[] { new Dimension(GridSizeMode.AutoSize), new Dimension(GridSizeMode.AutoSize), new Dimension(GridSizeMode.AutoSize), new Dimension(), }, Content = new[] { new Drawable[] { new Match.Components.Header() }, new Drawable[] { participantsHeader = new OverlinedHeader("Participants") { ShowLine = false } }, new Drawable[] { new Container { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Margin = new MarginPadding { Top = 5 }, Child = new ParticipantsDisplay(Direction.Horizontal) { Details = { BindTarget = participantsHeader.Details } } } }, new Drawable[] { new GridContainer { RelativeSizeAxes = Axes.Both, Content = new[] { new Drawable[] { new Container { RelativeSizeAxes = Axes.Both, Padding = new MarginPadding { Right = 5 }, Child = new GridContainer { RelativeSizeAxes = Axes.Both, Content = new[] { new Drawable[] { new OverlinedPlaylistHeader(), }, new Drawable[] { new DrawableRoomPlaylistWithResults { RelativeSizeAxes = Axes.Both, Items = { BindTarget = Playlist }, SelectedItem = { BindTarget = SelectedItem }, RequestShowResults = item => { Debug.Assert(roomId.Value != null); ParentScreen?.Push(new PlaylistsResultsScreen(null, roomId.Value.Value, item, false)); } } }, }, RowDimensions = new[] { new Dimension(GridSizeMode.AutoSize), new Dimension(), } } }, null, new GridContainer { RelativeSizeAxes = Axes.Both, Content = new[] { new Drawable[] { new OverlinedHeader("Leaderboard"), }, new Drawable[] { leaderboard = new MatchLeaderboard { RelativeSizeAxes = Axes.Both }, }, new Drawable[] { new OverlinedHeader("Chat"), }, new Drawable[] { new MatchChatDisplay { RelativeSizeAxes = Axes.Both } } }, RowDimensions = new[] { new Dimension(GridSizeMode.AutoSize), new Dimension(), new Dimension(GridSizeMode.AutoSize), new Dimension(GridSizeMode.Relative, size: 0.4f, minSize: 120), } }, null }, }, ColumnDimensions = new[] { new Dimension(GridSizeMode.Relative, size: 0.5f, maxSize: 400), new Dimension(), new Dimension(GridSizeMode.Relative, size: 0.5f, maxSize: 600), new Dimension(), } } } }, } } }, new Drawable[] { new Footer { OnStart = onStart, SelectedItem = { BindTarget = SelectedItem } } } }, RowDimensions = new[] { new Dimension(), new Dimension(GridSizeMode.AutoSize), } }, settingsOverlay = new PlaylistsMatchSettingsOverlay { RelativeSizeAxes = Axes.Both, EditPlaylist = () => this.Push(new MatchSongSelect()), State = { Value = roomId.Value == null ? Visibility.Visible : Visibility.Hidden } } }; }
protected override Drawable CreateMainContent() => new Container { RelativeSizeAxes = Axes.Both, Padding = new MarginPadding { Horizontal = 5, Vertical = 10 }, Child = new GridContainer { RelativeSizeAxes = Axes.Both, ColumnDimensions = new[] { new Dimension(), new Dimension(GridSizeMode.Absolute, 10), new Dimension(), new Dimension(GridSizeMode.Absolute, 10), new Dimension(), }, Content = new[] { new Drawable[] { // Playlist items column new Container { RelativeSizeAxes = Axes.Both, Padding = new MarginPadding { Right = 5 }, Child = new GridContainer { RelativeSizeAxes = Axes.Both, Content = new[] { new Drawable[] { new OverlinedPlaylistHeader(), }, new Drawable[] { new DrawableRoomPlaylist { RelativeSizeAxes = Axes.Both, Items = { BindTarget = Room.Playlist }, SelectedItem = { BindTarget = SelectedItem }, AllowSelection = true, AllowShowingResults = true, RequestResults = item => { Debug.Assert(RoomId.Value != null); ParentScreen?.Push(new PlaylistsResultsScreen(null, RoomId.Value.Value, item, false)); } } }, }, RowDimensions = new[] { new Dimension(GridSizeMode.AutoSize), new Dimension(), } } }, // Spacer null, // Middle column (mods and leaderboard) new GridContainer { RelativeSizeAxes = Axes.Both, Content = new[] { new[] { UserModsSection = new FillFlowContainer { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Alpha = 0, Margin = new MarginPadding { Bottom = 10 }, Children = new Drawable[] { new OverlinedHeader("Extra mods"), new FillFlowContainer { AutoSizeAxes = Axes.Both, Direction = FillDirection.Horizontal, Spacing = new Vector2(10, 0), Children = new Drawable[] { new UserModSelectButton { Anchor = Anchor.CentreLeft, Origin = Anchor.CentreLeft, Width = 90, Text = "Select", Action = ShowUserModSelect, }, new ModDisplay { Anchor = Anchor.CentreLeft, Origin = Anchor.CentreLeft, Current = UserMods, Scale = new Vector2(0.8f), }, } } } }, }, new Drawable[] { progressSection = new FillFlowContainer { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Alpha = 0, Margin = new MarginPadding { Bottom = 10 }, Direction = FillDirection.Vertical, Children = new Drawable[] { new OverlinedHeader("Progress"), new RoomLocalUserInfo(), } }, }, new Drawable[] { new OverlinedHeader("Leaderboard") }, new Drawable[] { leaderboard = new MatchLeaderboard { RelativeSizeAxes = Axes.Both }, }, }, RowDimensions = new[] { new Dimension(GridSizeMode.AutoSize), new Dimension(GridSizeMode.AutoSize), new Dimension(GridSizeMode.AutoSize), new Dimension(), } }, // Spacer null, // Main right column new GridContainer { RelativeSizeAxes = Axes.Both, Content = new[] { new Drawable[] { new OverlinedHeader("Chat") }, new Drawable[] { new MatchChatDisplay(Room) { RelativeSizeAxes = Axes.Both } } }, RowDimensions = new[] { new Dimension(GridSizeMode.AutoSize), new Dimension(), } }, }, }, } };
protected override Drawable CreateMainContent() => new GridContainer { RelativeSizeAxes = Axes.Both, Content = new[] { new Drawable[] { new Container { RelativeSizeAxes = Axes.Both, Padding = new MarginPadding { Right = 5 }, Child = new GridContainer { RelativeSizeAxes = Axes.Both, Content = new[] { new Drawable[] { new OverlinedPlaylistHeader(), }, new Drawable[] { new DrawableRoomPlaylistWithResults { RelativeSizeAxes = Axes.Both, Items = { BindTarget = Room.Playlist }, SelectedItem = { BindTarget = SelectedItem }, RequestShowResults = item => { Debug.Assert(RoomId.Value != null); ParentScreen?.Push(new PlaylistsResultsScreen(null, RoomId.Value.Value, item, false)); } } }, }, RowDimensions = new[] { new Dimension(GridSizeMode.AutoSize), new Dimension(), } } }, null, new GridContainer { RelativeSizeAxes = Axes.Both, Content = new[] { new[] { UserModsSection = new FillFlowContainer { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Alpha = 0, Margin = new MarginPadding { Bottom = 10 }, Children = new Drawable[] { new OverlinedHeader("Extra mods"), new FillFlowContainer { AutoSizeAxes = Axes.Both, Direction = FillDirection.Horizontal, Spacing = new Vector2(10, 0), Children = new Drawable[] { new UserModSelectButton { Anchor = Anchor.CentreLeft, Origin = Anchor.CentreLeft, Width = 90, Text = "Select", Action = ShowUserModSelect, }, new ModDisplay { Anchor = Anchor.CentreLeft, Origin = Anchor.CentreLeft, Current = UserMods, Scale = new Vector2(0.8f), }, } } } }, }, new Drawable[] { new OverlinedHeader("Leaderboard") }, new Drawable[] { leaderboard = new MatchLeaderboard { RelativeSizeAxes = Axes.Both }, }, new Drawable[] { new OverlinedHeader("Chat"), }, new Drawable[] { new MatchChatDisplay(Room) { RelativeSizeAxes = Axes.Both } } }, RowDimensions = new[] { new Dimension(GridSizeMode.AutoSize), new Dimension(GridSizeMode.AutoSize), new Dimension(), new Dimension(GridSizeMode.AutoSize), new Dimension(GridSizeMode.Relative, size: 0.4f, minSize: 120), } }, }, }, ColumnDimensions = new[] { new Dimension(GridSizeMode.Relative, size: 0.5f, maxSize: 400), new Dimension(), new Dimension(GridSizeMode.Relative, size: 0.5f, maxSize: 600), } };
protected void StartPlay() { sampleStart?.Play(); ParentScreen?.Push(CreateGameplayScreen()); }
protected void StartPlay(Func <Player> player) { sampleStart?.Play(); ParentScreen?.Push(new PlayerLoader(player)); }
private void load() { AddRangeInternal(new Drawable[] { mainContent = new GridContainer { RelativeSizeAxes = Axes.Both, Content = new[] { new Drawable[] { new Container { RelativeSizeAxes = Axes.Both, Padding = new MarginPadding { Horizontal = 105, Vertical = 20 }, Child = new GridContainer { RelativeSizeAxes = Axes.Both, RowDimensions = new[] { new Dimension(GridSizeMode.AutoSize), new Dimension(GridSizeMode.AutoSize), new Dimension(GridSizeMode.AutoSize), new Dimension(), }, Content = new[] { new Drawable[] { new Match.Components.Header() }, new Drawable[] { participantsHeader = new OverlinedHeader("Participants") { ShowLine = false } }, new Drawable[] { new Container { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Margin = new MarginPadding { Top = 5 }, Child = new ParticipantsDisplay(Direction.Horizontal) { Details = { BindTarget = participantsHeader.Details } } } }, new Drawable[] { new GridContainer { RelativeSizeAxes = Axes.Both, Content = new[] { new Drawable[] { new Container { RelativeSizeAxes = Axes.Both, Padding = new MarginPadding { Right = 5 }, Child = new GridContainer { RelativeSizeAxes = Axes.Both, Content = new[] { new Drawable[] { new OverlinedPlaylistHeader(), }, new Drawable[] { new DrawableRoomPlaylistWithResults { RelativeSizeAxes = Axes.Both, Items = { BindTarget = playlist }, SelectedItem = { BindTarget = SelectedItem }, RequestShowResults = item => { Debug.Assert(roomId.Value != null); ParentScreen?.Push(new PlaylistsResultsScreen(null, roomId.Value.Value, item, false)); } } }, }, RowDimensions = new[] { new Dimension(GridSizeMode.AutoSize), new Dimension(), } } }, null, new GridContainer { RelativeSizeAxes = Axes.Both, Content = new[] { new[] { UserModsSection = new FillFlowContainer { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Margin = new MarginPadding { Bottom = 10 }, Children = new Drawable[] { new OverlinedHeader("Extra mods"), new FillFlowContainer { AutoSizeAxes = Axes.Both, Direction = FillDirection.Horizontal, Spacing = new Vector2(10, 0), Children = new Drawable[] { new PurpleTriangleButton { Anchor = Anchor.CentreLeft, Origin = Anchor.CentreLeft, Width = 90, Text = "Select", Action = ShowUserModSelect, }, new ModDisplay { Anchor = Anchor.CentreLeft, Origin = Anchor.CentreLeft, DisplayUnrankedText = false, Current = UserMods, Scale = new Vector2(0.8f), }, } } } }, }, new Drawable[] { new OverlinedHeader("Leaderboard") }, new Drawable[] { leaderboard = new MatchLeaderboard { RelativeSizeAxes = Axes.Both }, }, new Drawable[] { new OverlinedHeader("Chat"), }, new Drawable[] { new MatchChatDisplay { RelativeSizeAxes = Axes.Both } } }, RowDimensions = new[] { new Dimension(GridSizeMode.AutoSize), new Dimension(GridSizeMode.AutoSize), new Dimension(), new Dimension(GridSizeMode.AutoSize), new Dimension(GridSizeMode.Relative, size: 0.4f, minSize: 120), } }, null }, }, ColumnDimensions = new[] { new Dimension(GridSizeMode.Relative, size: 0.5f, maxSize: 400), new Dimension(), new Dimension(GridSizeMode.Relative, size: 0.5f, maxSize: 600), new Dimension(), } } } }, } } }, new Drawable[] { new Footer { OnStart = StartPlay } } }, RowDimensions = new[] { new Dimension(), new Dimension(GridSizeMode.AutoSize), } }, settingsOverlay = new PlaylistsMatchSettingsOverlay { RelativeSizeAxes = Axes.Both, EditPlaylist = () => this.Push(new PlaylistsSongSelect()), State = { Value = roomId.Value == null ? Visibility.Visible : Visibility.Hidden } } }); if (roomId.Value == null) { // A new room is being created. // The main content should be hidden until the settings overlay is hidden, signaling the room is ready to be displayed. mainContent.Hide(); settingsOverlay.State.BindValueChanged(visibility => { if (visibility.NewValue == Visibility.Hidden) { mainContent.Show(); } }, true); } }