public MyHarvestOreSubmission(MyTextsWrapperEnum name, MyMissionID id, MyTextsWrapperEnum description, MyTexture2D icon, MyMission parentMission, MyMissionID[] requiredMissions, MyMissionLocation location, MyMwcObjectBuilder_Ore_TypesEnum ore, float amount, MyDialogueEnum successDialogId)
     : base(name, id, description, icon, parentMission, requiredMissions, null, successDialogId: successDialogId)
 {
     Location = location;
     m_amount = amount;
     m_ore = ore;
 }
        public MyGuiScreenGameChat(bool sendToTeam)
            : base(Vector2.Zero, null, null)
        {
            m_closeOnEsc = true;
            m_enableBackgroundFade = true;
            m_teamOnly = sendToTeam;

            m_positionOffset = new Vector2(MyGuiManager.GetNormalizedCoordinateFromScreenCoordinate_FULLSCREEN(new Vector2(0, 0)).X - 920/1920f/2 - 0.04f, -0.2f);

            m_panelTexture = MyTextureManager.GetTexture<MyTexture2D>("Textures\\GUI\\BackgroundScreen\\ChatBackground", flags: TextureFlags.IgnoreQuality);

            MyGuiControlPanel panel = new MyGuiControlPanel(this, new Vector2(0.5f, 0.85f) + m_positionOffset, new Vector2(920 / 1920f, 388 / 1200f), MyGuiConstants.SCREEN_BACKGROUND_COLOR, m_panelTexture, null, null, null, MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_TOP);
            Controls.Add(panel);

            Vector2 menuPositionOrigin = new Vector2(0.423f, 0.939f) + m_positionOffset;
            Vector2 delta = new Vector2(0.17f, 0f);
            const MyGuiControlButtonTextAlignment menuButtonTextAlignement = MyGuiControlButtonTextAlignment.CENTERED;

            m_textbox = new MyGuiControlTextbox(this, menuPositionOrigin, MyGuiControlPreDefinedSize.MEDIUM, "", MyGuiConstants.CHAT_WINDOW_MAX_MESSAGE_LENGTH, MyGuiConstants.BUTTON_TEXT_COLOR, MyGuiConstants.BUTTON_TEXT_SCALE * 0.75f, MyGuiControlTextboxType.NORMAL, true, false);
            Controls.Add(m_textbox);

            Controls.Add(new MyGuiControlButton(this, menuPositionOrigin + delta,
                MyGuiConstants.MAIN_MENU_BUTTON_SIZE * new Vector2(0.41f, 0.78f), MyGuiConstants.BUTTON_BACKGROUND_COLOR, MyTextureManager.GetTexture<MyTexture2D>("Textures\\GUI\\ButtonChatEnter", flags: TextureFlags.IgnoreQuality), null, null,
                sendToTeam ? MyTextsWrapperEnum.SendToTeam : MyTextsWrapperEnum.SendToAll, MyGuiConstants.BUTTON_TEXT_COLOR, MyGuiConstants.BUTTON_TEXT_SCALE * 0.65f,
                menuButtonTextAlignement, OnSendClick, true, MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER,
                true, true, MyGuiControlHighlightType.WHEN_ACTIVE));
        }
 public MyGuiControlCheckbox(IMyGuiControlsParent parent, Vector2 position, Vector2 size, MyTexture2D texture, MyTexture2D checkedTexture,
     StringBuilder toolTip, bool checkedVal, Vector4 color, bool highlightWhenChecked, MyGuiControlLabel label, Vector2? innerSize = null)
     : base(parent, position, size, color, toolTip, texture, null, null, true)
 {
     m_canHandleKeyboardActiveControl = true;
     m_checked = checkedVal;
     m_highlightWhenChecked = false; // highlightWhenChecked; this feature is depracted
     m_checkedTexture = checkedTexture;
     m_label = label;
     if (m_label != null) {
         m_label.MouseEnter += delegate
         {
             m_highlight = true;
         };
         m_label.MouseLeave += delegate
         {
             m_highlight = false;
         };
         m_label.Click += delegate
         {
             UserCheck();
         };
     }
     if (innerSize == null) m_innerSize = size;
     else m_innerSize = innerSize;
 }
        void LoadControls()
        {
            // Background texture unloaded in base
            m_backgroundTexture = MyTextureManager.GetTexture<MyTexture2D>("Textures\\GUI\\BackgroundScreen\\ProgressBackground", flags: TextureFlags.IgnoreQuality);
            m_wheelTexture = MyTextureManager.GetTexture<MyTexture2D>("Textures\\GUI\\Loading", flags: TextureFlags.IgnoreQuality);

            m_size = new Vector2(598 / 1600f, 368 / 1200f);
            Controls.Add(new MyGuiControlLabel(this, new Vector2(0.0f, -0.05f), null, m_progressText, MyGuiConstants.LABEL_TEXT_COLOR,
                MyGuiConstants.LABEL_TEXT_SCALE * 0.86f, MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER));

            float deltaX = (m_enableCancel) ? 0.08f : 0.0f;
            float deltaY = 0.035f;

            Controls.Add(new MyGuiControlRotatingWheel(this, new Vector2(-deltaX, deltaY), MyGuiConstants.ROTATING_WHEEL_COLOR, MyGuiConstants.ROTATING_WHEEL_DEFAULT_SCALE,
                MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER, m_wheelTexture));

            //  Sometimes we don't want to allow user to cancel pending progress screen
            if (m_enableCancel)
            {
                var cancelButton = new MyGuiControlButton(this, new Vector2(deltaX, deltaY), MyGuiConstants.MESSAGE_BOX_BUTTON_SIZE_SMALL,
                        Vector4.One,
                        MyGuiManager.GetConfirmButton(), null, null, MyTextsWrapperEnum.Cancel,
                        MyGuiConstants.BUTTON_TEXT_COLOR, MyGuiConstants.BUTTON_TEXT_SCALE, MyGuiControlButtonTextAlignment.CENTERED, OnCancelClick,
                        true, MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER, true, true);
                Controls.Add(cancelButton);
            }
            m_controlsCreated = true;
        }
