protected override void IntitalizeControls() { myType = new DropDownComponent(new Point(Location.X, Location.Y + 10), new Size(150, 13), "Type"); myType.AddSelectedIndexChangeEvent(this.PanelDataChanged); myType.AddSelectedIndexChangeEvent(this.TypeChanged); myType.BindToPanel(this); myType.Show(); myValue = new NumericTextComponent(new Point(Location.X, Location.Y + 40), new Size(100, 13), "Value"); myValue.AddTextChangeEvent(this.PanelDataChanged); myValue.BindToPanel(this); myValue.Show(); myTime = new NumericTextComponent(new Point(Location.X + 100, Location.Y + 40), new Size(100, 13), "Time"); myTime.AddTextChangeEvent(this.PanelDataChanged); myTime.BindToPanel(this); myTime.Show(); myWeaponUpgrade = new NumericTextComponent(new Point(Location.X, Location.Y + 40), new Size(200, 13), "Upgrade", false); myWeaponUpgrade.AddTextChangeEvent(this.PanelDataChanged); myWeaponUpgrade.BindToPanel(this); myWeaponUpgrade.Hide(); myWeaponID = new NumericTextComponent(new Point(Location.X + 200, Location.Y + 40), new Size(70, 13), "ID"); myWeaponID.AddTextChangeEvent(this.PanelDataChanged); myWeaponID.BindToPanel(this); myWeaponID.Hide(); myType.AddItem("WeaponUpgrade"); myType.AddItem("firerate"); myType.AddItem("healthkit"); myType.AddItem("homing"); myType.AddItem("shield"); }
public override void Hide() { myCooldown.Hide(); mySpread.Hide(); myBulletsPerShot.Hide(); myPosition.Hide(); }
private void TypeChanged(object sender, EventArgs e) { if ((string)myType.GetDropDown().SelectedItem == "WeaponUpgrade") { myValue.Hide(); myTime.Hide(); myWeaponUpgrade.Show(); myWeaponID.Show(); } else { myValue.Show(); myTime.Show(); myWeaponUpgrade.Hide(); myWeaponID.Hide(); } }
public override void Hide() { myEntityType.Hide(); myMaxAmount.Hide(); mySpeed.Hide(); }