public MyGuiControlLabel(IMyGuiControlsParent parent, Vector2 position, Vector2? size, MyTextsWrapperEnum textEnum, Vector4 textColor, float textScale, MyGuiDrawAlignEnum textAlign) : base(parent, position, size, null, null, false) { m_type = MyGuiControlLabelType.DEFINED_BY_TEXT_WRAPPER_ENUM; m_textEnum = textEnum; Init(textColor, textScale, textAlign); }
public MyGuiControlLabel(IMyGuiControlsParent parent, Vector2 position, Vector2?size, MyTextsWrapperEnum textEnum, Vector4 textColor, float textScale, MyGuiDrawAlignEnum textAlign) : base(parent, position, size, null, null, false) { m_type = MyGuiControlLabelType.DEFINED_BY_TEXT_WRAPPER_ENUM; m_textEnum = textEnum; Init(textColor, textScale, textAlign); }
public MyGuiControlLabel(IMyGuiControlsParent parent, Vector2 position, Vector2? size, StringBuilder text, Vector4 textColor, float textScale, MyGuiDrawAlignEnum textAlign) : base(parent, position, size, null, null, false) { m_type = MyGuiControlLabelType.DEFINED_BY_STRING_BUILDER; if (text != null) { // Create COPY of the text (Don't just point to one string builder!!! This was my original mistake!) m_textDefinition = new StringBuilder(text.ToString()); m_textDraw = new StringBuilder(text.ToString()); } Init(textColor, textScale, textAlign); }
public MyGuiControlLabel(IMyGuiControlsParent parent, Vector2 position, Vector2?size, StringBuilder text, Vector4 textColor, float textScale, MyGuiDrawAlignEnum textAlign, MyGuiFont font) : base(parent, position, size, null, null, false) { m_type = MyGuiControlLabelType.DEFINED_BY_STRING_BUILDER; Font = font; if (text != null) { // Create COPY of the text (Don't just point to one string builder!!! This was my original mistake!) m_textDefinition = new StringBuilder(text.ToString()); m_textDraw = new StringBuilder(text.ToString()); } Init(textColor, textScale, textAlign); }