Esempio n. 5
0
        public MyUseObjective(
            MyTextsWrapperEnum name,
            MyMissionID id,
            MyTextsWrapperEnum description,
            MyTexture2D icon,
            MyMission parentMission,
            MyMissionID[] requiredMissions,
            MyMissionLocation location,
            MyTextsWrapperEnum notificationText,
            MyTextsWrapperEnum useCaption,
            MyTextsWrapperEnum useText,
            int requiredTime,
            MyUseObjectiveType objectiveType = MyUseObjectiveType.Hacking,
            MyDialogueEnum? successDialogId = null,
            MyDialogueEnum? startDialogId = null,
            float? radiusOverride = null,
            List<uint> fakeMissionIds = null,
            uint? realMissionId = null)
            : base(name, id, description, icon, parentMission, requiredMissions, location, fakeMissionIds, successDialogId, startDialogId, radiusOverride: radiusOverride)
        {
            m_notificationText = notificationText;
            m_useText = useText;
            m_useCaption = useCaption;
            m_requiredTime = requiredTime;
            m_realMissionEntityId = realMissionId;
            InitSounds(objectiveType);

            if (location != null)
            {
                if (location.LocationEntityIdentifier.LocationEntityId != null)
                {
                    RequiredEntityIDs.Add(location.LocationEntityIdentifier.LocationEntityId.Value);
                }
            }
        }
        public MyGuiScreenLoading(MyGuiScreenGamePlay screenToLoad, MyGuiScreenGamePlay screenToUnload, MyTexture2D textureFromConstructor)
            : base(Vector2.Zero, null, null)
        {
            MyLoadingPerformance.Instance.StartTiming();

            System.Diagnostics.Debug.Assert(Static == null);
            Static = this;

            m_screenToLoad = screenToLoad;
            m_screenToUnload = screenToUnload;
            m_closeOnEsc = false;
            DrawMouseCursor = false;
            m_loadInDrawFinished = false;
            m_drawEvenWithoutFocus = true;
            m_currentQuoteOfTheDay = MyQuoteOfTheDay.GetRandomQuote();
            
            Vector2 loadingTextSize = MyGuiManager.GetNormalizedSize(MyGuiManager.GetFontMinerWarsBlue(),
                MyTextsWrapper.Get(MyTextsWrapperEnum.LoadingPleaseWait), MyGuiConstants.LOADING_PLEASE_WAIT_SCALE);
            m_rotatingWheelTexture = MyGuiManager.GetLoadingTexture();
            Controls.Add(new MyGuiControlRotatingWheel(this, MyGuiConstants.LOADING_PLEASE_WAIT_POSITION - new Vector2(0, 0.075f + loadingTextSize.Y),
                MyGuiConstants.ROTATING_WHEEL_COLOR, MyGuiConstants.ROTATING_WHEEL_DEFAULT_SCALE, MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER, m_rotatingWheelTexture));
            m_backgroundTextureFromConstructor = textureFromConstructor;

            m_loadFinished = false;
            
            if (m_screenToLoad != null)
            {
                MyMinerGame.IsGameReady = false;
            }
        }
        public MyMultipleUseObjective(
            MyTextsWrapperEnum name,
            MyMissionID id,
            MyTextsWrapperEnum description,
            MyTexture2D icon,
            MyMission parentMission,
            MyMissionID[] requiredMissions,
            MyTextsWrapperEnum notificationText,
            MyTextsWrapperEnum useCaption,
            MyTextsWrapperEnum useText,
            int requiredTime,
            List<uint> MissionEntityIDs,
            MyUseObjectiveType objectiveType = MyUseObjectiveType.Hacking,


            MyDialogueEnum? startDialogId = null)
            : base(name, id, description, icon, parentMission, requiredMissions, null, MissionEntityIDs, startDialogId: startDialogId)
        {
            m_notificationText = notificationText;
            m_useText = useText;
            m_useCaption = useCaption;
            m_requiredTime = requiredTime;

            m_objectiveType = objectiveType;
        }
