M_MSCLoader_Settings_AddButton_4 - piotrulos/MSCModLoader GitHub Wiki

AddButton(String, Action, Color, Color, Texture2D, Boolean) Method

Add button that can execute function.

Definition

Namespace: MSCLoader
Assembly: MSCLoader (in MSCLoader.dll) Version: 1.3.1.346

C#

public static <a href="T_MSCLoader_SettingsButton">SettingsButton</a> AddButton(
	string name,
	Action onClick,
	Color btnColor,
	Color buttonTextColor,
	Texture2D customIcon,
	bool visibleByDefault = true
)

View Source

Parameters

  String
Text on the button
  Action
What to do when button is clicked
  Color
Button background color
  Color
Button text color
  Texture2D
Custom icon (Texture2D, should be POT minimum 16x16, no bigger than 64x64)
  Boolean  (Optional)
Visible by default (default=true)

Return Value

SettingsButton
SettingsButton

See Also

Reference

Settings Class
AddButton Overload
MSCLoader Namespace

⚠️ **GitHub.com Fallback** ⚠️