Rex's plugins for Construct2
  • Home
  • Map
  • Tutorial/Templates
  • News
  • About

rex_button

Plugin, ACE table, Discussion thread
Dependence: rex_touchwrap plugin

Introduction
Get click event while "touch end".

Usage
Sample capx
"Condition:On clicked" will be triggered while touch end. Remember add rex_touchwrap plugin into project.
The diagram of click-detecting's state machine is -
图片
Click-detecting will be started while touch starting. The click-detecting will be canceled if the touch point had leaved the button sprite object. This feature is set at properties table "Click mode" to 'Released'.

Cases of enable/disable click-detecting
This behavior will enable/disable click-detecting in some cases automatically.
  • Only the top-most (z-index) button sprite will be activated the click-detecting when touching at more then 1 button sprites at the same time. This feature is the same as drag&drop.
  • The click-detecting will be disabled if button sprites is invisible or on an invisible layer. i.e. player could not click invisible buttons. This feature could be turn on/off at properties table "Visible checking" to "Yes"/"No".
  • If set "Activated after Clicked" to "No" in properties table, the click-detecting will be disabled after clicked. i.e. This button only could click once.
Activate or deactivate
Call "Action:Activate" or "Action:Deactivate" could activate or deactivate this button behavior manually.
Or call "Action:Activate in layer" to activate button if it is in the specific layer, else this button would be deactivated. TThe opposite action is "Action:Deactivate in layer" which deactivate button if it is in the specific layer, else this button would be activated.
Rolling over
"Condition:On rolling in" or "Condition:On rolling out" will be triggered if cursor is rolling in or rolling out.

Create a free web site with Weebly
  • Home
  • Map
  • Tutorial/Templates
  • News
  • About