Esempio n. 8
0
 public MyTimedObjective(StringBuilder name, MyMissionID id, StringBuilder description, MyTexture2D icon, MyMission parentMission, MyMissionID[] requiredMissions, TimeSpan submissionDuration, bool isOn)
     : this(name, id, description, icon, parentMission, requiredMissions, submissionDuration)
 {
     m_isOn = isOn;
     m_defaultState = m_isOn;
     DisplayCounter = true;
 }
Esempio n. 9
0
 public MyGuiControlPanel(IMyGuiControlsParent parent, Vector2 position, Vector2? size, Vector4 backgroundColor, MyTexture2D texture, 
                          MyTexture2D hoverTexture, MyTexture2D pressedTexture, int borderSize, Vector4 borderColor, StringBuilder toolTip)
     : base(parent, position, size, backgroundColor, toolTip, texture, hoverTexture, pressedTexture, false)
 {
     Visible = true;            
     m_borderSize = borderSize;
     m_borderColor = borderColor;
 }
Esempio n. 10
0
 public MyGuiControlPanel(IMyGuiControlsParent parent, Vector2 position, Vector2? size, Vector4 backgroundColor, 
     MyTexture2D texture, MyTexture2D hoverTexture, MyTexture2D pressedTexture, MyTexture2D shadowTexture, 
     MyGuiDrawAlignEnum align)
     : base(parent, position, size, backgroundColor, new StringBuilder(), 
             texture, hoverTexture, pressedTexture, false)
 {
     Visible = true;            
 }
 public MyObjectiveGetToLocations(StringBuilder Name, MyMissionID ID, StringBuilder Description, MyTexture2D Icon, MyMission ParentMission, MyMissionID[] RequiredMissions, List<MyMissionLocation> DummiesToVisit, Audio.Dialogues.MyDialogueEnum? successDialogId = null, Audio.Dialogues.MyDialogueEnum? startDialogId = null, bool displayObjectivesCount = true) :
     base(Name, ID, Description, Icon, ParentMission, RequiredMissions, null, null, successDialogId, startDialogId, displayObjectivesCount)
 {
     Debug.Assert(DummiesToVisit != null);
     Debug.Assert(DummiesToVisit.Count > 0);
     m_dummiesToVisit = DummiesToVisit;
     m_dummiesVisited = new List<MyMissionLocation>();
 }
