Пример #1
0
        private static void UpdateRemoveAndDepowerButton(MyGuiScreenAdminMenu menu, long entityId)
        {
            MyEntity entity;

            MyEntities.TryGetEntityById(entityId, out entity);
            menu.m_removeItemButton.Enabled = entity == null ? false : !(entity is MyCharacter);
            if (menu.m_depowerItemButton != null)
            {
                menu.m_depowerItemButton.Enabled = entity == null ? false : !(entity is MyCharacter);
            }
        }
Пример #2
0
 private static void UpdateRemoveAndDepowerButton(MyGuiScreenAdminMenu menu,long entityId)
 {
     MyEntity entity;
     MyEntities.TryGetEntityById(entityId, out entity);
     menu.m_removeItemButton.Enabled = entity == null ? false : !(entity is MyCharacter);
     if (menu.m_depowerItemButton != null)
     {
         menu.m_depowerItemButton.Enabled = entity == null ? false : !(entity is MyCharacter);
     }
 }