public void Dispose() { TopWindowValue = null; MarketButtonValue = null; PlayernameLabelValue = null; DepotButtonValue = null; PlayerbalanceLabelValue = null; }
public void Dispose() { NewgameWindowValue = null; BackButtonValue = null; StartButtonValue = null; NameLabelValue = null; NameTextfieldValue = null; }
public void Dispose() { OptionsWindowValue = null; BackButtonValue = null; ResolutionLabelValue = null; ResOpt1ToggleValue = null; ResOpt2ToggleValue = null; ResOpt3ToggleValue = null; }
/// <summary> /// Initialization /// </summary> void Start() { //Find Controls window = this.transform.GetComponent(typeof(BitWindow)) as BitWindow; btnOK = this.transform.FindChild("btnOk").GetComponent<BitButton>(); levelManager = GameObject.FindObjectOfType(typeof(LevelManagerScript)) as LevelManagerScript; lblTitle = this.transform.FindChild("lblTitle").GetComponent<BitLabel>(); lblMessage = this.transform.FindChild("lblMessage").GetComponent<BitLabel>(); //Subscribe to events btnOK.MouseClick += new Bitverse.Unity.Gui.MouseClickEventHandler(btnOK_MouseClick); //Don't show the windows this.window.Enabled = false; this.window.Visible = false; }
/// <summary> /// Initialization /// </summary> void Start() { //Find Controls window = this.transform.GetComponent(typeof(BitWindow)) as BitWindow; btnOK = this.transform.FindChild("btnOk").GetComponent <BitButton>(); levelManager = GameObject.FindObjectOfType(typeof(LevelManagerScript)) as LevelManagerScript; lblTitle = this.transform.FindChild("lblTitle").GetComponent <BitLabel>(); lblMessage = this.transform.FindChild("lblMessage").GetComponent <BitLabel>(); //Subscribe to events btnOK.MouseClick += new Bitverse.Unity.Gui.MouseClickEventHandler(btnOK_MouseClick); //Don't show the windows this.window.Enabled = false; this.window.Visible = false; }
public void Dispose() { MarketWindowValue = null; _1ItemlistLabelValue = null; CloseButtonValue = null; BuyButtonValue = null; ItemlistGroupValue = null; ItemListValue = null; ItemGroupValue = null; ItemnameLabelValue = null; ItempriceLabelValue = null; ItemimagePictureValue = null; DescriptionGroupValue = null; DescriptionTextareaValue = null; DescriptionLabelValue = null; PriceLabelValue = null; NameLabelValue = null; }
private void OpenTopWindow() { var accessor = new TopWindowGuiAcessor(OpenWindow(TopPrefab)); accessor.PlayernameLabel.Text = _player.Name; accessor.PlayerbalanceLabel.Text = "$ " + _player.Balance; _balanceLabel = accessor.PlayerbalanceLabel; accessor.MarketButton.MouseClick += (sender, e) => { if (_marketOpen) { UnloadWindow(MarketPrefab); _marketOpen = false; return; } OpenMarketWindow(); _marketOpen = true; }; accessor.DepotButton.MouseClick += (sender, e) => { if (_depotOpen) { UnloadWindow(DepotPrefab); _depotOpen = false; return; } OpenDepotWindow(); _depotOpen = true; }; }
public void Start() { _tag = new Dictionary <BitButton, int>(); Component[] windows = gameObject.GetComponents(typeof(BitWindow)); BitWindow window = null; for (int i = 0; i < windows.Length; i++) { if (windows[i].name == "calculator_window") { window = (BitWindow)windows[i]; } } if (window == null) { Debug.LogError("Main window not found."); return; } _result = window.FindControl <BitLabel>("Result"); _resultLabel = window.FindControl <BitLabel>("ResultLabel"); _group = window.FindControl <BitGroup>("Group"); BitButton b; for (int i = 0; i < 10; i++) { b = _group.FindControl <BitButton>(i.ToString()); _tag.Add(b, i); b.MouseClick += NumericClick; } b = _group.FindControl <BitButton>("."); b.MouseClick += DotClick; b = _group.FindControl <BitButton>("+"); _tag.Add(b, (int)Operations.Plus); b.MouseClick += OperationClick; b = _group.FindControl <BitButton>("-"); _tag.Add(b, (int)Operations.Minus); b.MouseClick += OperationClick; b = _group.FindControl <BitButton>("*"); //b.Tag = Operations.Multiplication; _tag.Add(b, (int)Operations.Multiplication); b.MouseClick += OperationClick; b = _group.FindControl <BitButton>("/"); _tag.Add(b, (int)Operations.Division); b.MouseClick += OperationClick; b = _group.FindControl <BitButton>("="); b.MouseClick += EqualsClick; b = _group.FindControl <BitButton>("C"); b.MouseClick += ClearClick; b = _group.FindControl <BitButton>("Bk"); b.MouseClick += BackClick; Reset(); }
private void Start() { _form = gameObject.GetComponent <BitEditorStage>(); if (_form == null) { Debug.LogError("Form not found"); return; } _window = _form.FindControl <BitWindow>("main_window"); if (_window == null) { Debug.LogError("'main_window' not found"); return; } _simpleButton = _window.FindControl <BitButton>("SimpleButton"); if (_simpleButton == null) { Debug.LogWarning("'SimpleButton' not found!"); } else { _simpleButton.MouseClick += SimpleButton_MouseClick; } _repeatButton = _window.FindControl <BitRepeatButton>("RepeatButton"); if (_repeatButton == null) { Debug.LogWarning("'RepeatButton' not found!"); } else { _repeatButton.MouseHold += RepeatButtonMouseHold; } _textGroup = _window.FindControl <BitGroup>("TextGroup"); if (_textGroup == null) { Debug.Log("'TextGroup' not fount!"); } _toggle = _window.FindControl <BitToggle>("Toggle"); if (_toggle == null) { Debug.LogWarning("'Toggle' not found!"); } else { _toggle.ValueChanged += Toggle_ValueChanged; if (_textGroup != null) { _textGroup.Enabled = false; } } if (_textGroup != null) { _textField = _textGroup.FindControl <BitTextField>("TextField"); if (_textField == null) { Debug.LogWarning("'TextField' not found!"); } else { _textField.TextChanged += TextChanged; } _textArea = _textGroup.FindControl <BitTextArea>("TextArea"); if (_textArea == null) { Debug.LogWarning("'TextArea' not found!"); } else { _textArea.TextChanged += TextChanged; } _passwordField = _textGroup.FindControl <BitPasswordField>("PasswordField"); if (_passwordField == null) { Debug.LogWarning("'PasswordField' not found!"); } else { _passwordField.TextChanged += TextChanged; } } _textureGroup = _window.FindControl <BitGroup>("TextureGroup"); if (_textureGroup == null) { Debug.LogWarning("'TextureGroup' not found!"); } else { // _texture = _textureGroup.FindControl<BitDrawTexture>("Texture"); // if (_texture == null) // { // Debug.LogWarning("'Texture' not found!"); // } } _hsLabel = _window.FindControl <BitLabel>("HorizontalSlider Label"); if (_hsLabel == null) { Debug.LogWarning("'HorizontalSlider Label' not found!"); } _horizontalSlider = _window.FindControl <BitHorizontalSlider>("HorizontalSlider"); if (_horizontalSlider == null) { Debug.LogWarning("'HorizontalSlider' not found!"); } else { _horizontalSlider.ValueChanged += HorizontalSlider_ValueChanged; } _vsLabel = _window.FindControl <BitLabel>("VerticalSlider Label"); if (_vsLabel == null) { Debug.LogWarning("'VerticalSlider Label' not found!"); } _verticalSlider = _window.FindControl <BitVerticalSlider>("VerticalSlider"); if (_verticalSlider == null) { Debug.LogWarning("'HorizontalSlider' not found!"); } else { _verticalSlider.ValueChanged += VerticalSlider_ValueChanged; } _gridList = _window.FindControl <BitGridList>("GridList"); if (_gridList == null) { Debug.LogWarning("'GridList' not found!"); } else { _gridList.Populator = new DefaultBitListPopulator(); } _multiselectionToggle = _window.FindControl <BitToggle>("MultiSelection Toggle"); if (_multiselectionToggle == null) { Debug.LogWarning("'MultiSelection Toggle' not found!"); } else { _multiselectionToggle.ValueChanged += MultiselectionToggle_ValueChanged; } _list = _window.FindControl <BitList>("List"); if (_list == null) { Debug.LogWarning("'List' not found!"); } else { _list.Populator = new MyListPopulator(); _list.SelectionChanged += List_SelectionChanged; } _listSelectionLabel = _window.FindControl <BitLabel>("ListSelection Label"); if (_listSelectionLabel == null) { Debug.LogWarning("'ListSelection Label' not found!"); } _labelWithPopup = _window.FindControl <BitLabel>("Label With Popup"); if (_labelWithPopup == null) { Debug.LogWarning("'Label With Popup' not found!"); } PopulateDropDown(); PopulateContextMenu(); }
public MarketItemListPopulator(MarketWindowGuiAcessor accessor) { _itemPicture = accessor.ItemimagePicture; _nameLabel = accessor.ItemnameLabel; _priceLabel = accessor.ItempriceLabel; }