public MyGuiScreenSecurityControlHUB(MySmallShip useBy, MyPrefabSecurityControlHUB prefabSecurityControlHUB) : base(new Vector2(0.505f, 0.5f), MyGuiConstants.SCREEN_BACKGROUND_COLOR, new Vector2(0.57f, 0.96f), true, MyGuiManager.GetHubBackground()) { AddCaption(MyTextsWrapperEnum.SecurityControlHUB, new Vector2(0, 0.005f)); m_prefabSecurityControlHUB = prefabSecurityControlHUB; m_useBy = useBy; m_entitiesGui = new List <MyGuiControlEntityUse>(); RecreateControls(true); /* * Controls.Add(new MyGuiControlButton(this, new Vector2(0f, 0.45f), MyGuiConstants.MESSAGE_BOX_BUTTON_SIZE, MyGuiConstants.BUTTON_BACKGROUND_COLOR, * MyTextsWrapperEnum.Exit, MyGuiConstants.BUTTON_TEXT_COLOR, MyGuiConstants.BUTTON_TEXT_SCALE, OnExitClick, * MyGuiControlButtonTextAlignment.CENTERED, true, MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER, true)); * */ MyGuiScreenGamePlay.Static.ReleasedControlOfEntity += OnGameReleasedControlOfEntity; MyGuiScreenGamePlay.Static.RollLeftPressed += OnSwitchPrevious; MyGuiScreenGamePlay.Static.RollRightPressed += OnSwitchNext; MySession.PlayerShip.OnDie += OnPlayerShipDie; MySession.Static.Player.AliveChanged += Player_AliveChanged; m_prefabSecurityControlHUB.OnEntityDisconnected += m_prefabSecurityControlHUB_OnEntityDisconnected; }
public MyGuiScreenEntityUseSolo(IMyHasGuiControl entity) : base(new Vector2(0.505f, 0.5f), MyGuiConstants.SCREEN_BACKGROUND_COLOR, new Vector2(0.57f, 0.91f), true, MyGuiManager.GetHubBackground()) { m_entity = entity; RecreateControls(true); MyGuiScreenGamePlay.Static.ReleasedControlOfEntity += OnGameReleasedControlOfEntity; MySession.PlayerShip.OnDie += OnPlayerShipDie; entity.GetEntity().OnMarkForClose += OnEntityMarkForClose; }