FreeFormButtonDesign

From Crumbled World Wiki

FreeFormButtonDesignExampleCode

Constructor

function description
FreeFormButtonDesign()
FreeFormButtonDesign(PanelSizeType type)

Functions

return function description
setDisabledMesh() This mesh is shown when the button is disabled
setDefaultMesh() This mesh is shown when the button is enabled and not selected
setSelectedMesh() This mesh is shown when the button is enabled and selected
setMouseHoverMesh() This mesh is only visibel when button is enabled and the mouse is hovering over it
addQuad(Vec2 position1, Vec2 position2, Vec2 position3, Vec2 position4, Vec3 color1, Vec3 color2, Vec3 color3, Vec3 color4) Add quad to the target mesh
addQuad(Vec2 position1, Vec2 position2, Vec2 position3, Vec2 position4, Vec4 color1, Vec4 color2, Vec4 color3, Vec4 color4) Add quad to the target mesh
addTriangle(Vec2 position1, Vec2 position2, Vec2 position3, Vec3 color1, Vec3 color2, Vec3 color3) Add triangle to the target mesh
addTriangle(Vec2 position1, Vec2 position2, Vec2 position3, Vec4 color1, Vec4 color2, Vec4 color3) Add triangle to the target mesh
setButtonAreaSquare(Vec2 minPos, Vec2 MaxPos) set where button can be used
setButtonAreaCircle(Vec2 centerPos, float radius) set where button can be used
setImageDefaultTexture(Texture texture) set default texture
setImageDefaultUvCoord(Vec2 minCoord, Vec2 maxCoord) set default image uv coordinates
setImagePosition(Vec2 position) set image position
setImageSize(Vec2 size) set image size
enableImage() Enable main image sprite
enableSecondaryImage() Enable secondary image sprite