public MyGuiScreenText( string missionTitle = null, string currentObjectivePrefix = null, string currentObjective = null, string description = null, Action <ResultEnum> resultCallback = null, string okButtonCaption = null, Vector2?windowSize = null, Vector2?descSize = null, bool editEnabled = false, bool canHideOthers = true, bool enableBackgroundFade = false, MyMissionScreenStyleEnum style = MyMissionScreenStyleEnum.BLUE) : base(new Vector2(0.5f, 0.5f), MyGuiConstants.SCREEN_BACKGROUND_COLOR, windowSize.HasValue ? windowSize.Value : m_defaultWindowSize, false, null) { m_style = m_styles[(int)style]; m_enableEdit = editEnabled; m_descSize = descSize.HasValue ? descSize.Value : m_defaultDescSize; m_windowSize = windowSize.HasValue ? windowSize.Value : m_defaultWindowSize; m_missionTitle = missionTitle ?? m_missionTitle; m_currentObjectivePrefix = currentObjectivePrefix ?? m_currentObjectivePrefix; m_currentObjective = currentObjective ?? m_currentObjective; m_description = description ?? m_description; //m_description = "supr <b>rich</b> <i>text</i>\nwritten in 2 lines."; //offset: descPosition + padding, size: descSize m_resultCallback = resultCallback; m_okButtonCaption = okButtonCaption != null ? new StringBuilder(okButtonCaption) : MyTexts.Get(MyCommonTexts.Ok); m_closeOnEsc = true; RecreateControls(true); m_titleLabel.Font = m_style.CaptionFont; m_currentObjectiveLabel.Font = m_style.CaptionFont; m_descriptionBox.Font = m_style.TextFont; m_backgroundTexture = m_style.BackgroundTextureName; m_okButton.VisualStyle = m_style.ButtonStyle; m_descriptionBackgroundPanel.Visible = m_style.ShowBackgroundPanel; m_isTopScreen = false; m_isTopMostScreen = false; CanHideOthers = canHideOthers; EnabledBackgroundFade = enableBackgroundFade; }
//public MyGuiControlMultilineText m_description_RTF; public MyGuiScreenMission( string missionTitle = null, string currentObjectivePrefix = null, string currentObjective = null, string description = null, Action <ResultEnum> resultCallback = null, string okButtonCaption = null, Vector2?windowSize = null, Vector2?descSize = null, bool editEnabled = false, bool canHideOthers = true, bool enableBackgroundFade = false, MyMissionScreenStyleEnum style = MyMissionScreenStyleEnum.BLUE) : base(missionTitle, currentObjectivePrefix, currentObjective, description, resultCallback, okButtonCaption, windowSize, descSize, editEnabled, canHideOthers, enableBackgroundFade, style) { }
//public MyGuiControlMultilineText m_description_RTF; public MyGuiScreenMission( string missionTitle = null, string currentObjectivePrefix =null, string currentObjective = null, string description = null, Action<ResultEnum> resultCallback = null, string okButtonCaption = null, Vector2? windowSize = null, Vector2? descSize = null, bool editEnabled = false, bool canHideOthers = true, bool enableBackgroundFade = false, MyMissionScreenStyleEnum style = MyMissionScreenStyleEnum.BLUE) : base(missionTitle, currentObjectivePrefix, currentObjective, description, resultCallback, okButtonCaption, windowSize, descSize, editEnabled, canHideOthers, enableBackgroundFade, style) { }
public MyGuiScreenText( string missionTitle = null, string currentObjectivePrefix =null, string currentObjective = null, string description = null, Action<ResultEnum> resultCallback = null, string okButtonCaption = null, Vector2? windowSize = null, Vector2? descSize = null, bool editEnabled = false, bool canHideOthers = true, bool enableBackgroundFade = false, MyMissionScreenStyleEnum style = MyMissionScreenStyleEnum.BLUE) : base(new Vector2(0.5f, 0.5f), MyGuiConstants.SCREEN_BACKGROUND_COLOR, windowSize.HasValue ? windowSize.Value : m_defaultWindowSize, false, null) { m_style = m_styles[(int)style]; m_enableEdit = editEnabled; m_descSize = descSize.HasValue ? descSize.Value : m_defaultDescSize; m_windowSize = windowSize.HasValue ? windowSize.Value : m_defaultWindowSize; m_missionTitle = missionTitle ?? m_missionTitle; m_currentObjectivePrefix = currentObjectivePrefix ??m_currentObjectivePrefix; m_currentObjective = currentObjective ?? m_currentObjective; m_description = description ?? m_description; //m_description = "supr <b>rich</b> <i>text</i>\nwritten in 2 lines."; //offset: descPosition + padding, size: descSize m_resultCallback = resultCallback; m_okButtonCaption = okButtonCaption != null ? new StringBuilder(okButtonCaption) : MyTexts.Get(MyCommonTexts.Ok); m_closeOnEsc = true; RecreateControls(true); m_titleLabel.Font = m_style.CaptionFont; m_currentObjectiveLabel.Font = m_style.CaptionFont; m_descriptionBox.Font = m_style.TextFont; m_backgroundTexture = m_style.BackgroundTextureName; m_okButton.VisualStyle = m_style.ButtonStyle; m_descriptionBackgroundPanel.Visible = m_style.ShowBackgroundPanel; m_isTopScreen = false; m_isTopMostScreen = false; CanHideOthers = canHideOthers; EnabledBackgroundFade = enableBackgroundFade; }