public void Init() { _tutorial = new ExclusiveChoicesTutorial(); _subView = new ScanView(_person, DisableDialogueControls, InitDialogueOptions, () => !_isPresentingToUser); _subView.Init(); _endConversationButton = new ImageTextButton(new Transform2(new Rectangle(-684, 960, 1380, 64)), _onFinished, "Ok, great.", "Convo/DialogueButton", "Convo/DialogueButton-Hover", "Convo/DialogueButton-Press") { TextColor = Color.White, TextTransform = new Transform2(new Vector2(60, 960), new Size2(1380 - 684, 64)), TextAlignment = HorizontalAlignment.Left }; _characterView = new CharacterView(_person, () => _shouldShowDialogueControls); _playerView = new PlayerCharacterView(() => _shouldShowDialogueControls); _onNextDialogueElement = x => { _characterView.UpdateDialogue(x); _playerView.UpdateDialogue(x); }; if (_person.IsImmediatelyTalking()) { _person.StartImmediatelyTalking(StartDialogue); } else { InitDialogueOptions(); } }
public void Init() { _clickUI = new ClickUI(); _credits = UiButtons.Menu("Credits", new Vector2(UI.OfScreenWidth(0.5f) - 180, 900), () => Scene.NavigateTo(GameResources.CreditsSceneName)); _chatBox = new ChatBox("", 1670, DefaultFont.Value, CurrentOptions.MillisPerTextCharacter, 32) { SoundsEnabled = false }; _clickUI.Add(_credits); _clickUI.Add(new ScreenClickable(_chatBox.CompletelyDisplayMessage)); CalculateLinchPins(); GenerateWallOfText(); }
private ChoiceUI(string title, Action backAction, bool backButtonActive, params OptionUI[] options) { _title = new Label { Text = title, Font = GuiFonts.Header, TextColor = UiColors.InGame_Text, Transform = new Transform2(new Vector2(0.22.VW(), 0.1.VH()), new Size2(0.75.VW(), 80)) }; _options = options.ToList(); _backButton = new TextButton(new Rectangle(700, 800, 200, 35), backAction, "Back", UiColors.Buttons_Default, UiColors.Buttons_Hover, UiColors.Buttons_Press, () => backButtonActive); Branch = new ClickUIBranch("Choice", 2); Branch.Add(_backButton); _options.ForEach(x => Branch.Add(x)); }
protected void Add(VisualClickableUIElement e) { _clickUi.Add(e); _visuals.Add(e); }
private void AddToRoom(VisualClickableUIElement e) { _visuals.Add(e); _investigateRoomBranch.Add(e); }
private void AddConfirmationButton(VisualClickableUIElement button) { _confirmationBranch.Add(button); _confirmationVisuals.Add(button); }