The touch event is used only for the sleeping engine (it will be used for dimming later) and it was transferring all the json info with page name, component, entity, etc. This was replaced by a simple random integer with no meaning other than "the screen was touched, reset the timer".
149 lines
3.7 KiB
Plaintext
149 lines
3.7 KiB
Plaintext
Page confirm
|
|
Attributes
|
|
ID : 0
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID : disabled
|
|
Locked : no
|
|
Swide up page ID : disabled
|
|
Swide down page ID : disabled
|
|
Swide left page ID : disabled
|
|
Swide right page ID: disabled
|
|
|
|
Events
|
|
Preinitialize Event
|
|
dim=brightness
|
|
if(api==0)
|
|
{
|
|
page home
|
|
}else
|
|
{
|
|
printh 92
|
|
prints "nspanelevent",0
|
|
printh 00
|
|
prints "{\"page\": \"confirm\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
|
printh 00
|
|
printh FF FF FF
|
|
}
|
|
|
|
Touch Press Event
|
|
printh 91
|
|
prints "touchevent",0
|
|
printh 00
|
|
prints rand,0
|
|
printh FF FF FF
|
|
|
|
Touch Release Event
|
|
printh 91
|
|
prints "touchevent",0
|
|
printh 00
|
|
prints rand,0
|
|
printh FF FF FF
|
|
|
|
Variable (int32) page_id
|
|
Attributes
|
|
ID : 3
|
|
Scope: global
|
|
Value: 0
|
|
|
|
Variable (string) aux
|
|
Attributes
|
|
ID : 5
|
|
Scope : local
|
|
Text :
|
|
Max. Text Size: 255
|
|
|
|
Variable (string) page_name
|
|
Attributes
|
|
ID : 9
|
|
Scope : global
|
|
Text :
|
|
Max. Text Size: 12
|
|
|
|
Variable (string) component
|
|
Attributes
|
|
ID : 10
|
|
Scope : global
|
|
Text :
|
|
Max. Text Size: 10
|
|
|
|
Text t0
|
|
Attributes
|
|
ID : 1
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID : disabled
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 10
|
|
|
|
Text title
|
|
Attributes
|
|
ID : 4
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : disabled
|
|
Associated Keyboard: none
|
|
Text : Please confirm
|
|
Max. Text Size : 30
|
|
|
|
Text body
|
|
Attributes
|
|
ID : 8
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : disabled
|
|
Associated Keyboard: none
|
|
Text : Please confirm
|
|
Max. Text Size : 22
|
|
|
|
Button bclose
|
|
Attributes
|
|
ID : 2
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID: disabled
|
|
State : unpressed
|
|
Text :
|
|
Max. Text Size : 10
|
|
|
|
Events
|
|
Touch Release Event
|
|
page page_id.val
|
|
|
|
Button bt_accept
|
|
Attributes
|
|
ID : 6
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID: disabled
|
|
State : unpressed
|
|
Text :
|
|
Max. Text Size : 3
|
|
|
|
Events
|
|
Touch Release Event
|
|
aux.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+component.txt+"\"}"
|
|
printh 92
|
|
prints "localevent",0
|
|
printh 00
|
|
prints aux.txt,0
|
|
printh 00
|
|
printh FF FF FF
|
|
page page_id.val
|
|
|
|
Button bt_clear
|
|
Attributes
|
|
ID : 7
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID: disabled
|
|
State : unpressed
|
|
Text :
|
|
Max. Text Size : 10
|
|
|
|
Events
|
|
Touch Release Event
|
|
page page_id.val
|
|
|