Esempio n. 12
0
        /// <summary>
        /// Loads the texture.
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="path">The path.</param>
        /// <param name="loadedCallback">The loaded callback.</param>
        /// <param name="loadingMode">The loading mode.</param>
        /// <param name="flags">The flags.</param>
        /// <returns></returns>
        private static T LoadTexture <T>(string path, TextureLoadedHandler loadedCallback, LoadingMode loadingMode, TextureFlags flags) where T : MyTexture
        {
            using (TexturesLock.AcquireExclusiveUsing())
            {
                MyTexture texture;
                if (typeof(T) == typeof(MyTexture2D))
                {
                    texture = new MyTexture2D(path, GetLoadMethod(loadingMode), flags);
                }
                else if (typeof(T) == typeof(MyTextureCube))
                {
                    texture = new MyTextureCube(path, GetLoadMethod(loadingMode), flags);
                }
                else
                {
                    throw new ArgumentException("Unsupported texture type", "T");
                }

                if (loadedCallback != null)
                {
                    texture.TextureLoaded += loadedCallback;
                }

                switch (loadingMode)
                {
                case LoadingMode.Immediate:
                {
                    if (!texture.Load(Quality))
                    {
                        return(null);
                    }

                    break;
                }

                case LoadingMode.Background:
                {
                    LoadTextureInBackground(texture);
                }
                break;
                }



                if (m_textures.ContainsKey(path))
                {
                    m_textures[path] = texture;
                }
                else
                {
                    m_textures.Add(path, texture);
                }

                DbgWatchLoadedTextures();

                return((T)texture);
            }
        }
 public MyGuiControlListboxItem(int key, MyColoredText coloredText, MyTexture2D icon, MyToolTips toolTip)
 {
     Key = key;
     Icon = icon;
     ColoredText = coloredText;
     ToolTip = toolTip;
     BackgroundColor = Vector4.One;
     Enabled = true;
 }
 protected MyGuiControlEntityUse(IMyGuiControlsParent parent, Vector2 size, MyEntity entity, MyTexture2D texture)
     : base(parent, Vector2.Zero, size, Vector4.One, new StringBuilder(entity.DisplayName), MyGuiManager.GetHubItemBackground())            
 {
     m_entity = entity;
     m_topLeftPosition = -m_size.Value / 2f + new Vector2(0.025f, 0.025f);
     Controls.Add(new MyGuiControlLabel(this, m_topLeftPosition + new Vector2(0.063f, 0.0f), null, GetEntityName(entity), MyGuiConstants.LABEL_TEXT_COLOR, MyGuiConstants.LABEL_TEXT_SCALE, MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER, MyGuiManager.GetFontMinerWarsBlue()));
     LoadControls();
     m_texture = texture;
 }
 public MyObjectiveDisablePrefabs(MyTextsWrapperEnum name, MyMissionID id, MyTextsWrapperEnum description, MyTexture2D icon, MyMission parentMission, 
         MyMissionID[] requiredMissions, List<uint> toDisable, List<uint> disableBy, bool displayObjectivesCount = true, 
         bool markObjectsToDisable = true, MyDialogueEnum? successDialogId = null, MyDialogueEnum? startDialogId = null)
     : base(name, id, description, icon, parentMission, requiredMissions, null, disableBy, successDialogId, startDialogId,  displayObjectivesCount: displayObjectivesCount)
 {
     m_toDisable = toDisable;
     m_markObjectsToDisable = markObjectsToDisable;
     RequiredEntityIDs.AddRange(toDisable);
 }
