public override void Load() { base.Load(); m_dummy = MyScriptWrapper.GetEntity(m_dummyId); MyScriptWrapper.OnDialogueFinished += MyScriptWrapperOnDialogueFinished; m_notificationWarningHurry = MyScriptWrapper.CreateNotification(MyTextsWrapperEnum.HurryUp, MyGuiManager.GetFontMinerWarsRed()); m_notificationWarningSlowDown = MyScriptWrapper.CreateNotification(MyTextsWrapperEnum.SlowDown, MyGuiManager.GetFontMinerWarsRed()); MyScriptWrapper.AddNotification(m_notificationWarningHurry); m_notificationWarningHurry.Disappear(); MyScriptWrapper.AddNotification(m_notificationWarningSlowDown); m_notificationWarningSlowDown.Disappear(); m_invalid = false; //We prevent mission fail by this when skipping with ctrl+del if ((MySession.PlayerShip.GetPosition() - m_target.GetPosition()).Length() < FailDistanceTooShort) { m_invalid = true; } //We prevent mission fail by this when skipping with ctrl+del if ((MySession.PlayerShip.GetPosition() - m_target.GetPosition()).Length() > FailDistanceTooFar) { m_invalid = true; } }
public override bool Draw(float backgroundFadeAlpha) { if (base.Draw(backgroundFadeAlpha)) { if (m_customMessage.HasValue) { MyGuiManager.DrawString(MyGuiManager.GetFontMinerWarsRed(), MyTextsWrapper.Get(m_customMessage.Value), new Vector2(0.5f, 680 / 1200f), 1f, MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER); } if (MyMultiplayerGameplay.IsRunning && !MyMultiplayerGameplay.Static.IsHost) { MyGuiManager.DrawString(MyGuiManager.GetFontMinerWarsRed(), MyTextsWrapper.Get(MyTextsWrapperEnum.GameOverInstructionsPart2MP), new Vector2(0.5f, 870 / 1200f), 1f, MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER); } else { MyGuiManager.DrawString(MyGuiManager.GetFontMinerWarsRed(), MyTextsWrapper.Get(MyTextsWrapperEnum.GameOverInstructionsPart2), new Vector2(0.5f, 870 / 1200f), 1f, MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER); } MyGuiManager.DrawString(MyGuiManager.GetFontMinerWarsRed(), MyTextsWrapper.Get(MyTextsWrapperEnum.GameOverInstructionsPart1), new Vector2(0.5f, 930 / 1200f), 1f, MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER); } return(true); }
private void AddStatRowToListbox(MyStatsRow statsRow) { StringBuilder pingText = GetStringBuilderLong(); StringBuilder killsText = GetStringBuilderShort(); StringBuilder deathsText = GetStringBuilderShort(); pingText.Append(statsRow.Ping.HasValue ? statsRow.Ping.Value.ToString() + "ms" : ""); killsText.Append(statsRow.Kills.ToString()); deathsText.Append(statsRow.Deaths.ToString()); Vector4?rowColor = null; if (statsRow.IsFaction) { if (MySession.Static.Player.Faction == statsRow.Faction) { rowColor = new Vector4(0, 1f, 0, 0.07f); } else { rowColor = new Vector4(1f, 0, 0, 0.07f); } } else if (statsRow.Id == (byte)MyClientServer.LoggedPlayer.GetUserId()) { rowColor = new Vector4(1f, 1f, 1f, 0.02f); } int rowIndex = m_statsListbox.AddRow(rowColor); var textColor = Color.White; MyGuiFont textFont; if (MyFactions.GetFactionsRelation(MySession.Static.Player.Faction, statsRow.Faction) == MyFactionRelationEnum.Friend || statsRow.Id == m_playerId) { textFont = MyGuiManager.GetFontMinerWarsGreen(); } else { textFont = MyGuiManager.GetFontMinerWarsRed(); } m_statsListbox.AddItem(new MyGuiControlListboxItem(rowIndex * 4 + 0, new MyColoredText(statsRow.Name, textColor, textFont, GetRowScale(statsRow)), null, new MyToolTips(statsRow.Name)), rowIndex, 0); m_statsListbox.AddItem(new MyGuiControlListboxItem(rowIndex * 4 + 1, new MyColoredText(killsText, textColor, textFont, GetRowScale(statsRow)), null, new MyToolTips(killsText)), rowIndex, 1); m_statsListbox.AddItem(new MyGuiControlListboxItem(rowIndex * 4 + 2, new MyColoredText(deathsText, textColor, textFont, GetRowScale(statsRow)), null, new MyToolTips(deathsText)), rowIndex, 2); m_statsListbox.AddItem(new MyGuiControlListboxItem(rowIndex * 4 + 3, new MyColoredText(pingText, textColor, textFont, GetRowScale(statsRow)), null, new MyToolTips(pingText)), rowIndex, 3); }
public override void Load() { base.Load(); MyScriptWrapper.OnDialogueFinished += MyScriptWrapperOnOnDialogueFinished; m_notification = MyScriptWrapper.CreateNotification(MyTextsWrapperEnum.DoNotGoThere, MyGuiManager.GetFontMinerWarsRed()); m_target = MyScriptWrapper.GetEntity(m_targetId); MyScriptWrapper.MarkEntity(m_target, NameTemp.ToString(), MyHudIndicatorFlagsEnum.SHOW_MISSION_MARKER | MyHudIndicatorFlagsEnum.SHOW_BORDER_INDICATORS | MyHudIndicatorFlagsEnum.SHOW_DISTANCE | MyHudIndicatorFlagsEnum.SHOW_TEXT, MyGuitargetMode.Objective); MyScriptWrapper.AddNotification(m_notification); m_notification.Disappear(); }
public override bool Draw(float backgroundFadeAlpha) { int deltaTime = MyMinerGame.TotalTimeInMilliseconds - m_drawingBlinkingTextLastTime; if (((m_drawingBlinkingTextStatus == true) && (deltaTime > m_blinkingIntervalVisible)) || ((m_drawingBlinkingTextStatus == false) && (deltaTime > m_blinkingIntervalInvisible))) { m_drawingBlinkingTextStatus = !m_drawingBlinkingTextStatus; m_drawingBlinkingTextLastTime = MyMinerGame.TotalTimeInMilliseconds; } if (m_drawingBlinkingTextStatus) { MyRectangle2D rec = MyGuiManager.DrawString(MyGuiManager.GetFontMinerWarsRed(), m_sbInfo, m_normalizedCoord, 1f, Color.White, MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER); MyGuiManager.DrawString(MyGuiManager.GetFontMinerWarsRed(), m_sbPressToHide, new Vector2(m_normalizedCoord.X, m_normalizedCoord.Y + rec.Size.Y), 0.75f, Color.White, MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER); } return(true); }
// Called when we finished harvesting current voxel void StartReleaseVoxel() { if (m_parentMinerShip == null || m_parentMinerShip.IsDead() || m_parentMinerShip.Inventory == null) { return; } StartImplodeCue(); BoundingSphere explosion = new BoundingSphere(m_headPositionTransformed, MyVoxelConstants.VOXEL_SIZE_IN_METRES * 1); //remove decals MyDecals.HideTrianglesAfterExplosion(m_inVoxelMap, ref explosion); //cut off var minedMaterialsWithContents = MyVoxelGenerator.CutOutSphereFastWithMaterials(m_inVoxelMap, explosion); var dustEffect = MyParticlesManager.CreateParticleEffect((int)MyParticleEffectsIDEnum.Harvester_Finished); dustEffect.WorldMatrix = Matrix.CreateTranslation(m_headPositionTransformed); bool hudHarvestingCompletePlayed = false; bool harvestingFinishedAsyncSent = false; var minedOres = new Dictionary <int, float>(); foreach (var minedMaterialWithContent in minedMaterialsWithContents) { MyOreRatioFromVoxelMaterial[] oreFromVoxel = MyVoxelMapOreMaterials.GetOreFromVoxelMaterial(minedMaterialWithContent.Key); if (oreFromVoxel != null && this.Parent == MySession.PlayerShip) { // accumulate amounts of the same type foreach (MyOreRatioFromVoxelMaterial oreRatio in oreFromVoxel) { float amount = minedMaterialWithContent.Value * oreRatio.Ratio * MyHarvestingTubeConstants.MINED_CONTENT_RATIO; float oldAmount = 0; minedOres.TryGetValue((int)oreRatio.OreType, out oldAmount); minedOres[(int)oreRatio.OreType] = amount + oldAmount; } if (!harvestingFinishedAsyncSent) { try { // Disabled, still unused on server //var client = MySectorServiceClient.GetCheckedInstance(); //client.HarvestingFinishedAsync(minedMaterialWithContent.Key, (byte)(minedMaterialWithContent.Value * MyVoxelConstants.VOXEL_CONTENT_FULL_FLOAT)); } catch (Exception) { Debug.Fail("Cannot send harvesting to server"); } harvestingFinishedAsyncSent = true; } if (!hudHarvestingCompletePlayed) { hudHarvestingCompletePlayed = true; MyAudio.AddCue2D(MySoundCuesEnum.HudHarvestingComplete); } } } bool inventoryFullWarningPlayed = false; // add ores to inventory foreach (var ore in minedOres) { float amountLeft = m_parentMinerShip.Inventory.AddInventoryItem(MyMwcObjectBuilderTypeEnum.Ore, ore.Key, ore.Value, false); float amountAdded = ore.Value - amountLeft; if (amountAdded > 0f) { MyHudNotification.AddNotification(new MyHudNotification.MyNotification(MyTextsWrapperEnum.HarvestNotification, 3500, textFormatArguments: new object[] { amountAdded, ((MyGuiOreHelper)MyGuiObjectBuilderHelpers.GetGuiHelper(MyMwcObjectBuilderTypeEnum.Ore, ore.Key)).Name } )); } if (amountLeft > 0f) { MyHudNotification.AddNotification(new MyHudNotification.MyNotification(MyTextsWrapperEnum.HarvestNotificationInventoryFull, MyGuiManager.GetFontMinerWarsRed(), 3500, textFormatArguments: new object[] { amountLeft, ((MyGuiOreHelper)MyGuiObjectBuilderHelpers.GetGuiHelper(MyMwcObjectBuilderTypeEnum.Ore, ore.Key)).Name } )); if (!inventoryFullWarningPlayed) { MyAudio.AddCue2D(MySoundCuesEnum.HudInventoryFullWarning); inventoryFullWarningPlayed = true; } } } StartReturningBack(); }
private void MarcusLocationIntelOnOnMissionSuccess(MyMissionBase sender) { MyScriptWrapper.AddNotification(MyScriptWrapper.CreateNotification(MyTexts.DownloadFailed, MyGuiManager.GetFontMinerWarsRed(), 5000)); }
protected void MyScriptWrapperOnOnHarvesterUse() { bool harvestingIn = false; MyScriptWrapper.GetEntitiesInDummyPoint((uint)EntityID.DontuseHarvestor1, m_entities); if (m_entities.Contains(MySession.PlayerShip)) { harvestingIn = true; } MyScriptWrapper.GetEntitiesInDummyPoint((uint)EntityID.Detector3, m_entities); if (m_entities.Contains(MySession.PlayerShip)) { harvestingIn = true; } if (harvestingIn) { if (m_harvesterWarningSend) { Fail(Localization.MyTextsWrapperEnum.DontHarvest); } MyScriptWrapper.AddNotification(MyScriptWrapper.CreateNotification(Localization.MyTextsWrapperEnum.DontHarvest, MyGuiManager.GetFontMinerWarsRed(), 5000)); m_harvesterWarningSend = true; } }
static MyHackingTool() { m_hackingResultMessages = new MyHackingResultMessage[MyMwcUtils.GetMaxValueFromEnum <MyHackingResultEnum>() + 1]; m_hackingResultMessages[(int)MyHackingResultEnum.Success] = null; m_hackingResultMessages[(int)MyHackingResultEnum.NotEnoughLevel] = new MyHackingResultMessage(MyTextsWrapperEnum.HackingResult_NotEnoughLevel, delegate() { return(MyGuiManager.GetFontMinerWarsRed()); }, MySoundCuesEnum.SfxCancelHack); m_hackingResultMessages[(int)MyHackingResultEnum.CanNotBeHacked] = new MyHackingResultMessage(MyTextsWrapperEnum.HackingResult_CanNotBeHacked, delegate() { return(MyGuiManager.GetFontMinerWarsRed()); }, MySoundCuesEnum.SfxCancelHack); m_hackingResultMessages[(int)MyHackingResultEnum.Canceled] = null; m_hackingResultMessages[(int)MyHackingResultEnum.NoHackingTool] = new MyHackingResultMessage(MyTextsWrapperEnum.HackingResult_NoHackingTool, delegate() { return(MyGuiManager.GetFontMinerWarsRed()); }, MySoundCuesEnum.SfxCancelHack); }
/// <summary> /// Initializes a new instance of the <see cref="MyGuiScreenDebugDeveloper"/> class. /// </summary> public MyGuiScreenCheats() : base(new Vector2(.5f, .5f), new Vector2(0.35f, 0.92f), MyGuiConstants.SCREEN_BACKGROUND_COLOR, true) { AddCaption(MyTextsWrapperEnum.CheatsCaption, new Vector2(0f, 0.04f), captionScale: 1.35f); m_closeOnEsc = true; m_checkBoxOffset = 0.015f; m_currentPosition = -m_size.Value / 2.0f + new Vector2(0.03f, /*0.15f*//*0.05f*/ 0.15f); if (!MyGuiScreenGamePlay.Static.CheatsEnabled()) { m_currentPosition.Y -= 0.025f; AddLabel(MyTextsWrapper.Get(MyTextsWrapperEnum.PurchaseCheats), Vector4.One, 0.725f, font: MyGuiManager.GetFontMinerWarsRed()); m_currentPosition.Y -= 0.005f; } foreach (MyGameplayCheat cheat in MyGameplayCheats.AllCheats) { AddCheat(cheat); } m_currentPosition.Y += 0.01f; m_enableBackgroundFade = true; m_backgroundFadeColor = new Vector4(0.0f, 0.0f, 0.0f, 0.5f); // resize for drawing m_size = new Vector2(0.425f, 0.92f); }
public MyGuiScreenHelp() : base(new Vector2(0.5f, 0.5f), MyGuiConstants.SCREEN_BACKGROUND_COLOR, new Vector2(1f, 0.98f)) { m_enableBackgroundFade = true; AddCaption(MyTextsWrapperEnum.HelpCaption, captionScale: 1.35f); if (MyGuiScreenGamePlay.Static != null) { MyGuiScreenGamePlay.Static.DrawHud = false; } List <ControlWithDescription> left = new List <ControlWithDescription>(); List <ControlWithDescription> right = new List <ControlWithDescription>(); // left.Add(new ControlWithDescription(MyGameControlEnums.FORWARD, MyGameControlEnums.REVERSE)); // left.Add(new ControlWithDescription(MyGameControlEnums.STRAFE_LEFT, MyGameControlEnums.STRAFE_RIGHT)); // left.Add(new ControlWithDescription(MyGameControlEnums.UP_THRUST, MyGameControlEnums.DOWN_THRUST)); // left.Add(new ControlWithDescription(MyGameControlEnums.ROLL_LEFT, MyGameControlEnums.ROLL_RIGHT)); left.Add(new ControlWithDescription(MyGameControlEnums.FORWARD)); left.Add(new ControlWithDescription(MyGameControlEnums.REVERSE)); left.Add(new ControlWithDescription(MyGameControlEnums.STRAFE_LEFT)); left.Add(new ControlWithDescription(MyGameControlEnums.STRAFE_RIGHT)); left.Add(new ControlWithDescription(MyGameControlEnums.UP_THRUST)); left.Add(new ControlWithDescription(MyGameControlEnums.DOWN_THRUST)); left.Add(new ControlWithDescription(MyGameControlEnums.ROLL_LEFT)); left.Add(new ControlWithDescription(MyGameControlEnums.ROLL_RIGHT)); left.Add(new ControlWithDescription(MyGameControlEnums.AFTERBURNER)); left.Add(new ControlWithDescription(MyGameControlEnums.MOVEMENT_SLOWDOWN)); left.Add(new ControlWithDescription(MyGameControlEnums.AUTO_LEVEL)); left.Add(new ControlWithDescription("", "")); left.Add(new ControlWithDescription( new StringBuilder(). Append(MyGuiManager.GetInput().GetGameControlTextEnum(MyGameControlEnums.FIRE_PRIMARY)). Append(", "). Append(MyGuiManager.GetInput().GetGameControl(MyGameControlEnums.FIRE_PRIMARY).GetControlButtonName(MyGuiInputDeviceEnum.Mouse)), MyGameControlEnums.FIRE_PRIMARY )); left.Add(new ControlWithDescription( new StringBuilder(). Append(MyGuiManager.GetInput().GetGameControlTextEnum(MyGameControlEnums.FIRE_SECONDARY)). Append(", "). Append(MyGuiManager.GetInput().GetGameControl(MyGameControlEnums.FIRE_SECONDARY).GetControlButtonName(MyGuiInputDeviceEnum.Mouse)), MyGameControlEnums.FIRE_SECONDARY )); left.Add(new ControlWithDescription( new StringBuilder(). Append(MyGuiManager.GetInput().GetGameControlTextEnum(MyGameControlEnums.SELECT_AMMO_BULLET)). Append(","). Append(MyGuiManager.GetInput().GetGameControlTextEnum(MyGameControlEnums.SELECT_AMMO_MISSILE)). Append(","). Append(MyGuiManager.GetInput().GetGameControlTextEnum(MyGameControlEnums.SELECT_AMMO_CANNON)). Append(","). Append(MyGuiManager.GetInput().GetGameControlTextEnum(MyGameControlEnums.SELECT_AMMO_UNIVERSAL_LAUNCHER_FRONT)). Append(","). Append(MyGuiManager.GetInput().GetGameControlTextEnum(MyGameControlEnums.SELECT_AMMO_UNIVERSAL_LAUNCHER_BACK)), MyTextsWrapper.Get(MyTextsWrapperEnum.SelectAmmo) )); left.Add(new ControlWithDescription(MyGameControlEnums.WEAPON_SPECIAL)); left.Add(new ControlWithDescription(MyGameControlEnums.PREV_TARGET)); left.Add(new ControlWithDescription(MyGameControlEnums.NEXT_TARGET)); for (int i = 0; i < specTexts.Length; i++) { StringBuilder specControl = new StringBuilder(); if (MyGuiManager.GetInput().GetGameControl(specFront[i]).IsControlAssigned(MyGuiInputDeviceEnum.Keyboard)) { specControl.Append(MyGuiManager.GetInput().GetGameControlTextEnum(specFront[i])); } if (MyGuiManager.GetInput().GetGameControl(specBack[i]).IsControlAssigned(MyGuiInputDeviceEnum.Keyboard)) { if (specControl.Length != 0) { specControl.Append(", "); } specControl.Append(MyGuiManager.GetInput().GetGameControlTextEnum(specBack[i])); } left.Add(new ControlWithDescription(specControl, MyTextsWrapper.Get(specTexts[i]))); } left.Add(new ControlWithDescription("", "")); left.Add(new ControlWithDescription(MyGameControlEnums.USE)); left.Add(new ControlWithDescription(MyGameControlEnums.GPS)); //Journal removed //left.Add(new ControlWithDescription(MyGameControlEnums.MISSION_DIALOG)); left.Add(new ControlWithDescription(MyGameControlEnums.INVENTORY)); left.Add(new ControlWithDescription(MyGameControlEnums.TRAVEL)); right.Add(new ControlWithDescription(MyGameControlEnums.DRILL)); right.Add(new ControlWithDescription(MyGameControlEnums.HARVEST)); right.Add(new ControlWithDescription(MyGameControlEnums.DRONE_DEPLOY)); right.Add(new ControlWithDescription(MyGameControlEnums.DRONE_CONTROL)); right.Add(new ControlWithDescription(MyGameControlEnums.CHANGE_DRONE_MODE)); right.Add(new ControlWithDescription(MyTextsWrapper.Get(MyTextsWrapperEnum.LeftMouseButton), MyTextsWrapper.Get(MyTextsWrapperEnum.DetonateDrone))); right.Add(new ControlWithDescription( new StringBuilder(). Append(MyGuiManager.GetInput().GetGameControlTextEnum(MyGameControlEnums.PREVIOUS_CAMERA)). Append(", "). Append(MyGuiManager.GetInput().GetGameControlTextEnum(MyGameControlEnums.NEXT_CAMERA)), MyTextsWrapper.Get(MyTextsWrapperEnum.CycleSecondaryCamera) )); right.Add(new ControlWithDescription(MyGameControlEnums.CONTROL_SECONDARY_CAMERA)); right.Add(new ControlWithDescription("", "")); right.Add(new ControlWithDescription(MyGameControlEnums.QUICK_ZOOM)); right.Add(new ControlWithDescription(MyGameControlEnums.ZOOM_IN, MyGameControlEnums.ZOOM_OUT)); right.Add(new ControlWithDescription(MyGameControlEnums.REAR_CAM)); right.Add(new ControlWithDescription(MyGameControlEnums.HEADLIGHTS)); right.Add(new ControlWithDescription(MyGameControlEnums.HEADLIGTHS_DISTANCE)); right.Add(new ControlWithDescription(MyGameControlEnums.VIEW_MODE)); right.Add(new ControlWithDescription(MyGameControlEnums.WHEEL_CONTROL)); right.Add(new ControlWithDescription(MyGameControlEnums.CHAT)); right.Add(new ControlWithDescription(MyGameControlEnums.SCORE)); right.Add(new ControlWithDescription("", "")); right.Add(new ControlWithDescription(new StringBuilder("F1"), MyTextsWrapper.Get(MyTextsWrapperEnum.OpenHelpScreen))); right.Add(new ControlWithDescription( new StringBuilder(). Append(MyTextsWrapper.Get(MyTextsWrapperEnum.Ctrl)). Append("+F1"), MyTextsWrapper.Get(MyTextsWrapperEnum.OpenCheats) )); right.Add(new ControlWithDescription(new StringBuilder("F4"), MyTextsWrapper.Get(MyTextsWrapperEnum.SaveScreenshotToUserFolder))); //These keys are to be used just for developers or testing if (!SysUtils.MyMwcFinalBuildConstants.IS_PUBLIC) { right.Add(new ControlWithDescription("", "")); //Programmers right.Add(new ControlWithDescription("F6", "Switch to player")); right.Add(new ControlWithDescription("F7", "Switch to following 3rd person")); right.Add(new ControlWithDescription("F9", "Switch to static 3rd person")); right.Add(new ControlWithDescription("F8, Ctrl+F8", "Switch to / reset spectator")); right.Add(new ControlWithDescription("Ctrl+Space", "Move ship to spectator")); right.Add(new ControlWithDescription("F11, Shift+F11", "Game statistics / FPS")); right.Add(new ControlWithDescription("F12", "Debug screen (jump to mission)")); right.Add(new ControlWithDescription("Ctrl+Del", "Skip current objective")); right.Add(new ControlWithDescription("Shift+\\", "Teleport to next obstacle")); } /* * right.Add(new ControlWithDescription("F5","Ship customization screen")); * right.Add(new ControlWithDescription("F9","restart current game and reload sounds")); * right.Add(new ControlWithDescription("F3","start sun wind")); * right.Add(new ControlWithDescription("F8","save all voxel maps into USER FOLDER - only for programmers")); * right.Add(new ControlWithDescription("F10","switch camera - only for programmers")); * right.Add(new ControlWithDescription("F11","save screenshot(s) into USER FOLDER")); * right.Add(new ControlWithDescription("F12","cycle through debug screens - only for programmers")); */ #if RENDER_PROFILING right.Add(new ControlWithDescription("Alt + Num0", "Enable/Disable render profiler or leave current child node.")); right.Add(new ControlWithDescription("Alt + Num1-Num9", "Enter child node in render profiler")); right.Add(new ControlWithDescription("Alt + Enter", "Pause/Unpause profiler")); #endif //RENDER_PROFILER Vector2 controlPosition = -m_size.Value / 2.0f + new Vector2(0.06f, 0.125f); Vector2 descriptionPosition = -m_size.Value / 2.0f + new Vector2(0.18f, 0.125f); foreach (var line in left) { Controls.Add(new MyGuiControlLabel(this, controlPosition, null, line.Control, MyGuiConstants.LABEL_TEXT_COLOR, MyGuiConstants.LABEL_TEXT_SCALE, MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER, MyGuiManager.GetFontMinerWarsRed())); Controls.Add(new MyGuiControlLabel(this, descriptionPosition, null, line.Description, MyGuiConstants.LABEL_TEXT_COLOR, MyGuiConstants.LABEL_TEXT_SCALE, MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER)); controlPosition.Y += 0.023f; descriptionPosition.Y += 0.023f; } controlPosition = new Vector2(0.03f, 0.125f - m_size.Value.Y / 2.0f); descriptionPosition = new Vector2(0.15f, 0.125f - m_size.Value.Y / 2.0f); foreach (var line in right) { Controls.Add(new MyGuiControlLabel(this, controlPosition, null, line.Control, MyGuiConstants.LABEL_TEXT_COLOR, MyGuiConstants.LABEL_TEXT_SCALE, MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER, MyGuiManager.GetFontMinerWarsRed())); Controls.Add(new MyGuiControlLabel(this, descriptionPosition, null, line.Description, MyGuiConstants.LABEL_TEXT_COLOR, MyGuiConstants.LABEL_TEXT_SCALE, MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER)); controlPosition.Y += 0.023f; descriptionPosition.Y += 0.023f; } Controls.Add(new MyGuiControlLabel(this, new Vector2(0.06f - m_size.Value.X / 2.0f, -0.085f + m_size.Value.Y / 2.0f), null, new StringBuilder().Append(MyTextsWrapper.Get(MyTextsWrapperEnum.UserFolder)).Append(": ").Append(MyFileSystemUtils.GetApplicationUserDataFolder()), MyGuiConstants.LABEL_TEXT_COLOR, MyGuiConstants.LABEL_TEXT_SCALE, MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER)); Controls.Add(new MyGuiControlButton(this, 0.5f * m_size.Value + new Vector2(-0.14f, -0.085f), MyGuiConstants.BACK_BUTTON_SIZE, MyGuiConstants.BACK_BUTTON_BACKGROUND_COLOR, MyTextsWrapperEnum.Back, MyGuiConstants.BACK_BUTTON_TEXT_COLOR, MyGuiConstants.BACK_BUTTON_TEXT_SCALE, OnBackClick, MyGuiControlButtonTextAlignment.CENTERED, true, MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER, true)); if (MyMultiplayerPeers.Static.Players.Count == 0) { m_wasPause = MyMinerGame.IsPaused(); MyMinerGame.SetPause(true); } }