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".
233 lines
6.5 KiB
Plaintext
233 lines
6.5 KiB
Plaintext
Page cover
|
|
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
|
|
{
|
|
coversetting.txt="{\"page\": \"cover\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+entity.txt+"\"}"
|
|
printh 92
|
|
prints "nspanelevent",0
|
|
printh 00
|
|
prints coversetting.txt,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 (string) va1
|
|
Attributes
|
|
ID : 7
|
|
Scope : local
|
|
Text : newtxt
|
|
Max. Text Size: 10
|
|
|
|
Variable (string) coversetting
|
|
Attributes
|
|
ID : 11
|
|
Scope : local
|
|
Text :
|
|
Max. Text Size: 255
|
|
|
|
Variable (string) back_page
|
|
Attributes
|
|
ID : 12
|
|
Scope : local
|
|
Text : home
|
|
Max. Text Size: 15
|
|
|
|
Variable (string) entity
|
|
Attributes
|
|
ID : 14
|
|
Scope : global
|
|
Text :
|
|
Max. Text Size: 100
|
|
|
|
Text battery_value
|
|
Attributes
|
|
ID : 1
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID : disabled
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 10
|
|
|
|
Text cover_value
|
|
Attributes
|
|
ID : 2
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID : disabled
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 10
|
|
|
|
Text page_label
|
|
Attributes
|
|
ID : 3
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID : disabled
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 25
|
|
|
|
Text icon_state
|
|
Attributes
|
|
ID : 9
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID : disabled
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 10
|
|
|
|
Text battery_icon
|
|
Attributes
|
|
ID : 10
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID : disabled
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 10
|
|
|
|
Slider coverslider
|
|
Attributes
|
|
ID : 6
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID: disabled
|
|
Position : 0
|
|
Upper range limit: 100
|
|
Lower range limit: 0
|
|
|
|
Events
|
|
Touch Release Event
|
|
covx coverslider.val,va1.txt,0,0
|
|
cover_value.txt=va1.txt+"%"
|
|
coversetting.txt="{\"page\": \"cover\", \"key\": \"position\", \"value\": "+va1.txt+", \"entity\": \""+entity.txt+"\"}"
|
|
printh 92
|
|
prints "localevent",0
|
|
printh 00
|
|
prints coversetting.txt,0
|
|
printh 00
|
|
printh FF FF FF
|
|
|
|
Button cover_open
|
|
Attributes
|
|
ID : 4
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID: disabled
|
|
State : unpressed
|
|
Text :
|
|
Max. Text Size : 3
|
|
|
|
Events
|
|
Touch Press Event
|
|
coversetting.txt="{\"page\": \"cover\", \"key\": \"open_cover\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}"
|
|
printh 92
|
|
prints "localevent",0
|
|
printh 00
|
|
prints coversetting.txt,0
|
|
printh 00
|
|
printh FF FF FF
|
|
|
|
Button cover_close
|
|
Attributes
|
|
ID : 5
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID: disabled
|
|
State : unpressed
|
|
Text :
|
|
Max. Text Size : 3
|
|
|
|
Events
|
|
Touch Press Event
|
|
coversetting.txt="{\"page\": \"cover\", \"key\": \"close_cover\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}"
|
|
printh 92
|
|
prints "localevent",0
|
|
printh 00
|
|
prints coversetting.txt,0
|
|
printh 00
|
|
printh FF FF FF
|
|
|
|
Button cover_stop
|
|
Attributes
|
|
ID : 8
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID: disabled
|
|
State : unpressed
|
|
Text :
|
|
Max. Text Size : 3
|
|
|
|
Events
|
|
Touch Press Event
|
|
coversetting.txt="{\"page\": \"cover\", \"key\": \"stop_cover\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}"
|
|
printh 92
|
|
prints "localevent",0
|
|
printh 00
|
|
prints coversetting.txt,0
|
|
printh 00
|
|
printh FF FF FF
|
|
|
|
Button button_back
|
|
Attributes
|
|
ID : 13
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID: disabled
|
|
State : unpressed
|
|
Text :
|
|
Max. Text Size : 3
|
|
|
|
Events
|
|
Touch Press Event
|
|
if(back_page.txt=="buttonpage01")
|
|
{
|
|
page buttonpage01
|
|
}else if(back_page.txt=="buttonpage02")
|
|
{
|
|
page buttonpage02
|
|
}else if(back_page.txt=="buttonpage03")
|
|
{
|
|
page buttonpage03
|
|
}else if(back_page.txt=="buttonpage04")
|
|
{
|
|
page buttonpage04
|
|
}else
|
|
{
|
|
page home
|
|
}
|
|
|