示例#1
0
        public void Show(int var_id, SelectAction select_handler = null)
        {
            Reset(var_id, select_handler);

            m_Var = m_VarManager.GetVarByID(var_id);
            ImGui.OpenPopup(m_PopupID);
        }
示例#2
0
 //Var Event
 void ManagerEventProc(diObjectManager <IVar> .EObjectEvent eObjectEvent, IVar @var)
 {
     switch (eObjectEvent)
     {
     case diObjectManager <IVar> .EObjectEvent.Delete:
         @var.OnVarDelete();         //Notify var delete action
         break;
     }
 }
示例#3
0
 //List Event
 void ListItemEventProc(VarListView.EListItemEvent eEvent, IVar variable)
 {
     switch (eEvent)
     {
     case VarListView.EListItemEvent.SelectItem:
         m_DiObjectManager.m_SelectedTObj = variable;
         PrintRightView.Instance.Submit(DrawVarInfo);
         break;
     }
 }
示例#4
0
        void ListMenuItemEventProc(ListMenuView.EMenuEvent eMenuEvent, ListMenuView.EItemEvent eItemEvent, IVar variable)
        {
            switch (eItemEvent)
            {
            case ListMenuView.EItemEvent.Delete:
                TryDeleteVar(variable.Name);
                break;

            case ListMenuView.EItemEvent.Duplicate:
                IVar dup = (IVar)variable.Duplicate();
                AddVar(dup);
                break;
            }
        }
示例#5
0
        void OnSelectVarGetSet(IVar variable, PopupVarGetSet.MenuType selectType)
        {
            Logger.Info("Var Menu Select:" + selectType);
            if (NodeGraph == null)
            {
                return;
            }

            switch (selectType)
            {
            case PopupVarGetSet.MenuType.Get:
                AddNode(variable.GetNewGetter(NodeGraph));
                break;

            case PopupVarGetSet.MenuType.Set:
                AddNode(variable.GetNewSetter(NodeGraph));
                break;
            }
        }
示例#6
0
 public void Reset(int var_id, SelectAction select_handler = null)
 {
     m_Var     = m_VarManager.GetVarByID(var_id);
     m_Handler = select_handler;
 }
示例#7
0
 public bool TryReplaceVar(IVar old_var, IVar new_var) => m_DiObjectManager.ReplaceObject(old_var, new_var);
示例#8
0
 public void AddVar(IVar variable) => m_DiObjectManager.AddObject(variable);
示例#9
0
 public void ChageVar(IVar variable)
 {
     m_Var = variable;
     OnVarTypeChange();
 }
示例#10
0
 public VarOC(IVar variable, bool show_name = true)
 {
     m_ShowName = show_name;
     m_Var      = variable;
 }
示例#11
0
 public void ChageVar(IVar variable)
 {
     m_Var = variable;
 }
示例#12
0
 public VarIC(IVar variable)
 {
     m_Var = variable;
 }