Buttons

 

1. Object definition


Syntax

Buttons on the panel are defined using the following syntax:

B
ID [type] [stylers] [events] : [text] ;

The fields between brackets [ ] are optional.

The following table describes in details the meaning of each field.

 
Field  Lenght Description
 Values
 B  1 char
Char that define the object button  B
ID  variable Unique ID to identify the button on the Panel. This field can be a decimal digit or an upper-case character  (0,9)-(A,Z)
[type] -
Actually not used
-
 [stylers]   One or more stylers that define the graphical appearance of the button (such as, size, position, opacity, border, background, ...).
Some stylers may not take effect because meaningless for this object.
see stylers
[events]   One or more event specifiers see events
 [text]   The text that will appear on the button. All characters except semi-colon ";"

   

 

Examples


Example n. 1

Target:

Create a panel with a basic button with text "Start".




Syntax:

object: B

ID:1

type: -

stylers: -

text: Start

Message:

B1:Start;


 

Example n. 2

Target:

Create a panel with a button with text "Start".
Dimensions: 20x10;
rounded border (radius 30); image n. 1 as background; white bold text.




Syntax:

object: B

ID:1

type: -

stylers: %20,10r30g1
#FFFfb

text: Start

Message:

B1%20,10r30g1#FFFfb:
Start;


 

 

2. Object usage


 

Button pressed (Panel ---> WiFi Module ---> Controller)

When the user pushes a button on the Panel, a message is sent to the WiFi Module and, therefore, to the Controller.

The sent message has the following syntax:

Syntax:

#
B
ID P

Where the fixed character 'P' is sent for any button.

Example:

  • Notification of button (having ID=1) pressed on panel:  #B1P


Events (Panel ---> WiFi Module ---> Controller)

Read the events section to learn how to enable and manage the events for this object.