public void SetDialog(int _pilotNum, string _dialog) { EventDialog window = dialogWindow.GetComponent <EventDialog>(); window.dialog.text = _dialog; window.character.overrideSprite = pilotSprite[_pilotNum - 1]; dialogWindow.SetActive(true); }
void Start() { #region Learning and Test //Created a unityaction to assign to the button and remove when needed. unPauseAction = () => { _Unpause(); }; //First attempt at making the dialog box function dialogWindowRef = eventDialogWindow.GetComponent <EventDialog>(); #endregion #region UIChecks if (uiDistSlider == null) { Debug.LogWarning("No Slider Assigned on GameController"); } else { uiDistSlider.maxValue = curGoalDistance; } if (uiLevelCompletePanel == null) { Debug.LogWarning("No LevelComplete Panel Assigned to GameController Script!"); } if (uiDistGoalText == null) { Debug.Log("No Dist goal text assigned to the GameController script."); } else { uiDistGoalText.text = curGoalDistance.ToString(); } #endregion #region ScriptReferences catManager = GetComponent <CatManager>(); #endregion if (playerObj == null) { playerObj = GameObject.FindGameObjectWithTag("Player"); canTravel = true; } else { canTravel = true; } //Load Map Debug.Log("Loading first map."); GetComponent <TileLoader>().LoadMap(level1); //Initialize Cats catManager.InitializeCaravan("Papa", "Mama"); }
protected void iEventTableList_SelectedIndexChanged(object sender, EventArgs e) { var f = (FormView)EventDialog.FindControl("EventForm"); var ddl = (DropDownList)f.FindControl("iEventColumnList"); for (int i = 1; i < ddl.Items.Count; i++) { ddl.Items.RemoveAt(i); } }
void ChangeCurrentDialog(int NextDialog) { if (NextDialog == 0) { return; } else { CurrentDialog = CurrentEvent.eventdialog[NextDialog]; } }
protected void EventSaveHandler(object sender, EventArgs e) { var formView = EventDialog.FindControl("EventForm") as FormView; if (formView.CurrentMode == FormViewMode.Edit) { EventForm.UpdateItem(false); } else if (formView.CurrentMode == FormViewMode.Insert) { EventForm.InsertItem(false); } EventDialog.Close(); }
protected void EventEditButton_Click(object sender, EventArgs e) { if (EventGridView.Rows.Count == 0) { return; } if (EventGridView.SelectedIndex != -1) { ((FormView)EventDialog.FindControl("EventForm")).ChangeMode(FormViewMode.Edit); EventDialog.Caption = "Редактирование события"; EventDialog.Show(EditorMode.Edit); } }
private async void MapControl1_MapElementClick(MapControl sender, MapElementClickEventArgs args) { Windows.Storage.StorageFolder folder = Windows.Storage.ApplicationData.Current.LocalFolder; Database db = new Database(folder.Path + "\\sheet.csv"); MapIcon myClickedIcon = args.MapElements.FirstOrDefault(x => x is MapIcon) as MapIcon; EventDialog.Title = myClickedIcon.Title; EventDialog.Tag = myClickedIcon.Tag; int eventId = int.Parse(EventDialog.Tag.ToString()); Tilteblock.Text = db.getAttributeById(eventId, "description"); ////fill in one sentence discription Time.Text = "Date:" + db.getAttributeById(eventId, "date"); //////fill in date Venue.Text = "Venue" + db.getAttributeById(eventId, "venue"); /////fill in venue await EventDialog.ShowAsync(); }
public void ChangeCurrentStory() { float Chance; Chance = Mathf.Floor(Random.Range(1, 100)); if (Chance < 91) { CurrentEvent = RandomAttack.stories[0]; CurrentDialog = CurrentEvent.eventdialog[0]; } else { CurrentEvent = MainStory.stories[0]; CurrentDialog = CurrentEvent.eventdialog[0]; } UpdateDialogBox(); }
public void StartDialog(EventDialog e, string npcName) { ResetDialog(); _currentDialog = e.dialog; if (e.onDialogEnd != null) { _invokeEvent = !(e.invokeEventOnce && e.wasEventInvoked); if (_invokeEvent) { _dialogEvent = e.onDialogEnd; e.wasEventInvoked = true; } } SetDialog(npcName); }
internal void Do() { EventDialog eventDlg = new EventDialog(@event.Desc, @event.OptionDescList); eventDlg.ShowDialog(); }
public void NewGameStory() { CurrentEvent = MainStory.stories[0]; CurrentDialog = CurrentEvent.eventdialog[0]; UpdateDialogBox(); }
private void ShowEventDialog(object sender, RoutedEventArgs e) { var s = new EventDialog(); s.Show(); }
protected void EventAddButton_Click(object sender, EventArgs e) { ((FormView)EventDialog.FindControl("EventForm")).ChangeMode(FormViewMode.Insert); EventDialog.Caption = "Создание события"; EventDialog.Show(EditorMode.Insert); }