MNGuiButton.SetBackgroundColor
Skip to content
mnscript
MNGuiButton.SetBackgroundColor(Color) 

Description ​

Sets the UI element background color.

Arguments ​

Color - The new background color.

Example ​

msc
using Surface;
using System;

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

// Creates a panel in and docks it to the right.
MNGuiPanel panel = Surface.CreatePanel(pnl);
panel.DockTop();

Color red = new Color(200,100,100,255);
panel.SetBackgroundColor(red);

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

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