Modifiers
setForegroundColor
-
Use: To set the Foreground color of an element
-
Definition:
setForegroundColor(String id, uint32_t new_color) -
Parameters:
- String id : ID of the element as a String
- uint32_t new_color : The new color value to set ( you can use the color() function to apply RGB values directly )
-
Returns: Nothing
setBackgroundColor
-
Use: To set the Background color of an element
-
Definition:
setBackgroundColor(String id, uint32_t new_color) -
Parameters:
- String id : ID of the element as a String
- uint32_t new_color : The new color value to set ( you can use the color() function to apply RGB values directly )
-
Returns: Nothing
updatePosition
-
Use: To set the Background color of an element
-
Definition:
updatePosition(String id, long x, long y) -
Parameters:
- String id : ID of the element as a String
- long x : The new position of the element from its top-left corner along x-axis (horizontal) of the screen in
px - long y : The new position of the element from its top-left corner along y-axis (vertical) of the screen in
px
-
Returns: Nothing
void setSize(String id, long w, long h);
setSize
-
Use: To set the Size of an element
-
Definition:
setSize(String id, long w, long h) -
Parameters:
- String id : ID of the element as a String
- long w : The new width of the element in
px - long h : The new height of the element in
px
-
Returns: Nothing
setVisibility
-
Use: To set the Visibility of an element
-
Definition:
setVisibility(String id, bool visible) -
Parameters:
- String id : ID of the element as a String
- bool visible : Set this flag to
trueto show the element. Set this flag tofalseto hide the element.
-
Returns: Nothing
setOpacity
-
Use: To set the Opacity of an element
-
Definition:
setOpacity(String id, int opacity) -
Parameters:
- String id : ID of the element as a String
- int opacity : The value of opacity in percentage
(0-100)
-
Returns: Nothing
setRotation
-
Use: To set the rotation of a pre-created element in the UI
-
Definition:
setRotation(String id, float degrees) -
Parameters:
- String id : ID of the element as a String
- float degrees : Rotation angle in Degrees
-
Returns: Nothing
void setTransition(String id, int transition_type, unsigned long transition_duration, unsigned long transition_delay);
setTransition
-
Use: To set the rotation of a pre-created element in the UI
-
Definition:
setTransition(String id, int transition_type, unsigned long transition_duration, unsigned long transition_delay) -
Parameters:
- String id : ID of the element as a String
- int transition_type : The transition type to apply -
LINEAR,SOFT,SOFT_START,SOFT_END,SOFT_START_END - unsigned long transition_duration : The duration for which the transition runs in
milliseconds - unsigned long transition_delay : The delay duration after which the transition runs in
milliseconds
-
Returns: Nothing
void openExternalLink(String external_link);
openExternalLink
-
Use: To open an external link in the system browser from the UI application
-
Definition:
openExternalLink(String external_link) -
Parameters:
- String external_link : External Web link as a String
-
Returns: Nothing
removeObject
-
Use: To Remove an element from the UI
-
Definition:
removeObject(String id) -
Parameters:
- String id : ID of the element as a String
-
Returns: Nothing