Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public void SendEvent(UIActionEvent e)
 {
     if (m_listener != null)
     {
         m_listener.HandleEvent(e);
     }
 }
Exemplo n.º 3
0
    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;
        }
    }
Exemplo n.º 4
0
 public virtual void UnFocus(UIActionEvent e)
 {
     IsFocused = false;
     OnUnFocused?.Invoke(e, this);
     if (PropagationRule.HasFlag(PropagationFlags.UnFocus))
     {
         Parent?.UnFocus(e);
     }
 }
Exemplo n.º 5
0
 public virtual void FocusOn(UIActionEvent e)
 {
     IsFocused = true;
     OnFocused?.Invoke(e, this);
     if (PropagationRule.HasFlag(PropagationFlags.FocusOn))
     {
         Parent?.FocusOn(e);
     }
 }
Exemplo n.º 6
0
        //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();
                }
            }
        }
Exemplo n.º 7
0
 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();
     }
 }
Exemplo n.º 8
0
    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;
        }
    }
Exemplo n.º 9
0
 private void _editor_OnPropertyChanged(UIActionEvent e, UIElement sender)
 {
     Middle.PlaceSizer(Middle.Sizer.TargetElement);
 }
Exemplo n.º 10
0
 private void Box1_OnClose(UIActionEvent e, UIElement sender)
 {
     this.IsActive = false;
 }
Exemplo n.º 11
0
 private void _editor_OnPlaceElement(UIActionEvent e, UIElement sender)
 {
     AddNode(e.Target);
 }
Exemplo n.º 12
0
 private void _editor_OnSelectionChange(UIActionEvent e, UIElement sender)
 {
     Middle.PlaceSizer(e.Target);
 }
Exemplo n.º 13
0
 virtual public void HandleEvent(UIActionEvent e)
 {
     SendEvent(e);
 }
Exemplo n.º 14
0
 private void _editor_OnSizerChanged(UIActionEvent e, UIElement sender)
 {
     _treeList.SelectedElement = FindTreeElement(e.Target);
 }
Exemplo n.º 15
0
        public void SetAllKeys(UIActionSettings actionSettings)
        {
            UIActionEventArgs action = new UIActionEventArgs(new UIActionSettings[] { actionSettings }, true);

            UIActionEvent?.Invoke(this, action);
        }
Exemplo n.º 16
0
        public void SendUIActions(UIActionSettings[] actionsSettings)
        {
            UIActionEventArgs action = new UIActionEventArgs(actionsSettings, false);

            UIActionEvent?.Invoke(this, action);
        }
Exemplo n.º 17
0
 public void SendEvent(UIActionEvent e)
 {
     m_listener.HandleEvent(e);
 }
Exemplo n.º 18
0
 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;
 }
Exemplo n.º 19
0
 private void _sizer_OnSizerChanged(UIActionEvent e, UIElement sender)
 {
     Editor.NotifySizerChanged(Sizer);
 }
Exemplo n.º 20
0
 public override void UnFocus(UIActionEvent e)
 {
     base.UnFocus(e);
     _text = Value.ToString();
 }
Exemplo n.º 21
0
        public void SendUIAction(UIActionSettings actionSettings)
        {
            UIActionEventArgs action = new UIActionEventArgs(new UIActionSettings[] { actionSettings }, false);

            UIActionEvent?.Invoke(this, action);
        }