private void closeQuests() { DButton dButton = new DButton(); dButton.Id = "QuestLogAdventureExit"; Service.Get <EventDispatcher>().DispatchEvent(new ButtonEvents.ClickEvent(dButton)); }
public void OnShowSpeechClick() { DCinematicSpeech dCinematicSpeech = new DCinematicSpeech(); dCinematicSpeech.Text = Service.Get <Localizer>().GetTokenTranslation(SpeechInput.text); dCinematicSpeech.BubbleContentKey = "Prefabs/Quest/CinematicSpeedBubbles/CinematicSpeechBubbleDynamic"; DButton dButton = new DButton(); dButton.Text = "Yes"; dButton.ButtonPrefabKey = "Prefabs/Buttons/Button_Test"; DButton dButton2 = new DButton(); dButton2.Text = "No"; dButton2.ButtonPrefabKey = "Prefabs/Buttons/Button_Test"; dCinematicSpeech.Buttons = new DButton[2] { dButton, dButton2 }; DTextStyle dTextStyle = new DTextStyle(); dTextStyle.ColorHex = "08FF08"; dTextStyle.FontContentKey = "Fonts/Draculon-Regular"; dCinematicSpeech.TextStyle = dTextStyle; dCinematicSpeech.BackgroundImageKey = "Sprites/CinematicSpeechBubbles/CinematicSpeachBubble_RockHopper"; Service.Get <EventDispatcher>().DispatchEvent(new CinematicSpeechEvents.ShowSpeechEvent(dCinematicSpeech)); }
public override void OnClick(ButtonClickListener.ClickType clickType) { DButton dButton = new DButton(); dButton.Id = "MainNavControl"; Service.Get <EventDispatcher>().DispatchEvent(new ButtonEvents.ClickEvent(dButton)); setState(MainNavButtonState.SELECTED); }
public void ShowButton(DButton buttonData) { this.buttonData = buttonData; if (!string.IsNullOrEmpty(buttonData.Text)) { ButtonText.text = buttonData.Text; } if (!string.IsNullOrEmpty(buttonData.IconKey)) { CoroutineRunner.Start(loadButtonIcon(buttonData.IconKey), this, "loadButtonIcon"); } else { if (ButtonImage != null) { ButtonImage.enabled = false; } if (EButtonLoadCompleteAction != null) { EButtonLoadCompleteAction(); } } addCLickListener(); }