예제 #1
0
 public void OnSelectionMade(StatementCompletionItem statementCompletionItem)
 {
     if (SelectionMade != null)
     {
         SelectionMade.Invoke(statementCompletionItem);
     }
 }
예제 #2
0
파일: HamStage.cs 프로젝트: datalurkur/HAM
	public void AwaitSelection(Dictionary<int, string> selections, SelectionMade callback)
	{
		this.Writer.ClearText();
		bool first = true;
		foreach (int key in selections.Keys)
		{
			GameObject clickable = Instantiate(this.ClickablePrefab);
			clickable.name = "Decision_" + selections[key];
			clickable.transform.SetParent(this.ClickableContainer.transform, false);

			clickable.GetComponentInChildren<Text>().text = selections[key];
			int thisKey = key;
			clickable.GetComponentInChildren<Button>().onClick.AddListener(() => { MakeSelection(thisKey); });

			clickables.Add(clickable);

			if (first)
			{
				EventSystem.current.SetSelectedGameObject(clickable);
				first = false;
			}
		}
		this.Selecting = true;
		this.selectionCallback = callback;
	}
 private void EndSelection()
 {
     if (!_startPoint.HasValue || !_endPoint.HasValue)
     {
         _startPoint = null;
         return;
     }
     SelectionMade?.Invoke(this, new Rect(_startPointOriginal, _endPointOriginal));
     CleanSelection();
 }
예제 #4
0
파일: HamStage.cs 프로젝트: datalurkur/HAM
	public void MakeSelection(int key)
	{
		this.selectionCallback(key);
		this.selectionCallback = null;

		for (int i = 0; i < this.clickables.Count; ++i)
		{
			Destroy(this.clickables[i]);
		}	
		this.clickables.Clear();

		this.selectionOrder.Clear();
		this.Selecting = false;
	}
예제 #5
0
 private void SearchItemClicked(object sender, ItemClickEventArgs e)
 {
     // raise event
     SelectionMade?.Invoke(this, e.ClickedItem as string);
 }
예제 #6
0
 private void GetActionFrameMeta_PreFramePopped()
 {
     SelectedInspectable = SingularFocus;
     SelectionMade?.Invoke();
 }
예제 #7
0
 protected virtual void OnSelectionMade(HomeScreenSelectionMadeEventArgs e)
 {
     SelectionMade?.Invoke(this, e);
 }
 /// <summary>Call back for OnAction events from the drop-down ribbon elements.</summary>
 public void OnSelectionMade(IRibbonControl control, string selectedId, int selectedIndex)
 {
     SelectionMade?.Invoke(control, selectedId, selectedIndex);
     Invalidate();
 }