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); }
//Var Event void ManagerEventProc(diObjectManager <IVar> .EObjectEvent eObjectEvent, IVar @var) { switch (eObjectEvent) { case diObjectManager <IVar> .EObjectEvent.Delete: @var.OnVarDelete(); //Notify var delete action break; } }
//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; } }
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; } }
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; } }
public void Reset(int var_id, SelectAction select_handler = null) { m_Var = m_VarManager.GetVarByID(var_id); m_Handler = select_handler; }
public bool TryReplaceVar(IVar old_var, IVar new_var) => m_DiObjectManager.ReplaceObject(old_var, new_var);
public void AddVar(IVar variable) => m_DiObjectManager.AddObject(variable);
public void ChageVar(IVar variable) { m_Var = variable; OnVarTypeChange(); }
public VarOC(IVar variable, bool show_name = true) { m_ShowName = show_name; m_Var = variable; }
public void ChageVar(IVar variable) { m_Var = variable; }
public VarIC(IVar variable) { m_Var = variable; }