SGButton - component, which is the controller buttons, defines the characteristics of the image and manages events. More...
Public Member Functions | |
CSAD_API void * | set (unsigned _int32, void *) |
used for any interface commands. | |
Public Member Functions inherited from csad::SGElement | |
CSAD_API const char * | getText () |
returns the text of the element (components Text3D) | |
_FORCEINLINE bool | isActive () |
Returns true if the installed state of the Active. | |
_FORCEINLINE bool | isClick () |
Returns true if set status Click. | |
_FORCEINLINE bool | isDisable () |
Returns true if the installed condition Disable. | |
_FORCEINLINE bool | isNormal () |
Returns true if installed, the Normal state. | |
_FORCEINLINE bool | isSet () |
Returns true if set check button. | |
CSAD_API void * | set (unsigned _int32, void *) |
used for any interface commands. | |
CSAD_API SGElement & | setReceiver (char *path) |
CSAD_API SGElement & | setReceiver (BaseObject *obj) |
CSAD_API SGElement & | setSize (vector3f &size) |
Specifies the size of the button. | |
CSAD_API SGElement & | setStyle (char *name) |
Sets the style named. | |
CSAD_API SGElement & | setStyle (Style *style) |
Specifies the style object. | |
CSAD_API SGElement & | setText (char *text) |
Specifies the text of the button. | |
CSAD_API bool | setUseStyle (char *styleType) |
Тип стиля, может быть выбран SGStyle, SGButtonStyle, SGElementStyle. | |
CSAD_API SGElement & | setVisible (bool val) |
Sets the visibility of all the elements of a button. | |
CSAD_API void | start () |
This event is fired after the program start. | |
CSAD_API void | update () |
This event is fired before rendering environment container component. | |
Additional Inherited Members | |
Public Types inherited from csad::SGBaseElement | |
enum | State { Normal = 0x0, Active = 0x1, Click = 0x2, Disable = 0x3, SGE_Set = 0x100 , SGE_SetButton = 0x0000, SGE_SetSelect = 0x1000, SGE_SetSwitch = 0x2000, SGE_SetOpen = 0x3000, SGE_Opened = 0x10000 , SGE_Vertical = 0x00000, SGE_Horisontal = 0x80000, SGE_End = 0x100000 } |
Static Public Member Functions inherited from csad::Component | |
static CSAD_API int | regClass (const char *name, const void *info, tfSTDCALL_p_FUNC_p fun) |
SGButton - component, which is the controller buttons, defines the characteristics of the image and manages events.
To handle events keys, you must install a handler recipient using the SGButton::setReceiver. Event processing is performed in the method BaseObject::set when the parameter id==BaseObject::SELECT, and the second parameter contains a pointer to the component type SGButton. This can be any object of a class inherited from the BaseObject class or his descendants.
For description in the configuration:
<Scene name="myKeyScene"> <Transform name="name of the button" pos="0 0 0" scale="0.1 0.1 0.1"> <SGButton size="0.1 0.05 0" text="key text" style="buttonstyle"/> </Transform> </Scene>