private void _treeList_OnSelect(UIActionEvent e, UIElement sender) { var list = (UIBrowserTreeList)sender; var target = (BrowserTreeDisplayNode)list.SelectedElement; OnSelectionChange?.Invoke(new UIActionEvent(target.BindingElement, e.TimeStamp), this); }
public void SendEvent(UIActionEvent e) { if (m_listener != null) { m_listener.HandleEvent(e); } }
override public void HandleEvent(UIActionEvent e) { switch (e) { case UIActionEvent.GAME_PAUSE: worldSettings.paused = true; break; case UIActionEvent.GAME_EXIT: case UIActionEvent.GAME_BACK: case UIActionEvent.GAME_MENU: worldSettings.chunkSettings.speed = 0; worldSettings.paused = true; DeleteWorld(); break; case UIActionEvent.GAME_FINISH: worldSettings.paused = true; break; case UIActionEvent.GAME_START: case UIActionEvent.GAME_RESTART: DeleteWorld(); CreateWorld(); worldSettings.paused = false; worldSettings.chunkSettings.speed = 0; break; case UIActionEvent.GAME_CONTINUE: worldSettings.paused = false; break; } }
public virtual void UnFocus(UIActionEvent e) { IsFocused = false; OnUnFocused?.Invoke(e, this); if (PropagationRule.HasFlag(PropagationFlags.UnFocus)) { Parent?.UnFocus(e); } }
public virtual void FocusOn(UIActionEvent e) { IsFocused = true; OnFocused?.Invoke(e, this); if (PropagationRule.HasFlag(PropagationFlags.FocusOn)) { Parent?.FocusOn(e); } }
//private void _editor_OnPropertyChanged(UIActionEvent e, UIElement sender) { // foreach (var child in _inspectorList.Elements) { // UITableBar uibar = (UITableBar)child; // if (uibar.Right is IUIUpdateable) { // (uibar.Right as IUIUpdateable).UpdateValue(); // } // } //} private void _editor_OnSizerChanged(UIActionEvent e, UIElement sender) { foreach (var child in _inspectorList.Elements) { UITableBar uibar = (UITableBar)child; if (uibar.Right is IUIUpdateable) { (uibar.Right as IUIUpdateable).UpdateValue(); } } }
private void _editor_OnSelectionChange(UIActionEvent e, UIElement sender) { if (e.Target != null) { if (e.Target != _currentFocus) { Add(e.Target); } _currentFocus = e.Target; } else { _currentFocus = null; _inspectorList.Clear(); } }
override public void HandleEvent(UIActionEvent e) { switch (e) { case UIActionEvent.GAME_MENU: case UIActionEvent.GAME_BACK: menuObject.SetActive(true); pauseObject.SetActive(false); gameoverObject.SetActive(false); pausebuttonObject.SetActive(false); worldManager.HandleEvent(e); break; case UIActionEvent.GAME_EXIT: Application.Quit(); break; case UIActionEvent.GAME_PAUSE: pauseObject.SetActive(true); worldManager.HandleEvent(e); break; case UIActionEvent.GAME_START: menuObject.SetActive(false); pausebuttonObject.SetActive(true); worldManager.HandleEvent(e); break; case UIActionEvent.GAME_FINISH: gameoverObject.SetActive(true); worldManager.HandleEvent(e); break; case UIActionEvent.GAME_RESTART: gameoverObject.SetActive(false); pausebuttonObject.SetActive(true); worldManager.HandleEvent(e); break; case UIActionEvent.GAME_CONTINUE: pauseObject.SetActive(false); worldManager.HandleEvent(e); break; } }
private void _editor_OnPropertyChanged(UIActionEvent e, UIElement sender) { Middle.PlaceSizer(Middle.Sizer.TargetElement); }
private void Box1_OnClose(UIActionEvent e, UIElement sender) { this.IsActive = false; }
private void _editor_OnPlaceElement(UIActionEvent e, UIElement sender) { AddNode(e.Target); }
private void _editor_OnSelectionChange(UIActionEvent e, UIElement sender) { Middle.PlaceSizer(e.Target); }
virtual public void HandleEvent(UIActionEvent e) { SendEvent(e); }
private void _editor_OnSizerChanged(UIActionEvent e, UIElement sender) { _treeList.SelectedElement = FindTreeElement(e.Target); }
public void SetAllKeys(UIActionSettings actionSettings) { UIActionEventArgs action = new UIActionEventArgs(new UIActionSettings[] { actionSettings }, true); UIActionEvent?.Invoke(this, action); }
public void SendUIActions(UIActionSettings[] actionsSettings) { UIActionEventArgs action = new UIActionEventArgs(actionsSettings, false); UIActionEvent?.Invoke(this, action); }
public void SendEvent(UIActionEvent e) { m_listener.HandleEvent(e); }
private void List_OnSelect(UIActionEvent e, UIElement sender) { Value = ((EnumValueButton)((UISelectableList)e.Target).SelectedElement).Value; OnValueChange?.Invoke(new UIActionEvent(this, e.TimeStamp), this); _listPanel.IsActive = false; }
private void _sizer_OnSizerChanged(UIActionEvent e, UIElement sender) { Editor.NotifySizerChanged(Sizer); }
public override void UnFocus(UIActionEvent e) { base.UnFocus(e); _text = Value.ToString(); }
public void SendUIAction(UIActionSettings actionSettings) { UIActionEventArgs action = new UIActionEventArgs(new UIActionSettings[] { actionSettings }, false); UIActionEvent?.Invoke(this, action); }