private void AssignReferences() { ToggleButtonInstance = this.GetGraphicalUiElementByName("ToggleButtonInstance") as Pirates.GumRuntimes.DefaultForms.TreeViewToggleButtonRuntime; ListBoxItemInstance = this.GetGraphicalUiElementByName("ListBoxItemInstance") as Pirates.GumRuntimes.DefaultForms.ListBoxItemRuntime; InnerPanelInstance = this.GetGraphicalUiElementByName("InnerPanelInstance") as Pirates.GumRuntimes.ContainerRuntime; ToggleButtonInstance.Click += (unused) => ToggleButtonInstanceClick?.Invoke(this); ListBoxItemInstance.Click += (unused) => ListBoxItemInstanceClick?.Invoke(this); InnerPanelInstance.Click += (unused) => InnerPanelInstanceClick?.Invoke(this); if (tryCreateFormsObject) { FormsControl = new FlatRedBall.Forms.Controls.TreeViewItem(this); } }
public override void Initialize(bool addToManagers) { LoadStaticContent(ContentManagerName); ButtonPlay = MainMenuScreenGum.GetGraphicalUiElementByName("ButtonPlay") as Pirates.GumRuntimes.ButtonRuntime; ButtonSettings = MainMenuScreenGum.GetGraphicalUiElementByName("ButtonSettings") as Pirates.GumRuntimes.ButtonRuntime; ButtonQuit = MainMenuScreenGum.GetGraphicalUiElementByName("ButtonQuit") as Pirates.GumRuntimes.ButtonRuntime; ButtonBack = MainMenuScreenGum.GetGraphicalUiElementByName("ButtonBack") as Pirates.GumRuntimes.ButtonRuntime; MainContainer = MainMenuScreenGum.GetGraphicalUiElementByName("MainContainer") as Pirates.GumRuntimes.ContainerRuntime; SettingsContainer = MainMenuScreenGum.GetGraphicalUiElementByName("SettingsContainer") as Pirates.GumRuntimes.ContainerRuntime; SliderVolume = MainMenuScreenGum.GetGraphicalUiElementByName("SliderVolume") as Pirates.GumRuntimes.DefaultForms.SliderRuntime; TextVolumeLevel = MainMenuScreenGum.GetGraphicalUiElementByName("TextVolumeLevel") as Pirates.GumRuntimes.TextRuntime; ButtonSwitchFullscreen = MainMenuScreenGum.GetGraphicalUiElementByName("ButtonSwitchFullscreen") as Pirates.GumRuntimes.ButtonRuntime; ButtonApply = MainMenuScreenGum.GetGraphicalUiElementByName("ButtonApply") as Pirates.GumRuntimes.ButtonRuntime; PostInitialize(); base.Initialize(addToManagers); if (addToManagers) { AddToManagers(); } }