Button

From Crumbled World Wiki

ButtonExampleCode

Inheritance

Panel

Constructor

function description
Button(PanelSize size)
Button(PanelSize size, string text)
Button(PanelSize size, text text)
Button(PanelSize size, string text, ButtonStyle style)
Button(PanelSize size, Text text, ButtonStyle style)
Button(PanelSize size, Texture texture, Vec2 uvCoordMin, Vec2 uvCoordMax )
Button(PanelSize size, ButtonStyle style, Texture texture, Vec2 uvCoordMin, Vec2 uvCoordMax )
Button(PanelSize size, string text, ButtonStyle style, Texture texture, Vec2 uvCoordMin, Vec2 uvCoordMax)
Button(PanelSize size, Text text, ButtonStyle style, Texture texture, Vec2 uvCoordMin, Vec2 uvCoordMax)

Functions

return function description
ButtonStyle getStyle() Get button style.
Text getText() Get text.
Vec4 getTextColor() Get text.
Texture getTexture() Get texture.
anchor getTextAnchor() Get text anchor.
setStyle(ButtonStyle style) set button style.
setText(string text) set button text.
setText(Text text) set button text.
setTextAnchor(Anchor textAnchor) set text anchor.
setTexture(Texture texture) Set texture.
setTextColor(Vec3 color) set text color.
setTextColor(Vec4 color) set text color.
setTextHoverColor(Vec3 color) set text hover color.
setTextHoverColor(Vec4 color) set text hover color.
setTextDownColor(Vec3 color) set text down color.
setTextDownColor(Vec4 color) set text down color.
setInnerColor(Vec4 color) set button color.
setInnerColor(Vec4 topColor, Vec4 middleColor, Vec4 bottomColor) set button color.
setInnerHoverColor(Vec4 color) set button color.
setInnerHoverColor(Vec4 topColor, Vec4 middleColor, Vec4 bottomColor) set button color.
setInnerDownColor(Vec4 color) set button color.
setInnerDownColor(Vec4 topColor, Vec4 middleColor, Vec4 bottomColor) set button color.
setEdgeColor(Vec4 color) set button edge color.
setEdgeColor(Vec4 topColor, Vec4 bottomColor) set button edge color.
setEdgeHoverColor(Vec4 color) set button edge color.
setEdgeHoverColor(Vec4 topColor, Vec4 bottomColor) set button edge color.
setEdgeDownColor(Vec4 color) set button edge color.
setEdgeDownColor(Vec4 topColor, Vec4 bottomColor) set button edge color.