public MyGuiContextMenuItemHelper(MyTextsWrapperEnum description, MyGuiContextMenuItemActionType actionType, bool enabled, MyTextsWrapperEnum?toolTip)
     : base(description)
 {
     ActionType = actionType;
     Enabled    = enabled;
     m_toolTip  = toolTip;
 }
        private bool CheckContextAction(MyGuiContextMenuItemActionType action)
        {
            var editorState   = MyEditor.GetCurrentState();
            var contextHelper = MyGuiContextMenuHelpers.GetEditorContextMenuHelper(editorState);

            return(contextHelper != null && contextHelper.IsActionTypeAvailable(action));
        }
 public MyGuiContextMenuItemHelper(MyTextsWrapperEnum description, MyGuiContextMenuItemActionType actionType, bool enabled, MyTextsWrapperEnum? toolTip)
     : base(description)
 {
     ActionType = actionType;
     Enabled = enabled;
     m_toolTip = toolTip;
 }
 public bool IsActionTypeAvailable(MyGuiContextMenuItemActionType actionType)
 {
     return MenuItemHelpers.Exists(a => a.ActionType == actionType);
 }
 private bool CheckContextAction(MyGuiContextMenuHelper contextHelper, MyGuiContextMenuItemActionType action)
 {
     return(contextHelper != null && contextHelper.IsActionTypeAvailable(action));
 }
Beispiel #6
0
 public bool IsActionTypeAvailable(MyGuiContextMenuItemActionType actionType)
 {
     return(MenuItemHelpers.Exists(a => a.ActionType == actionType));
 }
 private bool CheckContextAction(MyGuiContextMenuItemActionType action)
 {
     var editorState = MyEditor.GetCurrentState();
     var contextHelper = MyGuiContextMenuHelpers.GetEditorContextMenuHelper(editorState);
     return contextHelper != null && contextHelper.IsActionTypeAvailable(action);
 }
 private bool CheckContextAction(MyGuiContextMenuHelper contextHelper, MyGuiContextMenuItemActionType action)
 {
     return contextHelper != null && contextHelper.IsActionTypeAvailable(action);
 }