public new void SetEnabled(bool enable) { base.SetEnabled(enable); FilterButton.SetEnabled(enable); AdvancedButton.SetEnabled(enable); SearchToolbar.SetEnabled(enable); }
public PowerConfirmListener(AldersgateReceptionUserInterface userinterface_) : base(userinterface_, Tsw560.Pages.Home, Tsw560.HomeSubpages.PowerOffConfirm) { Confirm = Userinterface.Pages.GetControl <AdvancedButton>(Tsw560.PowerOffConfirmControls.SubpageId, Tsw560.PowerOffConfirmControls.Confirm); Cancel = Userinterface.Pages.GetControl <AdvancedButton>(Tsw560.PowerOffConfirmControls.SubpageId, Tsw560.PowerOffConfirmControls.Cancel); Confirm.PressAndRelease += ConfirmOnPressAndRelease; Cancel.PressAndRelease += CancelOnPressAndRelease; }
public PackageManagerToolbar() { root = Resources.GetTemplate("PackageManagerToolbar.uxml"); Add(root); root.StretchToParentSize(); FilterButton.RegisterCallback <MouseDownEvent>(OnFilterButtonMouseDown); AdvancedButton.RegisterCallback <MouseDownEvent>(OnAdvancedButtonMouseDown); }
public FooterListener(AldersgateReceptionUserInterface userinterface_) : base(userinterface_) { Raise = Userinterface.Pages.GetControl <AdvancedButton>(Tsw560.FooterControls.SubpageId, Tsw560.FooterControls.VolumeRaise); Raise.HoldTime = 300; Lower = Userinterface.Pages.GetControl <AdvancedButton>(Tsw560.FooterControls.SubpageId, Tsw560.FooterControls.VolumeLower); Lower.HoldTime = 300; Fader = Userinterface.Pages.GetControl <FaderSlider>(Tsw560.FooterControls.SubpageId, Tsw560.FooterControls.VolumeFader); Fader.ProgramReceivedValueChange += FaderOnProgramReceivedValueChange; Fader.ProgramInstructedValueChange += FaderOnProgramInstructedValueChange; Raise.TouchAction += VolumeUp; Lower.TouchAction += VolumeDown; }
public HomeListener(AldersgateReceptionUserInterface userinterface_) : base(userinterface_, Tsw560.Pages.Home) { _laptop = Userinterface.Pages.GetObjectControl <AdvancedButton>(Tsw560.Pages.Home, Tsw560.HomeControls.Laptop); _pc = Userinterface.Pages.GetObjectControl <AdvancedButton>(Tsw560.Pages.Home, Tsw560.HomeControls.PC); _wireless = Userinterface.Pages.GetObjectControl <AdvancedButton>(Tsw560.Pages.Home, Tsw560.HomeControls.Wireless); DrawButton(_laptop, 1); DrawButton(_pc, 2); DrawButton(_wireless, 3); _laptop.TouchAction += SourceTouchAction; _pc.TouchAction += SourceTouchAction; _wireless.TouchAction += SourceTouchAction; }
protected override void Awake() { hitbox = GetComponent <BoxCollider>(); image = GetComponent <Image>(); icon = transform.Find("Icon").GetComponent <Image>(); text = transform.Find("Text").GetComponent <Text>(); button = GetComponent <AdvancedButton>(); rect = GetComponent <RectTransform>(); hitbox.isTrigger = true; base.Awake(); if (DestroyOnAwake) { Destroy(this); } }
//*************************************************************************** // Class Constructors // public DataPanelManager(int id, string key, string name, Panel tabPan, AdvancedButton tab, AnimWidgetRotator anim, DataQueryPanel qryPanel, ContextMenuStrip mnuPanel, ContextMenuStrip mnuTabButton) { this.ID = id; this._colKey = key; this._panNm = name; this.TabPanel = tabPan; this.TabButton = tab; this.AnimWidget = anim; this.QueryPanel = qryPanel; this.TabMenuStrip = mnuTabButton; this.PanelMenuStrip = mnuPanel; this._msgLog = new StringCollection(); this.QueryPanel.QueryStart += new EventHandler(this.DataPanel_onQueryExecStart); this.QueryPanel.QueryComplete += new EventHandler(this.DataPanel_onQueryExecStop); this.QueryPanel.QueryTextChanged += new EventHandler(this.DataPanel_onQueryChanged); this.QueryPanel.ConnectionTypeChanged += new EventHandler(this.DataPanel_onConnectionTypeChanged); this.QueryPanel.ConnectionStringChanged += new EventHandler(this.DataPanel_onConnectionStringChanged); this.QueryPanel.SetOwner(this); }
void ReleaseDesignerOutlets() { if (OtherButton6 != null) { OtherButton6.Dispose(); OtherButton6 = null; } if (OtherButton5 != null) { OtherButton5.Dispose(); OtherButton5 = null; } if (AddMonsterButton != null) { AddMonsterButton.Dispose(); AddMonsterButton = null; } if (RacialView != null) { RacialView.Dispose(); RacialView = null; } if (SimpleView != null) { SimpleView.Dispose(); SimpleView = null; } if (OtherView != null) { OtherView.Dispose(); OtherView = null; } if (SimpleHeaderView != null) { SimpleHeaderView.Dispose(); SimpleHeaderView = null; } if (RacialHeaderView != null) { RacialHeaderView.Dispose(); RacialHeaderView = null; } if (OtherHeaderView != null) { OtherHeaderView.Dispose(); OtherHeaderView = null; } if (AdvancedButton != null) { AdvancedButton.Dispose(); AdvancedButton = null; } if (SimpleSizeButton != null) { SimpleSizeButton.Dispose(); SimpleSizeButton = null; } if (OutsiderButton != null) { OutsiderButton.Dispose(); OutsiderButton = null; } if (AugmentSummoningButton != null) { AugmentSummoningButton.Dispose(); AugmentSummoningButton = null; } if (RacialHitDieButton != null) { RacialHitDieButton.Dispose(); RacialHitDieButton = null; } if (RacialBonusButton != null) { RacialBonusButton.Dispose(); RacialBonusButton = null; } if (RacialSizeButton != null) { RacialSizeButton.Dispose(); RacialSizeButton = null; } if (OtherTemplateButton != null) { OtherTemplateButton.Dispose(); OtherTemplateButton = null; } if (AdvancerHeaderView != null) { AdvancerHeaderView.Dispose(); AdvancerHeaderView = null; } if (ResetButton != null) { ResetButton.Dispose(); ResetButton = null; } if (OtherTemplateOptionView != null) { OtherTemplateOptionView.Dispose(); OtherTemplateOptionView = null; } if (OtherButton1 != null) { OtherButton1.Dispose(); OtherButton1 = null; } if (OtherButton2 != null) { OtherButton2.Dispose(); OtherButton2 = null; } if (OtherButton3 != null) { OtherButton3.Dispose(); OtherButton3 = null; } if (OtherButton4 != null) { OtherButton4.Dispose(); OtherButton4 = null; } }
public void UpdateButtonState() { StyleButton(AdvancedButton, advancedLevel > 0); if (advancedLevel == 0) { AdvancedButton.SetText("Advanced"); } else { AdvancedButton.SetText("Advanced x" + advancedLevel); } StyleButton(SimpleSizeButton, simpleSize != 0); if (simpleSize == 0) { SimpleSizeButton.SetText("Size"); } else if (simpleSize < 0) { SimpleSizeButton.SetText("Young x" + (-simpleSize)); } else { SimpleSizeButton.SetText("Giant x" + simpleSize); } StyleButton(OutsiderButton, simpleOutsiderType != null); if (simpleOutsiderType != null) { OutsiderButton.SetText(Monster.GetOutsiderTypeName(simpleOutsiderType.Value).Capitalize()); } else { OutsiderButton.SetText("Outsider"); } StyleButton(AugmentSummoningButton, augmentSummoning); bool racialChange = racialHDChange != 0; StyleButton(RacialHitDieButton, racialChange); StyleButton(RacialBonusButton, racialChange); StyleButton(RacialSizeButton, racialChange); if (!racialChange) { RacialHitDieButton.SetText("Racial Hit Dice"); } else { RacialHitDieButton.SetText(racialHDChange.PlusFormat() + " HD"); } RacialBonusButton.SetText("Bonus Stat " + Monster.ShortStatText(racialBonusStat)); if (racialSizeChange) { RacialSizeButton.SetText("Size Change 50% HD"); } else { RacialSizeButton.SetText("No Size Change"); } StyleButton(OtherTemplateButton, template != AdvancerTemplate.None); switch (template) { case AdvancerTemplate.None: case AdvancerTemplate.Vampire: OtherTemplateButton.SetText("Other Template"); SetOtherButtonsVisible(0); break; case AdvancerTemplate.Skeleton: OtherTemplateButton.SetText("Skeleton"); SetOtherButtonsVisible(3); for (int i = 0; i < 3; i++) { _OtherButtons[i].SetText(SkeletonText(i)); _OtherButtons[i].Tag = i; StyleButton(_OtherButtons[i], _SelectedSkeletonTypes[i]); } break; case AdvancerTemplate.Zombie: OtherTemplateButton.SetText("Zombie"); SetOtherButtonsVisible(1); _OtherButtons[0].SetText(ZombieText(_ZombieType, false)); break; case AdvancerTemplate.HalfCelestial: case AdvancerTemplate.HalfFiend: SetOtherButtonsVisible(6); OtherTemplateButton.SetText(template == AdvancerTemplate.HalfCelestial?"Half-Celestial":"Half-Fiend"); for (int i = 0; i < 6; i++) { _OtherButtons[i].SetText(Monster.StatText((Stat)i)); _OtherButtons[i].Tag = i; StyleButton(_OtherButtons[i], _SelectedStats[i]); } break; case AdvancerTemplate.HalfDragon: OtherTemplateButton.SetText("Half-Dragon"); _OtherButtons[0].SetText(_DragonColor.Capitalize()); SetOtherButtonsVisible(1); break; } }
void Awake() { advButton = new AdvancedButton( 0.1f, 0.3f, 1f ); }
private void OnLeavePanel(DetachFromPanelEvent evt) { FilterButton.UnregisterCallback <MouseDownEvent>(OnFilterButtonMouseDown); AdvancedButton.UnregisterCallback <MouseDownEvent>(OnAdvancedButtonMouseDown); }
private void OnEnterPanel(AttachToPanelEvent evt) { FilterButton.RegisterCallback <MouseDownEvent>(OnFilterButtonMouseDown); AdvancedButton.RegisterCallback <MouseDownEvent>(OnAdvancedButtonMouseDown); }
#pragma warning restore 0219, 414 protected override void OnEnable() { base.OnEnable(); this._sAdvancedButton = this.target as AdvancedButton; }