public void Dispose() { OptionsWindowValue = null; BackButtonValue = null; ResolutionLabelValue = null; ResOpt1ToggleValue = null; ResOpt2ToggleValue = null; ResOpt3ToggleValue = null; }
void Awake(){ root = GetComponent<BitStage>(); gameControlWindow = root.FindControl<BitWindow>("EGameControlWindow"); conversation = gameControlWindow.FindControl<BitBox>("ConversationBox"); BitGroup headGroup = gameControlWindow.FindControl<BitGroup>("HeadGroup"); helpButton = headGroup.FindControl<BitButton>("help"); exitButton = headGroup.FindControl<BitButton>("exit"); progressBar = headGroup.FindControl<BitGroup>("progress_bg").FindControl<BitHorizontalProgressBar>(); tickCounter = gameControlWindow.FindControl<BitGroup>("TickCounter_bg").FindControl<BitVerticalProgressBar>(); centerGroup = gameControlWindow.FindControl<BitGroup>("CenterGroup"); skipDemoBtn = centerGroup.FindControl<BitButton>("SkipDemoBtn"); playDemoBtn = centerGroup.FindControl<BitButton>("PlayDemoBtn"); startButton = centerGroup.FindControl<BitButton>("start"); gameHelpWindow = root.FindControl<BitWindow>("EGameHelpWindow"); hPictureRender = gameHelpWindow.FindControl<BitPicture>(); hPreBtn = gameHelpWindow.FindControl<BitButton>("help_btn_prev"); hNextBtn = gameHelpWindow.FindControl<BitButton>("help_btn_next"); hCloseBtn = gameHelpWindow.FindControl<BitButton>("close"); hAlwaysShowHelp = gameHelpWindow.FindControl<BitToggle>(); gameWindow = root.FindControl<BitWindow>("GameWindow"); }
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(); }