public void Show() { mListBox.Clear(); int y = 0; const int NUM_SCENARIOS = 0; for (int i = 0; i < NUM_SCENARIOS; i++) { var button = new WidgetButton(); button.Text = "Arena"; button.SetId("Arena"); var innerWidth = mListBox.GetInnerWidth(); button.Width = innerWidth; button.SetAutoSizeWidth(false); button.SetStyle("mm-setpieces-list-button"); button.Y = y; btnIds.Add(button); var idx = i; button.SetClickHandler(() => Select(idx)); y += button.Height; mListBox.Add(button); } mWidget.Show(); }
private void CreateExitButton() { var exitButton = new WidgetButton(_uiParams.CharUiMainExitButton); exitButton.SetAutoSizeHeight(false); exitButton.SetAutoSizeWidth(false); exitButton.SetStyle(new WidgetButtonStyle { DisabledImagePath = _uiParams.TexturePaths[CharUiTexture.MainExitButtonDisabled], HoverImagePath = _uiParams.TexturePaths[CharUiTexture.MainExitButtonHoverOn], NormalImagePath = _uiParams.TexturePaths[CharUiTexture.MainExitButtonHoverOff], PressedImagePath = _uiParams.TexturePaths[CharUiTexture.MainExitButtonHoverPressed] }); exitButton.SetClickHandler(ExitClicked); _mainWidget.Add(exitButton); }
public void Show() { mListBox.Clear(); btnIds.Clear(); seenIndices.Clear(); for (var i = 0; i < movieIds.Count; i++) { if (IsMovieSeen(movieIds[i], -1)) { seenIndices.Add(i); } } int y = 0; for (int i = 0; i < seenIndices.Count; i++) { var movieInd = seenIndices[i]; var button = new WidgetButton(); button.Text = mMovieNames[movieInd]; button.SetId(mMovieNames[movieInd]); var innerWidth = mListBox.GetInnerWidth(); button.Width = innerWidth; button.SetAutoSizeWidth(false); button.SetStyle("mm-cinematics-list-button"); button.Y = y; //var pBtn = button.get(); btnIds.Add(button); var selectIdx = i; button.SetClickHandler(() => Select(selectIdx)); y += button.Height; mListBox.Add(button); } mWidget.Show(); }