private MyGuiControlImageButton AddIcon(Vector2 position, string texture, Vector2 size)
        {
            var image = new MyGuiControlImageButton();

            image.Position = position;
            image.Size     = size;
            image.SetTexture(texture);
            Controls.Add(image);
            return(image);
        }
Example #2
0
        public void RefreshThumbnail()
        {
            m_selectedImage = new MyGuiControlImageButton();
            m_selectedImage.BorderTexture = MyGuiConstants.TEXTURE_RECTANGLE_DARK;

            m_thumbnailImage               = new MyGuiControlImageButton();
            m_thumbnailImage.Position      = new Vector2(-0.31f, -0.2f);
            m_thumbnailImage.Size          = new Vector2(0.2f, 0.175f);
            m_thumbnailImage.BorderTexture = MyGuiConstants.TEXTURE_RECTANGLE_DARK;
            m_thumbnailImage.Visible       = false;
        }
 public MyGuiDetailScreenBase(bool isTopMostScreen, MyGuiBlueprintScreenBase parent, MyGuiCompositeTexture thumbnailTexture, MyGuiControlListbox.Item selectedItem, float textScale)
     : base(new Vector2(0.37f, 0.325f), new Vector2(0.725f, 0.4f), MyGuiConstants.SCREEN_BACKGROUND_COLOR, isTopMostScreen)
 {
     m_thumbnailImage = new MyGuiControlImageButton(true);
     if (thumbnailTexture == null)
     {
         m_thumbnailImage.Visible = false;
     }
     else
     {
         m_thumbnailImage.BackgroundTexture = thumbnailTexture;
     }
     m_selectedItem = selectedItem;
     m_blueprintName = selectedItem.Text.ToString();
     m_textScale = textScale;
     m_parent = parent;
 }
 public MyGuiDetailScreenBase(bool isTopMostScreen, MyGuiBlueprintScreenBase parent, MyGuiCompositeTexture thumbnailTexture, MyGuiControlListbox.Item selectedItem, float textScale)
     : base(new Vector2(0.37f, 0.325f), new Vector2(0.725f, 0.4f), MyGuiConstants.SCREEN_BACKGROUND_COLOR, isTopMostScreen)
 {
     m_thumbnailImage = new MyGuiControlImageButton(true);
     if (thumbnailTexture == null)
     {
         m_thumbnailImage.Visible = false;
     }
     else
     {
         m_thumbnailImage.BackgroundTexture = thumbnailTexture;
     }
     m_selectedItem  = selectedItem;
     m_blueprintName = selectedItem.Text.ToString();
     m_textScale     = textScale;
     m_parent        = parent;
 }
 private MyGuiControlImageButton AddIcon(Vector2 position, string texture, Vector2 size)
 {
     var image = new MyGuiControlImageButton();
     image.Position = position;
     image.Size = size;
     image.SetTexture(texture);
     Controls.Add(image);
     return image;
 }
        public void RefreshThumbnail()
        {
            m_selectedImage = new MyGuiControlImageButton();
            m_selectedImage.BorderTexture = MyGuiConstants.TEXTURE_RECTANGLE_DARK;

            m_thumbnailImage = new MyGuiControlImageButton();
            m_thumbnailImage.Position = new Vector2(-0.31f, -0.2f);
            m_thumbnailImage.Size = new Vector2(0.2f, 0.175f);
            m_thumbnailImage.BorderTexture = MyGuiConstants.TEXTURE_RECTANGLE_DARK;
            m_thumbnailImage.Visible = false;
        }