LM.GUI.ImageButton(path, tooltip, checkbox, msg, recolor)

Version added: before 9.5

Creates a button with a .png image background

ArgumentTypeDescriptionDefaultVer
pathcharA path to a .png image inside the ScriptResources folder. Don't use the .png extension though. For example, "ScriptResources/my_script_name/image1".< 9.5
tooltipcharTooltip that appears when on mouseover.< 9.5
checkboxboolSet this to true if you want your button to act as a checkbox.< 9.5
msgint32The message the button sends.0< 9.5
recolorboolShould the image be recolored when user changes the interface color scheme in the program settings. This argument was added in version 12.false12

Return type: LM_Button

The button can act like a regular button or can have "on/off" state to act like a checkbox. The image must be placed into the ScriptResources folder.