Esempio n. 16
0
 public MyObjectiveDestroy(MyTextsWrapperEnum name, MyMissionID id, MyTextsWrapperEnum description, MyTexture2D icon, MyMission parentMission, MyMissionID[] requiredMissions, List<uint> toKill, List<uint> toKillSpawnpoints, bool showMarks = true, bool displayObjectivesCount = true, MyDialogueEnum? successDialogID = null, MyDialogueEnum? startDialogID = null)
     : base(name, id, description, icon, parentMission, requiredMissions, null, displayObjectivesCount: displayObjectivesCount, successDialogId: successDialogID, startDialogId: startDialogID)
 {
     m_toKill = toKill;
     m_toKillSpawnpoints = toKillSpawnpoints;
     m_showMarks = showMarks;
     FailIfEntityDestroyed = false;
     MakeEntityIndestructible = false;
 }
 public MyGuiControlRotatingWheel(IMyGuiControlsParent parent, Vector2 position, Vector4 color, float scale, MyGuiDrawAlignEnum align, MyTexture2D texture)
     : base(parent, position, null, null, null, false)
 {
     m_rotatingAngle = MyMwcUtils.GetRandomRadian();
     m_color = color;
     m_wheelScale = scale;
     //m_scale = 4;
     m_align = align;
     m_texture = texture;
 }
Esempio n. 18
0
 public MyTreeViewItem(StringBuilder text, MyTexture2D icon, Vector2 iconSize, MyTexture2D expandIcon, MyTexture2D collapseIcon, Vector2 expandIconSize)
 {
     Visible = true;
     Enabled = true;
     Text = text;
     m_icon = icon;
     m_expandIcon = expandIcon;
     m_collapseIcon = collapseIcon;
     m_iconSize = iconSize;
     m_expandIconSize = expandIconSize;
 }
 public MyGuiControlListboxScrollBar(IMyGuiControlsParent parent, Vector2 position, Vector2 size, Vector4? backgroundColor, Color sliderColor, MyScrollDirection scrollDirection, MyTexture2D texture)
 {
     m_parent = parent;
     m_position = position;
     m_size = size;
     m_scrollDirection = scrollDirection;
     m_texture = texture;
     m_isScrollSliderDragging = false;
     InitializeScrollBar(1.0f);
     SetScrollValue(1.0f);
 }
 public MyMessageBoxConfiguration(MyTexture2D texture, Vector4 textColor, Vector4 backgroundColor, Vector4 buttonColor, Vector4 rotatingWheelColor, Vector4 interferenceVideoColor, MyGuiFont font, MyTexture2D buttonTexture ) 
 {
     Texture = texture;
     TextColor = textColor;
     BackgroundColor = backgroundColor;
     ButtonColor = buttonColor;
     RotatingWheelColor = rotatingWheelColor;
     InterferenceVideoColor = interferenceVideoColor;
     Font = font;
     ButtonTexture = buttonTexture;
 }
 public MyGuiControlComboboxItem(int key, MyTexture2D icon, StringBuilder value, int sortOrder)
 {
     Key = key;
     Icon = icon;
     Value = value;
     SortOrder = sortOrder;
     if (value != null)
     {
         ToolTip = new MyToolTips(value);
     }                
 }
 public MySabotageSubmission(
     StringBuilder name,
     MyMissionID id,
     StringBuilder description,
     MyTexture2D icon,
     MyMission parentMission,
     MyMissionID[] requiredMissions,
     MyMissionLocation location)
     : this(name, id, description, icon, parentMission, requiredMissions, location, MyTextsWrapperEnum.NotificationSabotageSubmission)
 {
 
 }
 public MySabotageSubmission(
     StringBuilder name, 
     MyMissionID id, 
     StringBuilder description, 
     MyTexture2D icon, 
     MyMission parentMission, 
     MyMissionID[] requiredMissions, 
     MyMissionLocation location, 
     MyTextsWrapperEnum notificationText)
     : base(name, id, description, icon, parentMission, requiredMissions, location, null)
 {
     m_notificationText = notificationText;
 }
