ImageButton
A clickable image. Maps to Roblox ImageButton.
luau
PeanutUI.ImageButton {
imageContent = "rbxassetid://123456",
Activated = function()
print("clicked")
end,
}Properties
In addition to the shared widget properties and all ImageLabel properties:
| Property | Type | Description |
|---|---|---|
hoverImage | string | Image shown on hover. |
pressedImage | string | Image shown while pressed. |
autoButtonColor | boolean | Whether Roblox tints the button automatically. |
modal | boolean | Whether the button is modal. |
selected | boolean | Selection state. |
Events
In addition to the shared widget events:
| Event | Signature |
|---|---|
Activated | (obj: InputObject, clickCount: number) -> () |
SecondaryActivated | (obj: InputObject) -> () |