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
ENABLE
A value specifying if the object should be activated by default.
bool ENABLE
Property Value
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
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
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
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
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
Methods
DISABLE()
void DISABLE()
DISABLEBUTVISIBLE()
void DISABLEBUTVISIBLE()
ENABLE()
void ENABLE()
GETSTD()
string GETSTD()
Returns
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
rectA 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
ONCLICKED
SignalHandler? ONCLICKED
Event Type
ONDRAGGING
SignalHandler? ONDRAGGING
Event Type
ONENDDRAGGING
SignalHandler? ONENDDRAGGING
Event Type
ONFOCUSOFF
SignalHandler? ONFOCUSOFF
Event Type
ONFOCUSON
SignalHandler? ONFOCUSON
Event Type
ONINIT
SignalHandler? ONINIT
Event Type
ONRELEASED
SignalHandler? ONRELEASED
Event Type
ONSTARTDRAGGING
SignalHandler? ONSTARTDRAGGING