Table of Contents

Class BUTTON

Namespace
PIKLib
Assembly
PIKLib.dll

An interactable area which reacts to mouse cursor being hovered over it and clicking it.

BUTTON : OBJECT
Inheritance
BUTTON
Inherited Members

Properties

DRAGGABLE

A value specifying if the object should support dragging.

bool DRAGGABLE

Property Value

bool

ENABLE

A value specifying if the object should be activated by default.

bool ENABLE

Property Value

bool

Remarks

A disabled button hides associated objects supplied using the GFXSTANDARD, GFXONMOVE and GFXONCLICK properties.

GFXONCLICK

The name of an ANIMO or IMAGE object to be shown when the mouse button is being pressed over the button.

string? GFXONCLICK

Property Value

string

Remarks

This property is overridden by the RECT property.

GFXONMOVE

The name of an ANIMO or IMAGE object to be shown when the mouse cursor is being hovered over the button.

string? GFXONMOVE

Property Value

string

Remarks

This property is overridden by the RECT property.

GFXSTANDARD

The name of an ANIMO or IMAGE object to be shown when the button is neither pressed nor hovered upon.

string GFXSTANDARD

Property Value

string

Remarks

This property is overridden by the RECT property.

RECT

A literal rect described by four coordinates or a reference being the name of a graphical object to base the rect on, capturing its current state.

rect RECT

Property Value

rect

Remarks

This property overrides the GFXSTANDARD, GFXONMOVE and GFXONCLICK properties.

If a reference is used, the rect only reflects the state of the referenced object at the time of the method call. For example changing the referenced animation frame does not result in the interactive area of the button being resized/moved.

SNDONMOVE

The name of a SOUND object to be played when mouse cursor hovers over the button.

string? SNDONMOVE

Property Value

string

Methods

DISABLE()

void DISABLE()

DISABLEBUTVISIBLE()

void DISABLEBUTVISIBLE()

ENABLE()

void ENABLE()

GETSTD()

string GETSTD()

Returns

string

SETONCLICK(string)

void SETONCLICK(string object_name)

Parameters

object_name string

SETONMOVE(string)

void SETONMOVE(string object_name)

Parameters

object_name string

SETPRIORITY(int)

void SETPRIORITY(int priority)

Parameters

priority int

SETRECT(rect)

Sets the interactive area of the button to the given rect.

void SETRECT(rect rect)

Parameters

rect rect

A literal rect described by four coordinates or a reference being the name of a graphical object to base the rect on, capturing its current state.

Remarks

Calling this method does not make the button visible or enabled.

Setting a rect makes the GFXSTANDARD, GFXONMOVE and GFXONCLICK properties as well as any further calls to the SETSTD(string), SETONMOVE(string) and SETONCLICK(string) methods to be ignored.

If a reference is used, the rect only reflects the state of the referenced object at the time of the method call. For example changing the referenced animation frame does not result in the interactive area of the button being resized/moved.

SETSTD(string)

void SETSTD(string object_name)

Parameters

object_name string

Events

ONACTION

SignalHandler? ONACTION

Event Type

SignalHandler

ONCLICKED

SignalHandler? ONCLICKED

Event Type

SignalHandler

ONDRAGGING

SignalHandler? ONDRAGGING

Event Type

SignalHandler

ONENDDRAGGING

SignalHandler? ONENDDRAGGING

Event Type

SignalHandler

ONFOCUSOFF

SignalHandler? ONFOCUSOFF

Event Type

SignalHandler

ONFOCUSON

SignalHandler? ONFOCUSON

Event Type

SignalHandler

ONINIT

SignalHandler? ONINIT

Event Type

SignalHandler

ONRELEASED

SignalHandler? ONRELEASED

Event Type

SignalHandler

ONSTARTDRAGGING

SignalHandler? ONSTARTDRAGGING

Event Type

SignalHandler