public BiologView(Desktop biologDesktop, IBiologProgress biologData) { biologDesktop.Dock = DockStyle.Fill; Controls.Add(biologDesktop); _biologProgress = biologData; _biologProgress.BiologEntryScanned += _biologProgress_BiologEntryUnlocked; _backgroundTintFrame = (Frame)GetControl("TintFrame"); // Animation stuff _leftSlideFrame = (Frame)GetControl("LeftSlideFrame"); _rightSlideFrame = (Frame)GetControl("RightSlideFrame"); _centerSlideFrame = (Frame)GetControl("CenterSlideFrame"); _topSlideFrame = (Frame)GetControl("TopSlideFrame"); _bottomSlideFrame = (Frame)GetControl("BottomSlideFrame"); _separatorSlideFrame = (Frame)GetControl("SeparatorSlideFrame"); // Database stuff _databaseList = (FlowLayoutFrame)GetControl("Database List"); _databaseList.Controls.Clear(); _databaseList.ForceFlowLayout(); _databaseScrollFrame = (Frame)GetControl("DatabaseScrollFrame"); _databaseScrollFrame.Update += _databaseList_Update; _databaseSlider = (Slider)GetControl("DatabaseSlider"); // Center content pane stuff _centerSlider = (Slider)GetControl("CenterSlider"); _centerSlider.Ease = true; _centerScrollFrame = (Frame)GetControl("Scroll Page"); _centerContentPage = (Frame)GetControl("CenterContent"); _centerScrollFrame.Update += new VoidEvent(_centerScrollPage_Update); _summaryTitle = (Label)GetControl("SummaryHeader"); _summaryLabel = (TextArea)GetControl("SummaryInfo"); _detailLabel = (Label)GetControl("DetailInfo"); // Tags stuff _tagsList = (FlowLayoutFrame)GetControl("Tags"); _tagsList.Controls.Clear(); _scaleLabel = (Label)GetControl("Scale Number"); _scaleFrame = (Frame)GetControl("Scalebar"); // Gallery stuff _galleryImage = (ImageControl)GetControl("Entry"); _navigatorPreviewFrame = (Frame)GetControl("NavigatorPreviewFrame"); _navigatorPreviewFrame.Controls.Clear(); (GetControl("Exit") as Button).MouseClick += (c, s) => { if (ExitButtonPressed != null) { ExitButtonPressed(); } }; _3dPreviewTexture = ResourcesExt.Load <RenderTexture>("Biolog/3DPreviews/Biolog3DPreview"); Initialize(); }
public void SetActionButtons(DialogueNodeComponent dialogueNode) { foreach (Control actionButton in _actionButtonsFrame.Controls) { actionButton.MouseClick -= button_MouseClick; } _actionButtonsFrame.Controls.Clear(); if (dialogueNode.HasBranch) { foreach (DialogueTransitionNodeComponent transitionNode in dialogueNode.DialogueTransitions) { Button button = new Button(); button.AutoSize = AutoSize.Horizontal; button.Dock = DockStyle.Left; button.Margin = new Margin(4, 0, 0, 0); button.Text = transitionNode.DialogueTransitionData.TransitionText; button.Style = "Button - Pointed"; button.Tag = transitionNode; button.MouseClick += button_MouseClick; _actionButtonsFrame.Controls.Add(button); } } else { Button button = new Button(); button.AutoSize = AutoSize.Horizontal; button.Dock = DockStyle.Left; button.Margin = new Margin(4, 0, 0, 0); button.Text = "Continue..."; button.Style = "Button - Pointed"; button.MouseClick += continueButton_MouseClick; _actionButtonsFrame.Controls.Add(button); } _actionButtonsFrame.ForceFlowLayout(); }