Exemplo n.º 1
0
        protected MyGuiControlLabel AddCaption(String text, Vector4?captionTextColor = null, Vector2?captionOffset = null, float captionScale = MyGuiConstants.DEFAULT_TEXT_SCALE)
        {
            var caption = new MyGuiControlLabel(
                position: new Vector2(0, -m_size.Value.Y / 2.0f + MyGuiConstants.SCREEN_CAPTION_DELTA_Y) + (captionOffset != null ? captionOffset.Value : Vector2.Zero),
                text: text,
                colorMask: captionTextColor ?? Vector4.One,
                textScale: captionScale,
                originAlign: MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER);

            caption.Name = "CaptionLabel";
            caption.Font = MyFontEnum.ScreenCaption;
            Elements.Add(caption);
            return(caption);
        }
 public MyGuiControlScrollablePanel(MyGuiControlBase scrolledControl)
 {
     Name            = "ScrollablePanel";
     ScrolledControl = scrolledControl;
     m_controls      = new MyGuiControls(this);
     m_controls.Add(ScrolledControl);
 }