コード例 #1
0
 public override void AssignReferences()
 {
     base.AssignReferences();
     EnergyStructureButton = this.GetGraphicalUiElementByName("EnergyStructureButton") as GBC2017.GumRuntimes.ButtonRuntime;
     EnergyStructureButton.AssignReferences();
     CombatStructureButton = this.GetGraphicalUiElementByName("CombatStructureButton") as GBC2017.GumRuntimes.ButtonRuntime;
     CombatStructureButton.AssignReferences();
     UtilityStructureButton = this.GetGraphicalUiElementByName("UtilityStructureButton") as GBC2017.GumRuntimes.ButtonRuntime;
     UtilityStructureButton.AssignReferences();
     TopButtons     = this.GetGraphicalUiElementByName("TopButtons") as GBC2017.GumRuntimes.ContainerRuntime;
     BottomButtons  = this.GetGraphicalUiElementByName("BottomButtons") as GBC2017.GumRuntimes.ContainerRuntime;
     ButtonInstance = this.GetGraphicalUiElementByName("ButtonInstance") as GBC2017.GumRuntimes.ButtonRuntime;
     ButtonInstance.AssignReferences();
     ButtonInstance1 = this.GetGraphicalUiElementByName("ButtonInstance1") as GBC2017.GumRuntimes.ButtonRuntime;
     ButtonInstance1.AssignReferences();
     ButtonInstance2 = this.GetGraphicalUiElementByName("ButtonInstance2") as GBC2017.GumRuntimes.ButtonRuntime;
     ButtonInstance2.AssignReferences();
     ButtonInstance3 = this.GetGraphicalUiElementByName("ButtonInstance3") as GBC2017.GumRuntimes.ButtonRuntime;
     ButtonInstance3.AssignReferences();
     EnergyStructureButton.Click  += (unused) => EnergyStructureButtonClick?.Invoke(this);
     CombatStructureButton.Click  += (unused) => CombatStructureButtonClick?.Invoke(this);
     UtilityStructureButton.Click += (unused) => UtilityStructureButtonClick?.Invoke(this);
     TopButtons.Click             += (unused) => TopButtonsClick?.Invoke(this);
     BottomButtons.Click          += (unused) => BottomButtonsClick?.Invoke(this);
     ButtonInstance.Click         += (unused) => ButtonInstanceClick?.Invoke(this);
     ButtonInstance1.Click        += (unused) => ButtonInstance1Click?.Invoke(this);
     ButtonInstance2.Click        += (unused) => ButtonInstance2Click?.Invoke(this);
     ButtonInstance3.Click        += (unused) => ButtonInstance3Click?.Invoke(this);
     CallCustomInitialize();
 }
コード例 #2
0
 private void AssignReferences()
 {
     ButtonInstance        = this.GetGraphicalUiElementByName("ButtonInstance") as Slotmachine.GumRuntimes.DefaultForms.ButtonRuntime;
     ButtonInstance.Click += (unused) => ButtonInstanceClick?.Invoke(this);
     if (tryCreateFormsObject)
     {
         FormsControlAsObject = new Slotmachine.FormsControls.Components.ButtonForms(this);
     }
 }