MNGuiInputButton.SetFont
Skip to content
mnscript
MNGuiInputButton.SetFont(string) 

Description ​

Sets the label font.

Arguments ​

string - The new font.

Example ​

msc
using Surface;
using System;

// Valid fonts:
// - default
// - code_pro
// - arial

MNGuiFrame frame = Surface.CreateApplicationFrame();
MNGuiPanel pnl = frame.GetPanel();

// Creates a button using Code Pro font.
MNGuiInputButton button = Surface.CreateInputButton(pnl);
button.DockFill();
button.SetText("My Button!");
button.SetFont("code_pro");

// Update to add the new UI to the screen.
Surface.Update();

// Keep the program alive so the UI stays.
while(true){
    System.Sleep(1);
}