Esempio n. 24
0
        public static void LoadContent()
        {
            MyMwcLog.WriteLine("MyHudSectorBorder.LoadContent() - START");
            MyMwcLog.IncreaseIndent();
            MinerWars.AppCode.Game.Render.MyRender.GetRenderProfiler().StartProfilingBlock("MyHudSectorBorder.LoadContent()");

            m_loaded = false;

            m_texture = MyTextureManager.GetTexture<MyTexture2D>("Textures\\HUD\\SectorBorder", flags: TextureFlags.IgnoreQuality);

            MinerWars.AppCode.Game.Render.MyRender.GetRenderProfiler().EndProfilingBlock();
            MyMwcLog.DecreaseIndent();
            MyMwcLog.WriteLine("MyHudSectorBorder.LoadContent() - END");
        }
Esempio n. 25
0
        public MyGlobalEvent(MyGlobalEventEnum Type, MyTextsWrapperEnum Name, MyTextsWrapperEnum Description, float RatePerHour, MyTexture2D Icon, EventHandler Action, bool WriteToEventLog, bool Enabled)
        {
            this.Type = Type;

            this.Name = Name;
            this.Description = Description;

            this.RatePerHour = RatePerHour; //occurences per hour
            this.ActivationDateTime = null;
            this.Icon = Icon;
            this.Action = Action;
            this.WriteToEventLog = WriteToEventLog;
            this.Enabled = Enabled;
        }
Esempio n. 26
0
        public MyGuiControlList(IMyGuiControlsParent parent, Vector2 position, Vector2 size, Vector4 backgroundColor, StringBuilder toolTip, MyTexture2D controlTexture) 
            : base(parent, position, size, backgroundColor, toolTip, controlTexture)
        {
            m_realSize = size;

            m_verticalScrollbar = new MyVScrollbar(this);
            m_verticalScrollbar.TopBorder = m_verticalScrollbar.RightBorder = m_verticalScrollbar.BottomBorder = false;
            m_verticalScrollbar.LeftBorder = false;
            m_verticalScrollbar.OnScrollValueChanged += OnScrollValueChanged;

            RecalculateScrollbar();

            Controls.CollectionChanged += ControlsCollectionChanged;            
        }
 public MyObjectiveEnablePrefabs(
     StringBuilder name,
     MyMissionID id,
     StringBuilder description,
     MyTexture2D icon,
     MyMission parentMission,
     MyMissionID[] requiredMissions,
     MyMissionLocation location,
     List<uint> missionEntityIDs,
     List<uint> toEnablePrefabs,
     MyDialogueEnum? successDialogId = null,
     MyDialogueEnum? startDialogId = null)
     : base(name, id, description, icon, parentMission, requiredMissions, location, missionEntityIDs, successDialogId, startDialogId)
 {
     m_toEnablePrefabs = toEnablePrefabs;
 }
        public MyGuiScreenUnloading(MyGuiScreenGamePlay screenToUnload, MyGuiScreenBase screenToShowAfter)
            : base(Vector2.Zero, null, null)
        {
            m_screenToUnload = screenToUnload;
            m_closeOnEsc = false;
            DrawMouseCursor = false;
            m_loadInDrawFinished = false;
            m_drawEvenWithoutFocus = true;
            m_currentQuoteOfTheDay = MyQuoteOfTheDay.GetRandomQuote();
            
            Vector2 loadingTextSize = MyGuiManager.GetNormalizedSize(MyGuiManager.GetFontMinerWarsBlue(),
                MyTextsWrapper.Get(MyTextsWrapperEnum.LoadingPleaseWait), MyGuiConstants.LOADING_PLEASE_WAIT_SCALE);
            m_rotatingWheelTexture = MyGuiManager.GetLoadingTexture();
            Controls.Add(new MyGuiControlRotatingWheel(this, MyGuiConstants.LOADING_PLEASE_WAIT_POSITION - new Vector2(0, 0.075f + loadingTextSize.Y),
                MyGuiConstants.ROTATING_WHEEL_COLOR, MyGuiConstants.ROTATING_WHEEL_DEFAULT_SCALE, MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER, m_rotatingWheelTexture));

            m_loadFinished = false;

            MyMinerGame.IsGameReady = false;
            m_screenToShowAfter = screenToShowAfter;
        }
        public MyGuiControlListboxItem(int key, StringBuilder value, MyTexture2D icon, MyToolTips tooltip, float scale)
        {
            Key = key;
            Icon = icon;
            ToolTip = tooltip;

            if (value != null)
            {
                ColoredText = new MyColoredText(value, new Color(MyGuiConstants.LISTBOX_TEXT_COLOR),
                                  new Color(MyGuiConstants.LISTBOX_TEXT_COLOR * MyGuiConstants.CONTROL_MOUSE_OVER_BACKGROUND_COLOR_MULTIPLIER),
                                  MyGuiManager.GetFontMinerWarsBlue(),
                                  scale, Vector2.Zero);

                if (ToolTip == null)
                {
                    ToolTip = new MyToolTips(value);
                }
            }
            BackgroundColor = Vector4.One;
            Enabled = true;
        }
