Skip to content

MNGuiButton class ​

No description available

Functions ​

mnscript
MNGuiButton.DockBottom() 
  • Docks the element to the bottom.
mnscript
MNGuiButton.DockFill() 
  • Docks the element to fill.
mnscript
MNGuiButton.DockLeft() 
  • Docks the element to the left.
mnscript
MNGuiButton.DockRight() 
  • Docks the element to the right.
mnscript
MNGuiButton.DockTop() 
  • Docks the element to the top.
mnscript
string MNGuiButton.GetData() 
  • Gets the button data.
mnscript
bool MNGuiButton.GetEnabled() 
  • Returns whether the UI element is enabled.
mnscript
string MNGuiButton.GetTag() 
  • Gets the button tag.
mnscript
bool MNGuiButton.IsValid() 
  • Returns whether the UI element is valid.
mnscript
MNGuiButton.Remove() 
  • Removes the UI element.
mnscript
MNGuiButton.SetBackgroundColor(Color) 
  • Sets the UI element background color.
mnscript
MNGuiButton.SetData(string) 
  • Sets the button data. This is to get some data in Surface_ButtonPressed event.
mnscript
MNGuiButton.SetDockMargin(number, number, number, number) 
  • Sets the UI element dock margin.
mnscript
MNGuiButton.SetEnabled(bool) 
  • Sets whether the UI element is enabled.
mnscript
MNGuiButton.SetFont(string) 
  • Sets the label font.
mnscript
MNGuiButton.SetFontSize(number) 
  • Sets the button font size (10-100).
mnscript
MNGuiButton.SetHeight(number) 
  • Sets the height of the UI element.
mnscript
MNGuiButton.SetHoverColor(Color) 
  • Sets the button background hover color.
mnscript
MNGuiButton.SetPos(number, number) 
  • Sets the position of the UI element.
mnscript
MNGuiButton.SetRounded(number) 
  • Sets the roundedness.
mnscript
MNGuiButton.SetScalePos(number, number) 
  • Sets the position of the UI element using a percentage (0-1).
mnscript
MNGuiButton.SetScaleSize(number, number) 
  • Sets the size of the UI element using a percentage (0-1).
mnscript
MNGuiButton.SetSize(number, number) 
  • Sets the width and height of the UI element.
mnscript
MNGuiButton.SetTag(string) 
  • Sets the button tag. This is to know which button was pressed in Surface_ButtonPressed event.
mnscript
MNGuiButton.SetText(string) 
  • Sets the label text.
mnscript
MNGuiButton.SetTextColor(Color) 
  • Sets the label text color.
mnscript
MNGuiButton.SetWidth(number) 
  • Sets the width of the UI element.
mnscript
MNGuiButton.TextAlignCenter() 
  • Aligns the text center.
mnscript
MNGuiButton.TextAlignLeft() 
  • Aligns the text left.
mnscript
MNGuiButton.TextAlignRight() 
  • Aligns the text right.