本文整理汇总了C#中Sandbox.Graphics.GUI.MyGuiControlLabel类的典型用法代码示例。如果您正苦于以下问题:C# MyGuiControlLabel类的具体用法?C# MyGuiControlLabel怎么用?C# MyGuiControlLabel使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
MyGuiControlLabel类属于Sandbox.Graphics.GUI命名空间,在下文中一共展示了MyGuiControlLabel类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MyGuiScreenTriggerLives
public MyGuiScreenTriggerLives(MyTrigger trg)
: base(trg, new Vector2(WINSIZEX + 0.1f, WINSIZEY))
{
float left = m_textboxMessage.Position.X-m_textboxMessage.Size.X/2;
float top = -WINSIZEY / 2f + MIDDLE_PART_ORIGIN.Y;
m_labelLives = new MyGuiControlLabel(
originAlign: MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_TOP,
position: new Vector2(left, top),
size: new Vector2(0.01f, 0.035f),
text: MyTexts.Get(MySpaceTexts.GuiTriggersLives).ToString()
);
left += m_labelLives.Size.X + spacingH;
m_lives = new MyGuiControlTextbox()
{
OriginAlign = MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_TOP,
Position = new Vector2(left, top),
Size = new Vector2((WINSIZEX - spacingH) / 3 - 2 * spacingH - m_labelLives.Size.X, 0.035f),
Type = MyGuiControlTextboxType.DigitsOnly,
Name = "lives"
};
m_lives.TextChanged += OnLivesChanged;
AddCaption(MySpaceTexts.GuiTriggerCaptionLives);
Controls.Add(m_labelLives);
Controls.Add(m_lives);
m_lives.Text = ((MyTriggerLives)trg).LivesLeft.ToString();
}
示例2: WarningLine
public WarningLine(MySimpleProfiler.PerformanceWarning warning, MyGuiScreenPerformanceWarnings screen)
{
Parent = new MyGuiControlParent();
m_name = new MyGuiControlLabel(text: Truncate(warning.Block.DisplayName), position: new Vector2(-0.43f, 0), originAlign: VRage.Utils.MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER, font: VRage.Game.MyFontEnum.Red);
m_description = new MyGuiControlLabel
(
text: String.IsNullOrEmpty(warning.Block.Description.String) ? MyTexts.GetString(MyCommonTexts.PerformanceWarningTooManyBlocks) : MyTexts.GetString(warning.Block.Description),
position: new Vector2(-0.24f, 0),
originAlign: VRage.Utils.MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER
);
m_separator = new MyGuiControlSeparatorList();
Parent.Size = new Vector2(Parent.Size.X, m_description.Size.Y);
m_separator.AddVertical(new Vector2(-0.25f, -Parent.Size.Y / 2 - 0.006f), Parent.Size.Y + 0.016f);
m_separator.AddVertical(new Vector2(0.35f, -Parent.Size.Y / 2 - 0.006f), Parent.Size.Y + 0.016f);
m_time = new MyGuiControlLabel(position: new Vector2(0.43f, 0), originAlign: VRage.Utils.MyGuiDrawAlignEnum.HORISONTAL_RIGHT_AND_VERTICAL_CENTER);
switch (warning.Block.type)
{
case MySimpleProfiler.MySimpleProfilingBlock.ProfilingBlockType.GRAPHICS:
screen.m_areaTitleGraphics.Warnings.Add(this);
break;
case MySimpleProfiler.MySimpleProfilingBlock.ProfilingBlockType.BLOCK:
screen.m_areaTitleBlocks.Warnings.Add(this);
break;
case MySimpleProfiler.MySimpleProfilingBlock.ProfilingBlockType.OTHER:
screen.m_areaTitleOther.Warnings.Add(this);
break;
}
this.Warning = warning;
}
示例3: LoadControls
void LoadControls()
{
// Background texture unloaded in base
m_wheelTexture = MyGuiConstants.LOADING_TEXTURE;
m_size = new Vector2(598 / 1600f, 368 / 1200f);
m_progressTextLabel = new MyGuiControlLabel(
position: new Vector2(0.0f, -0.07f),
textScale: MyGuiConstants.DEFAULT_TEXT_SCALE * 0.86f,
originAlign: MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER);
m_progressTextLabel.TextEnum = m_progressText;
Controls.Add(m_progressTextLabel);
float deltaX = 0;// (m_enableCancel) ? 0.08f : 0.0f;
float deltaY = 0.015f;
m_rotatingWheel = new MyGuiControlRotatingWheel(new Vector2(-deltaX, deltaY), MyGuiConstants.ROTATING_WHEEL_COLOR, MyGuiConstants.ROTATING_WHEEL_DEFAULT_SCALE,
MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER, m_wheelTexture);
Controls.Add(m_rotatingWheel);
// Sometimes we don't want to allow user to cancel pending progress screen
if (m_cancelText.HasValue)
{
var cancelButton = new MyGuiControlButton(
position: new Vector2(deltaX, deltaY + 0.09f),
size: MyGuiConstants.BACK_BUTTON_SIZE,
text: MyTexts.Get(m_cancelText.Value),
visualStyle: Common.ObjectBuilders.Gui.MyGuiControlButtonStyleEnum.ControlSetting,
onButtonClick: OnCancelClick);
Controls.Add(cancelButton);
}
m_controlsCreated = true;
}
示例4: MyGuiScreenTriggerTime
public MyGuiScreenTriggerTime(MyTrigger trg, MyStringId labelText)
: base(trg, new Vector2(WINSIZEX + 0.1f, WINSIZEY))
{
float left = m_textboxMessage.Position.X-m_textboxMessage.Size.X/2;
float top = -WINSIZEY / 2f + MIDDLE_PART_ORIGIN.Y;
m_labelTime = new MyGuiControlLabel(
originAlign: MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_TOP,
position: new Vector2(left, top),
size: new Vector2(0.013f, 0.035f),
text: MyTexts.Get(labelText).ToString()//text: MyTexts.Get(MySpaceTexts.GuiTriggerTimeLimit).ToString()
);
left += m_labelTime.Size.X + spacingH;
m_textboxTime = new MyGuiControlTextbox()
{
OriginAlign = MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_TOP,
Position = new Vector2(left, top),
Size = new Vector2(0.05f, 0.035f),
Type = MyGuiControlTextboxType.DigitsOnly,
Name = "time"
};
m_textboxTime.TextChanged += OnTimeChanged;
Controls.Add(m_labelTime);
Controls.Add(m_textboxTime);
}
示例5: RecreateControls
public override void RecreateControls(bool contructor)
{
base.RecreateControls(contructor);
var fileName = MakeScreenFilepath("DialogAmount");
var fsPath = Path.Combine(MyFileSystem.ContentPath, fileName);
MyObjectBuilder_GuiScreen objectBuilder;
Sandbox.Common.ObjectBuilders.Serializer.MyObjectBuilderSerializer.DeserializeXML<MyObjectBuilder_GuiScreen>(fsPath, out objectBuilder);
Init(objectBuilder);
m_amountTextbox = (MyGuiControlTextbox)Controls.GetControlByName("AmountTextbox");
m_increaseButton = (MyGuiControlButton)Controls.GetControlByName("IncreaseButton");
m_decreaseButton = (MyGuiControlButton)Controls.GetControlByName("DecreaseButton");
m_confirmButton = (MyGuiControlButton)Controls.GetControlByName("ConfirmButton");
m_cancelButton = (MyGuiControlButton)Controls.GetControlByName("CancelButton");
m_errorLabel = (MyGuiControlLabel)Controls.GetControlByName("ErrorLabel");
m_captionLabel = (MyGuiControlLabel)Controls.GetControlByName("CaptionLabel");
m_captionLabel.Text = null;
m_captionLabel.TextEnum = m_caption;
m_errorLabel.Visible = false;
m_amountTextbox.TextChanged += amountTextbox_TextChanged;
m_increaseButton.ButtonClicked += increaseButton_OnButtonClick;
m_decreaseButton.ButtonClicked += decreaseButton_OnButtonClick;
m_confirmButton.ButtonClicked += confirmButton_OnButtonClick;
m_cancelButton.ButtonClicked += cancelButton_OnButtonClick;
RefreshAmountTextbox();
}
示例6: MyGuiControlItem
public MyGuiControlItem(MyAbstractControlMenuItem item, Vector2? size = null)
: base(size: size)
{
m_item = item;
m_item.UpdateValue();
m_label = new MyGuiControlLabel(text: item.ControlLabel, textScale: 0.8f);
m_value = new MyGuiControlLabel(text: item.CurrentValue, textScale: 0.8f);
MyLayoutVertical layout = new MyLayoutVertical(this, 28);
layout.Add(m_label, m_value);
}
示例7: ComponentLineControl
public ComponentLineControl(Vector2 size, float iconSize)
: base(size: size, originAlign: MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_TOP)
{
var m_iconSize = new Vector2(iconSize) * new Vector2(0.75f, 1);
var middleLeft = new Vector2(-this.Size.X / 2, 0);
var middleRight = new Vector2(this.Size.X / 2, 0);
var iconPos = middleLeft - new Vector2(0, m_iconSize.Y / 2);
//IconPanel = new MyGuiControlPanel();
//IconPanelBackground = new MyGuiControlPanel();
IconImage = new MyGuiControlImage();
IconPanelProgress = new MyGuiControlPanel();
NameLabel = new MyGuiControlLabel(text: String.Empty);
NumbersLabel = new MyGuiControlLabel(text: String.Empty);
//IconPanel.Size = m_iconSize;
//IconPanel.OriginAlign = MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_TOP;
//IconPanel.Position = iconPos;
//IconPanelBackground.Size = m_iconSize;
//IconPanelBackground.OriginAlign = MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_TOP;
//IconPanelBackground.Position = iconPos;
//IconPanelBackground.BackgroundTexture = new MyGuiCompositeTexture(MyGuiConstants.TEXTURE_HUD_BG_MEDIUM_DEFAULT.Texture);
IconImage.Size = m_iconSize;
IconImage.OriginAlign = MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_TOP;
IconImage.Position = iconPos;
IconImage.BackgroundTexture = new MyGuiCompositeTexture(MyGuiConstants.TEXTURE_HUD_BG_MEDIUM_DEFAULT.Texture);
IconPanelProgress.Size = m_iconSize;
IconPanelProgress.OriginAlign = MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_TOP;
IconPanelProgress.Position = iconPos;
IconPanelProgress.BackgroundTexture = MyGuiConstants.TEXTURE_GUI_BLANK;
float gray = 0.1f;
IconPanelProgress.ColorMask = new Vector4(gray, gray, gray, 0.5f);
NameLabel.OriginAlign = MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER;
NameLabel.Position = middleLeft + new Vector2(m_iconSize.X + 0.01225f, 0);
NameLabel.AutoEllipsis = true;
NumbersLabel.OriginAlign = MyGuiDrawAlignEnum.HORISONTAL_RIGHT_AND_VERTICAL_CENTER;
NumbersLabel.Position = middleRight + new Vector2(-0.033f, 0); //topRight + new Vector2(-0.02f, 0.004f);
//Elements.Add(IconPanelBackground);
//Elements.Add(IconPanel);
Elements.Add(IconImage);
Elements.Add(IconPanelProgress);
Elements.Add(NameLabel);
Elements.Add(NumbersLabel);
}
示例8: MyGuiControlComponentList
public MyGuiControlComponentList():
base(isActiveControl: false)
{
m_padding = new MyGuiBorderThickness(0.02f, 0.008f);
m_valuesLabel = new MyGuiControlLabel()
{
OriginAlign = MyGuiDrawAlignEnum.HORISONTAL_RIGHT_AND_VERTICAL_TOP,
Text = "Required / Available",
TextScale = 0.75f * MyGuiConstants.DEFAULT_TEXT_SCALE,
};
Elements.Add(m_valuesLabel);
UpdatePositions();
}
示例9: MyGuiControlVoxelHandSettings
public MyGuiControlVoxelHandSettings()
: base(size: new Vector2(0.25f, 0.4f),
backgroundTexture: new MyGuiCompositeTexture(MyGuiConstants.TEXTURE_HUD_BG_LARGE_DEFAULT.Texture),
originAlign: MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_TOP)
{
m_labelSettings = new MyGuiControlLabel()
{
Position = new Vector2(-0.1f, -0.1875f),
TextEnum = MyCommonTexts.VoxelHandSettingScreen_ShapeSettings,
OriginAlign = MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_TOP,
Font = MyFontEnum.ScreenCaption,
};
OKButton = new MyGuiControlButton() { Position = new Vector2(0f, 0.19f), TextEnum = MyCommonTexts.Ok, OriginAlign = MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_BOTTOM };
}
示例10: MyGuiControlBlockProperty
public MyGuiControlBlockProperty(String title, String tooltip, MyGuiControlBase propertyControl,
MyGuiControlBlockPropertyLayoutEnum layout = MyGuiControlBlockPropertyLayoutEnum.Vertical, bool showExtraInfo = true)
: base(toolTip: tooltip, canHaveFocus: true, isActiveControl: false, allowFocusingElements: true)
{
const float LABEL_TEXT_SCALE = MyGuiConstants.DEFAULT_TEXT_SCALE * 0.95f;
m_title = new MyGuiControlLabel(text: title, textScale: LABEL_TEXT_SCALE);
if (title.Length > 0)
{
Elements.Add(m_title);
}
m_extraInfo = new MyGuiControlLabel(textScale: LABEL_TEXT_SCALE);
if (showExtraInfo)
{
Elements.Add(m_extraInfo);
}
m_propertyControl = propertyControl;
Elements.Add(m_propertyControl);
titleHeight = title.Length > 0 || showExtraInfo ? m_title.Size.Y : 0;
m_layout = layout;
switch (layout)
{
case MyGuiControlBlockPropertyLayoutEnum.Horizontal:
MinSize = new Vector2(m_propertyControl.Size.X + m_title.Size.X * 1.1f, Math.Max(m_propertyControl.Size.Y, 2.1f * titleHeight));
Size = MinSize;
m_title.OriginAlign = MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_TOP;
m_propertyControl.OriginAlign = MyGuiDrawAlignEnum.HORISONTAL_RIGHT_AND_VERTICAL_TOP;
m_extraInfo.OriginAlign = MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_TOP;
break;
case MyGuiControlBlockPropertyLayoutEnum.Vertical:
MinSize = new Vector2(Math.Max(m_propertyControl.Size.X, m_title.Size.X), m_propertyControl.Size.Y + titleHeight * 1.1f);
Size = MinSize;
m_title.OriginAlign = MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_TOP;
m_propertyControl.OriginAlign = MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_TOP;
m_extraInfo.OriginAlign = MyGuiDrawAlignEnum.HORISONTAL_RIGHT_AND_VERTICAL_TOP;
break;
}
RefreshPositionsAndSizes();
m_extraInfo.Text = "";
m_extraInfo.Visible = false;
}
示例11: MyGuiScreenTriggerBlockDestroyed
public MyGuiScreenTriggerBlockDestroyed(MyTrigger trig) : base(trig,new Vector2(0.5f,0.8f))
{
trigger=(MyTriggerBlockDestroyed)trig;
AddCaption(MySpaceTexts.GuiTriggerCaptionBlockDestroyed);
var layout = new MyLayoutTable(this);
layout.SetColumnWidthsNormalized(10, 30, 3, 30, 10);
layout.SetRowHeightsNormalized(20, 35, 6, 4, 4, 5, 33);
m_selectedBlocks = new MyGuiControlTable();
m_selectedBlocks.VisibleRowsCount = 8;
m_selectedBlocks.ColumnsCount = 1;
m_selectedBlocks.SetCustomColumnWidths(new float[]{1});
m_selectedBlocks.SetColumnName(0, MyTexts.Get(MySpaceTexts.GuiTriggerBlockDestroyed_ColumnName));
layout.AddWithSize(m_selectedBlocks, MyAlignH.Left, MyAlignV.Top, 1, 1, rowSpan: 1, colSpan: 3);
m_buttonPaste = new MyGuiControlButton(
text: MyTexts.Get(MySpaceTexts.GuiTriggerPasteBlocks),
visualStyle: MyGuiControlButtonStyleEnum.Rectangular,
onButtonClick: OnPasteButtonClick
);
m_buttonPaste.SetToolTip(MySpaceTexts.GuiTriggerPasteBlocksTooltip);
layout.AddWithSize(m_buttonPaste, MyAlignH.Left, MyAlignV.Top, 2, 1, rowSpan: 1, colSpan: 1);
m_buttonDelete = new MyGuiControlButton(
text: MyTexts.Get(MySpaceTexts.GuiTriggerDeleteBlocks),
visualStyle: MyGuiControlButtonStyleEnum.Rectangular,
onButtonClick: OnDeleteButtonClick);
layout.AddWithSize(m_buttonDelete, MyAlignH.Left, MyAlignV.Top, 2, 3, rowSpan: 1, colSpan: 1);
m_labelSingleMessage = new MyGuiControlLabel(
text: MyTexts.Get(MySpaceTexts.GuiTriggerBlockDestroyedSingleMessage).ToString()
);
layout.AddWithSize(m_labelSingleMessage, MyAlignH.Left, MyAlignV.Top, 3, 1, rowSpan: 1, colSpan: 1);
m_textboxSingleMessage = new MyGuiControlTextbox(
defaultText: trigger.SingleMessage,
maxLength: 85);
layout.AddWithSize(m_textboxSingleMessage, MyAlignH.Left, MyAlignV.Top, 4, 1, rowSpan: 1, colSpan: 3);
foreach(var block in trigger.Blocks)
AddRow(block.Key);
m_tempSb.Clear().Append(trigger.SingleMessage);
m_textboxSingleMessage.SetText(m_tempSb);
}
示例12: MyGuiControlScenarioButton
public MyGuiControlScenarioButton(MyScenarioDefinition scenario):
base(key: MyDefinitionManager.Static.GetScenarioDefinitions().IndexOf(scenario))
{
VisualStyle = MyGuiControlRadioButtonStyleEnum.ScenarioButton;
OriginAlign = MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_TOP;
Scenario = scenario;
m_titleLabel = new MyGuiControlLabel(text: scenario.DisplayNameText, originAlign: MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_TOP);
m_previewPanel = new MyGuiControlPanel(texture: scenario.Icon, originAlign: MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_TOP);
MyGuiSizedTexture image = new MyGuiSizedTexture() { SizePx = new Vector2(229f, 128f), };
m_previewPanel.Size = image.SizeGui;
m_previewPanel.BorderEnabled = true;
m_previewPanel.BorderColor = MyGuiConstants.THEMED_GUI_LINE_COLOR.ToVector4();
SetToolTip(scenario.DescriptionText);
Size = new Vector2(Math.Max(m_titleLabel.Size.X, m_previewPanel.Size.X),
m_titleLabel.Size.Y + m_previewPanel.Size.Y);
Elements.Add(m_titleLabel);
Elements.Add(m_previewPanel);
}
示例13: RecreateControls
public override void RecreateControls(bool constructor)
{
base.RecreateControls(constructor);
var layout = new MyLayoutTable(this);
layout.SetColumnWidthsNormalized(50, 250, 150, 250, 50);
layout.SetRowHeightsNormalized(50, 450, 30, 50);
m_mainLabel = new MyGuiControlLabel(text: MyTexts.GetString(MySpaceTexts.GuiScenarioDescription), originAlign: MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER);
layout.AddWithSize(m_mainLabel, MyAlignH.Left, MyAlignV.Center, 0, 1, colSpan: 3);
//BRIEFING:
m_descriptionBox = new MyGuiControlMultilineText(
position: new Vector2(0.0f, 0.0f),
size: new Vector2(0.2f, 0.2f),
textBoxAlign: MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_TOP,
selectable: false);
layout.AddWithSize(m_descriptionBox, MyAlignH.Left, MyAlignV.Top, 1, 1, rowSpan: 1, colSpan: 3);
m_okButton = new MyGuiControlButton(text: MyTexts.Get(MyCommonTexts.Ok), visualStyle: MyGuiControlButtonStyleEnum.Rectangular, highlightType: MyGuiControlHighlightType.WHEN_ACTIVE,
size: new Vector2(200, 48f) / MyGuiConstants.GUI_OPTIMAL_SIZE, onButtonClick: OnOkClicked);
layout.AddWithSize(m_okButton, MyAlignH.Left, MyAlignV.Top, 2, 2);
}
示例14: MyGuiControlInventoryOwner
public MyGuiControlInventoryOwner(IMyInventoryOwner owner, Vector4 labelColorMask)
: base(backgroundTexture: new MyGuiCompositeTexture() { Center = new MyGuiSizedTexture() { Texture = @"Textures\GUI\Controls\item_highlight_dark.dds" } },
canHaveFocus: true,
allowFocusingElements: true,
isActiveControl: false)
{
Debug.Assert(owner != null);
m_nameLabel = MakeLabel();
m_nameLabel.ColorMask = labelColorMask;
m_massLabels = new List<MyGuiControlLabel>();
m_volumeLabels = new List<MyGuiControlLabel>();
m_inventoryGrids = new List<MyGuiControlGrid>();
ShowTooltipWhenDisabled = true;
m_nameLabel.Name = "NameLabel";
Elements.Add(m_nameLabel);
InventoryOwner = owner;
}
示例15: MyGuiScreenTrigger
public MyGuiScreenTrigger(MyTrigger trg, Vector2 size)
: base(size, MyGuiConstants.SCREEN_BACKGROUND_COLOR, size)
{
Vector2 m_itemPos=new Vector2();
m_itemPos.Y = - size.Y / 2 + 0.1f;
m_textboxName=new MyGuiControlLabel(
position: m_itemPos,
text: MyTexts.Get(MySpaceTexts.GuiTriggerMessage).ToString()
);
m_itemPos.Y += m_textboxName.Size.Y + VERTICAL_OFFSET;
m_trigger = trg;
m_textbox = new MyGuiControlTextbox(
position: m_itemPos,
defaultText: trg.Message,
maxLength: 85);
m_itemPos.Y += m_textbox.Size.Y + VERTICAL_OFFSET + 0.2f;
//line to the left of textbox
m_textboxName.Position = m_textboxName.Position-new Vector2(m_textbox.Size.X / 2 , 0);
Vector2 buttonOrigin = new Vector2(0f, Size.Value.Y * 0.4f);
Vector2 buttonOffset = new Vector2(0.01f, 0f);
m_okButton = new MyGuiControlButton(
text: MyTexts.Get(MySpaceTexts.Ok),
onButtonClick: OnOkButtonClick,
originAlign: MyGuiDrawAlignEnum.HORISONTAL_RIGHT_AND_VERTICAL_BOTTOM);
m_okButton.Position = buttonOrigin - buttonOffset;
m_cancelButton = new MyGuiControlButton(
text: MyTexts.Get(MySpaceTexts.Cancel),
onButtonClick: OnCancelButtonClick,
originAlign: MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_BOTTOM);
m_cancelButton.Position = buttonOrigin + buttonOffset;
Controls.Add(m_textboxName);
Controls.Add(m_textbox);
Controls.Add(m_okButton);
Controls.Add(m_cancelButton);
}