Esempio n. 30
0
 public MyObjective( StringBuilder Name, 
                     MyMissionID ID, 
                     StringBuilder Description, 
                     MyTexture2D Icon, 
                     MyMission ParentMission, 
                     MyMissionID[] RequiredMissions, 
                     MyMissionLocation Location, 
                     List<uint> MissionEntityIDs = null, 
                     MyDialogueEnum? successDialogId = null, 
                     MyDialogueEnum? startDialogId = null,
                     MyActorEnum[] requiredActors = null,
                     float? radiusOverride = null)
 {
     this.NameTemp = Name;
     this.ID = ID;
     this.DescriptionTemp = Description;
     this.Icon = Icon;
     this.ParentMission = ParentMission;
     this.RequiredMissions = RequiredMissions;
     this.Location = Location;
     this.MissionEntityIDs = new List<uint>();
     this.SuccessDialogId = successDialogId;
     this.StartDialogId = startDialogId;
     this.m_radiusOverride = radiusOverride;
     if (MissionEntityIDs != null)
     {
         this.MissionEntityIDs.AddRange(MissionEntityIDs);
     }
     if (requiredActors != null)
     {
         this.RequiredActors = requiredActors;
     }
     RequiresDrone = false;
     CanBeSkipped = true;
     FailIfEntityDestroyed = true;
     MakeEntityIndestructible = true;
 }
        private void LoadShipInventory(int index) 
        {
            m_currentShipBuilderIndex = index;

            if (m_shipsCombobox != null)
            {
                m_shipsCombobox.SelectItemByIndex(m_currentShipBuilderIndex);
            }

            // load listboxes for new selected ship's ids
            FillShipCustomizationListboxes(m_currentShipBuilderIndex);

            if (m_resetWasAnythingTrasferedAfterComboboxChanged)
            {
                m_wasAnythingTrasfered = false;
            }

            m_shipTexture = GetShipTexture();
            m_shipPanel.SetBackgroundTexture(m_shipTexture);
            m_shipNameLabel.UpdateText(m_smallShipsBuilders[m_currentShipBuilderIndex].Name.ToString());
        }