diff --git a/nspanel_blueprint.yaml b/nspanel_blueprint.yaml index 05fd9da..8e238e6 100644 --- a/nspanel_blueprint.yaml +++ b/nspanel_blueprint.yaml @@ -2331,16 +2331,10 @@ trigger_variables: {% if nspanel_entities | count > 0 %}{{ (nspanel_entities | selectattr(None, 'search', '_nextion_inited') | list | first).split('.')[1].split('_nextion_inited')[0] }} {% elif nspanel_name_temp is string %}{{ nspanel_name_temp | replace('-','_') | replace(' ','_') | replace('___','_') | replace('__','_') }} {% endif %} - last_click: "sensor.{{ nspanel_name }}_last_click" - last_click_lightsettings: "sensor.{{ nspanel_name }}_last_click_lightsettings" - last_click_coversettings: "sensor.{{ nspanel_name }}_last_click_coversettings" - last_click_climatesettings: "sensor.{{ nspanel_name }}_last_click_climatesettings" left_button: "binary_sensor.{{ nspanel_name }}_left_button" right_button: "binary_sensor.{{ nspanel_name }}_right_button" - #weather_forcast_button: "binary_sensor.{{ nspanel_name }}_weather_forcast" nextion_inited: "switch.{{ nspanel_name }}_nextion_inited" - #current_page: "sensor.{{ nspanel_name }}_current_page" - current_page: "sensor.{{ nspanel_name }}_currentpage" + nspanelevent: "sensor.{{ nspanel_name }}_nspanel_event" hotwatercharge: !input "hotwatercharge" display_target_temperature: "sensor.{{ nspanel_name }}_display_target_temperature" relay01_entity: "switch.{{ nspanel_name }}_relay_1" @@ -2367,6 +2361,9 @@ variables: notification_sound: "switch.{{ nspanel_name }}_notification_sound" confirmation_message: "switch.{{ nspanel_name }}_confirmation_message" + nspanel_event: '{{ states(nspanelevent) if nspanelevent is string and states(nspanelevent) not in ["unavailable", "unknown", None] else { "page": "unknown", "component": "unknown", "value": "unknown" } }}' + + ##### Nextion dict #### nextion: colors: @@ -2445,7 +2442,6 @@ variables: - "entitypage02" - "entitypage03" - "entitypage04" - current: "{{ states(current_page) | default('unavailable') if current_page is string else 'unavailable' }}" pics: hvac: button: @@ -3194,13 +3190,13 @@ variables: name: !input "left_button_name" color_rgb: !input "left_button_color" hold_select: !input "left_button_hold_select" - #sequence: !input left_button_hold_custom_action + #custom_action: !input "left_button_hold_custom_action" right: entity: !input "right_button_entity" name: !input "right_button_name" color_rgb: !input "right_button_color" hold_select: !input "right_button_hold_select" - #sequence: !input right_button_hold_custom_action + #custom_action: !input "right_button_hold_custom_action" qrcode_enabled: !input "qrcode_enabled" ###### SYNC SETTINGS ##### @@ -3232,469 +3228,402 @@ variables: ############################################################# trigger: - - ##### Trigger - General ################################################################################################################# - - ###### DELME - Trigger "nspanel_boot_init" ###### - - platform: state - entity_id: input_boolean.trigger_nspanel_boot - to: 'on' - id: nspanel_boot_init - - ##### Reboot - Trigger "nspanel_boot_init" ##### - - platform: template - value_template: "{{ is_state(nextion_inited, 'on') | default(false) if nextion_inited is string else false }}" - for: - seconds: 1 - id: nspanel_boot_init - - ##### settings_entity - Trigger "settings_entity" ##### - - platform: event - event_type: state_changed - event_data: - entity_id: "{{ settings_entity }}" - id: settings_entity - - ##### Automation reload - - platform: event - event_type: automation_reloaded - id: automation_reloaded - - ##### TFT Upload - Trigger "tft_upload" ##### - - platform: event - event_type: folder_watcher - event_data: - event_type: modified - path: !input "tft_path" - id: tft_upload - - ##### Time - Trigger "time_state" ##### - - platform: time_pattern - seconds: 0 - id: time_state - - #### Weather state changed ####### - - platform: event - event_type: state_changed - event_data: - entity_id: !input "weather_entity" - id: weather_state_change - - ##### HOME Value 01 - Trigger "home_value01_state" ##### - - platform: state - entity_id: !input "home_value01" - not_to: - - unknown - - unavailable - id: home_value01_state - - ##### HOME Value 01 - Trigger "home_value02_state" ##### - - platform: state - entity_id: !input "home_value02" - not_to: - - unknown - - unavailable - id: home_value02_state - - ##### HOME Value 01 - Trigger "home_value03_state" ##### - - platform: state - entity_id: !input "home_value03" - not_to: - - unknown - - unavailable - id: home_value03_state - - ##### Climate - Trigger "climate_state" ##### - - platform: event - event_type: state_changed - event_data: - entity_id: !input "climate" - id: climate_state - - ##### Hot Water - Trigger "hotwatertemp_state" ##### - - platform: event - event_type: state_changed - event_data: - entity_id: !input "hotwatertemp" - id: hotwatertemp_state - - ##### Outdoor Temp - Trigger "outdoortemp_state" ##### - - platform: event - event_type: state_changed - event_data: - entity_id: !input "outdoortemp" - id: outdoortemp_state - - ##### indoor Temp Sensor - Trigger "indoortemp_state" ##### - - platform: event - event_type: state_changed - event_data: - entity_id: !input "indoortemp" - id: indoortemp_state - - ##### NSPAnel Temp Sensor - Trigger "nspaneltemp_state" ##### - - platform: event - event_type: state_changed - event_data: - entity_id: "{{ nspaneltemp }}" - id: nspaneltemp_state - - ##### Hot Water Charge - Trigger "hotwatercharge_state" ##### - - platform: event - event_type: state_changed - event_data: - entity_id: !input "hotwatercharge" - id: hotwatercharge_state - - ##### Chip 01 - Trigger "chip01_state" ##### - - platform: event - event_type: state_changed - event_data: - entity_id: !input "chip01" - id: chip01_state - - ##### Chip 02 - Trigger "chip02_state" ##### - - platform: event - event_type: state_changed - event_data: - entity_id: !input "chip02" - id: chip02_state - - ##### Chip 03 - Trigger "chip03_state" ##### - - platform: event - event_type: state_changed - event_data: - entity_id: !input "chip03" - id: chip03_state - - ##### Chip 04 - Trigger "chip04_state" ##### - - platform: event - event_type: state_changed - event_data: - entity_id: !input "chip04" - id: chip04_state - - ##### Chip 05 - Trigger "chip05_state" ##### - - platform: event - event_type: state_changed - event_data: - entity_id: !input "chip05" - id: chip05_state - - ##### Chip 06 - Trigger "chip06_state" ##### - - platform: event - event_type: state_changed - event_data: - entity_id: !input "chip06" - id: chip06_state - - ##### Chip 07 - Trigger "chip07_state" ##### - - platform: event - event_type: state_changed - event_data: - entity_id: !input "chip07" - id: chip07_state - - ##### Relay01 - Trigger "relay01_state" ##### - - platform: event - event_type: state_changed - event_data: - entity_id: "{{ relay01_entity }}" - id: relay01_state - - ##### Relay02 - Trigger "relay02_state" ##### - - platform: event - event_type: state_changed - event_data: - entity_id: "{{ relay02_entity }}" - id: relay02_state - - ##### Left Button - Trigger "left_button_press" ##### - - platform: template - value_template: "{{ is_state(left_button, 'on') | default(false) if left_button is string else false }}" - id: left_button_press - - ##### Right Button - Trigger "right_button_press" ##### - - platform: template - value_template: "{{ is_state(right_button, 'on') | default(false) if right_button is string else false }}" - id: right_button_press - - ##### Left Button - State "left_button_state" ##### - - platform: state - entity_id: !input "left_button_entity" - to: - - 'on' - - 'off' - id: left_button_state - - ##### Right Button - State "right_button_state" ##### - - platform: state - entity_id: !input "right_button_entity" - to: - - 'on' - - 'off' - id: right_button_state - - ##### Notification Text - Trigger "notification_text_state" ##### - - platform: event - event_type: state_changed - event_data: - entity_id: "{{ notification_text }}" - id: notification_text_state - - ##### Notification Text - Trigger "notification_text_state" ##### - - platform: event - event_type: state_changed - event_data: - entity_id: "{{ notification_unread }}" - id: notification_unread_state - - #### Show notification - Trigger #### - - platform: template - value_template: "{{ is_state(last_click, 'homebutton04release') | default(false) if last_click is string else false }}" - id: open_notification_page - - #### Notification clear - Trigger #### - - platform: template - value_template: "{{ (states(last_click) | default('unavailable') is match 'notificationclearrelease') if last_click is string else false }}" - id: btn_notificationclearrelease - - #### Notification accept - Trigger #### - - platform: template - value_template: "{{ (states(last_click) | default('unavailable') is match 'notificationacceptrelease') if last_click is string else false }}" - id: btn_notificationacceptrelease - - #### Show QR code - Trigger #### - - platform: template - value_template: "{{ (states(last_click) | default('unavailable') is match 'homebutton05release') if last_click is string else false }}" - id: open_qrcode_page - - #### Show ENTITIES - Trigger #### - - platform: template - value_template: "{{ (states(last_click) | default('unavailable') is match 'homebutton06release') if last_click is string else false }}" - id: open_entity_page - - #### Show Climate - Trigger #### - - platform: template - value_template: "{{ (states(last_click) | default('unavailable') is match 'weatherpagerelease') if last_click is string else false }}" - id: open_weather_page - - #### Climate - Trigger #### - - platform: template - value_template: "{{ (states(last_click) | default('unavailable') is match 'climaterelease') if last_click is string else false }}" - id: open_climate_page - - ##### Trigger - Button General ################################################################################################################# - - ##### Page Button - Trigger "short_press" - SHORT Press via "last_click" ##### - - platform: template - value_template: "{{ (states(last_click) | default('unavailable') is match 'releasebutton') if last_click is string else false }}" - id: short_press - - ##### Page Button - Trigger "long_press" - LONG Press via "last_click" - Button LONG Press for jump to Lightsetting or Coversetting Page ##### - - platform: template - value_template: "{{ (states(last_click) | default('unavailable') is match 'press') if last_click is string else false }}" - for: - seconds: 1 - id: long_press - - ##### Page Lightsettings - Trigger "light_settings" - Changes Lightsettings Page via "last_click_lightsettings" ##### - - platform: event - event_type: state_changed - event_data: - entity_id: "{{ last_click_lightsettings }}" - id: light_settings - - ##### Page Coversettings - Trigger "cover_settings" - Changes Coversettings Page via "last_click_coversettings" ##### - - platform: event - event_type: state_changed - event_data: - entity_id: "{{ last_click_coversettings }}" - id: cover_settings - - ##### Page Climatesettings - Trigger "climate_settings" - Changes Climatesettings Page via "last_click_climatesettings" ##### - - platform: event - event_type: state_changed - event_data: - entity_id: "{{ last_click_climatesettings }}" - id: climate_settings - - ##### Current page changed ##### - - platform: event - event_type: state_changed - event_data: - entity_id: "{{ current_page }}" - id: current_page_changed - - ##### Page Button - Trigger "button_page" Entity sync ##### - - platform: template - value_template: "{{ (states(last_click) | default('unavailable') is match 'button') if last_click is string else false }}" - id: button_page - - - - ##### Trigger - Button State change ################################################################################################################# - - ##### Button01 Sync - Trigger "current_state_entity01" ##### - - platform: state - entity_id: !input "entity01" - id: current_state_entity01 - - ##### Button02 Sync - Trigger "current_state_entity02" ##### - - platform: state - entity_id: !input "entity02" - id: current_state_entity02 - - ##### Button03 Sync - Trigger "current_state_entity03" ##### - - platform: state - entity_id: !input "entity03" - id: current_state_entity03 - - ##### Button04 Sync - Trigger "current_state_entity04" ##### - - platform: state - entity_id: !input "entity04" - id: current_state_entity04 - - ##### Button05 Sync - Trigger "current_state_entity05" ##### - - platform: state - entity_id: !input "entity05" - id: current_state_entity05 - - ##### Button06 Sync - Trigger "current_state_entity06" ##### - - platform: state - entity_id: !input "entity06" - id: current_state_entity06 - - ##### Button07 Sync - Trigger "current_state_entity07" ##### - - platform: state - entity_id: !input "entity07" - id: current_state_entity07 - - ##### Button08 Sync - Trigger "current_state_entity08" ##### - - platform: state - entity_id: !input "entity08" - id: current_state_entity08 - - ##### Button09 Sync - Trigger "current_state_entity09" ##### - - platform: state - entity_id: !input "entity09" - id: current_state_entity09 - - ##### Button10 Sync - Trigger "current_state_entity10" ##### - - platform: state - entity_id: !input "entity10" - id: current_state_entity10 - - ##### Button11 Sync - Trigger "current_state_entity11" ##### - - platform: state - entity_id: !input "entity11" - id: current_state_entity11 - - ##### Button12 Sync - Trigger "current_state_entity12" ##### - - platform: state - entity_id: !input "entity12" - id: current_state_entity12 - - ##### Button13 Sync - Trigger "current_state_entity13" ##### - - platform: state - entity_id: !input "entity13" - id: current_state_entity13 - - ##### Button14 Sync - Trigger "current_state_entity14" ##### - - platform: state - entity_id: !input "entity14" - id: current_state_entity14 - - ##### Button15 Sync - Trigger "current_state_entity15" ##### - - platform: state - entity_id: !input "entity15" - id: current_state_entity15 - - ##### Button16 Sync - Trigger "current_state_entity16" ##### - - platform: state - entity_id: !input "entity16" - id: current_state_entity16 - - ##### Button17 Sync - Trigger "current_state_entity17" ##### - - platform: state - entity_id: !input "entity17" - id: current_state_entity17 - - ##### Button18 Sync - Trigger "current_state_entity18" ##### - - platform: state - entity_id: !input "entity18" - id: current_state_entity18 - - ##### Button19 Sync - Trigger "current_state_entity19" ##### - - platform: state - entity_id: !input "entity19" - id: current_state_entity19 - - ##### Button20 Sync - Trigger "current_state_entity20" ##### - - platform: state - entity_id: !input "entity20" - id: current_state_entity20 - - ##### Button21 Sync - Trigger "current_state_entity21" ##### - - platform: state - entity_id: !input "entity21" - id: current_state_entity21 - - ##### Button22 Sync - Trigger "current_state_entity22" ##### - - platform: state - entity_id: !input "entity22" - id: current_state_entity22 - - ##### Button23 Sync - Trigger "current_state_entity23" ##### - - platform: state - entity_id: !input "entity23" - id: current_state_entity23 - - ##### Button24 Sync - Trigger "current_state_entity24" ##### - - platform: state - entity_id: !input "entity24" - id: current_state_entity24 - - ##### Button25 Sync - Trigger "current_state_entity25" ##### - - platform: state - entity_id: !input "entity25" - id: current_state_entity25 - - ##### Button26 Sync - Trigger "current_state_entity26" ##### - - platform: state - entity_id: !input "entity26" - id: current_state_entity26 - - ##### Button27 Sync - Trigger "current_state_entity27" ##### - - platform: state - entity_id: !input "entity27" - id: current_state_entity27 - - ##### Button28 Sync - Trigger "current_state_entity28" ##### - - platform: state - entity_id: !input "entity28" - id: current_state_entity28 - - ##### Button29 Sync - Trigger "current_state_entity29" ##### - - platform: state - entity_id: !input "entity29" - id: current_state_entity29 - - ##### Button30 Sync - Trigger "current_state_entity30" ##### - - platform: state - entity_id: !input "entity30" - id: current_state_entity30 - - ##### Button31 Sync - Trigger "current_state_entity31" ##### - - platform: state - entity_id: !input "entity31" - id: current_state_entity31 - - ##### Button32 Sync - Trigger "current_state_entity32" ##### - - platform: state - entity_id: !input "entity32" - id: current_state_entity32 - + + ##### Trigger - General ################################################################################################################# + ##### settings_entity - Trigger "settings_entity" ##### + - platform: event + event_type: state_changed + event_data: + entity_id: "{{ settings_entity }}" + id: settings_entity + + ##### Reboot - Trigger "nspanel_boot_init" ##### + - platform: template + value_template: "{{ is_state(nextion_inited, 'on') | default(false) if nextion_inited is string else false }}" + for: + seconds: 1 + id: nspanel_boot_init + + ##### NSPanel event changed ##### + - platform: event + event_type: state_changed + event_data: + entity_id: "{{ nspanelevent }}" + id: nspanelevent_changed + + ##### Automation reload + - platform: event + event_type: automation_reloaded + id: automation_reloaded + + ##### Trigger - Buttons - State change ################################################################################################################# + ##### Button01 Sync - Trigger "current_state_entity01" ##### + - platform: state + entity_id: !input "entity01" + id: current_state_entity01 + + ##### Button02 Sync - Trigger "current_state_entity02" ##### + - platform: state + entity_id: !input "entity02" + id: current_state_entity02 + + ##### Button03 Sync - Trigger "current_state_entity03" ##### + - platform: state + entity_id: !input "entity03" + id: current_state_entity03 + + ##### Button04 Sync - Trigger "current_state_entity04" ##### + - platform: state + entity_id: !input "entity04" + id: current_state_entity04 + + ##### Button05 Sync - Trigger "current_state_entity05" ##### + - platform: state + entity_id: !input "entity05" + id: current_state_entity05 + + ##### Button06 Sync - Trigger "current_state_entity06" ##### + - platform: state + entity_id: !input "entity06" + id: current_state_entity06 + + ##### Button07 Sync - Trigger "current_state_entity07" ##### + - platform: state + entity_id: !input "entity07" + id: current_state_entity07 + + ##### Button08 Sync - Trigger "current_state_entity08" ##### + - platform: state + entity_id: !input "entity08" + id: current_state_entity08 + + ##### Button09 Sync - Trigger "current_state_entity09" ##### + - platform: state + entity_id: !input "entity09" + id: current_state_entity09 + + ##### Button10 Sync - Trigger "current_state_entity10" ##### + - platform: state + entity_id: !input "entity10" + id: current_state_entity10 + + ##### Button11 Sync - Trigger "current_state_entity11" ##### + - platform: state + entity_id: !input "entity11" + id: current_state_entity11 + + ##### Button12 Sync - Trigger "current_state_entity12" ##### + - platform: state + entity_id: !input "entity12" + id: current_state_entity12 + + ##### Button13 Sync - Trigger "current_state_entity13" ##### + - platform: state + entity_id: !input "entity13" + id: current_state_entity13 + + ##### Button14 Sync - Trigger "current_state_entity14" ##### + - platform: state + entity_id: !input "entity14" + id: current_state_entity14 + + ##### Button15 Sync - Trigger "current_state_entity15" ##### + - platform: state + entity_id: !input "entity15" + id: current_state_entity15 + + ##### Button16 Sync - Trigger "current_state_entity16" ##### + - platform: state + entity_id: !input "entity16" + id: current_state_entity16 + + ##### Button17 Sync - Trigger "current_state_entity17" ##### + - platform: state + entity_id: !input "entity17" + id: current_state_entity17 + + ##### Button18 Sync - Trigger "current_state_entity18" ##### + - platform: state + entity_id: !input "entity18" + id: current_state_entity18 + + ##### Button19 Sync - Trigger "current_state_entity19" ##### + - platform: state + entity_id: !input "entity19" + id: current_state_entity19 + + ##### Button20 Sync - Trigger "current_state_entity20" ##### + - platform: state + entity_id: !input "entity20" + id: current_state_entity20 + + ##### Button21 Sync - Trigger "current_state_entity21" ##### + - platform: state + entity_id: !input "entity21" + id: current_state_entity21 + + ##### Button22 Sync - Trigger "current_state_entity22" ##### + - platform: state + entity_id: !input "entity22" + id: current_state_entity22 + + ##### Button23 Sync - Trigger "current_state_entity23" ##### + - platform: state + entity_id: !input "entity23" + id: current_state_entity23 + + ##### Button24 Sync - Trigger "current_state_entity24" ##### + - platform: state + entity_id: !input "entity24" + id: current_state_entity24 + + ##### Button25 Sync - Trigger "current_state_entity25" ##### + - platform: state + entity_id: !input "entity25" + id: current_state_entity25 + + ##### Button26 Sync - Trigger "current_state_entity26" ##### + - platform: state + entity_id: !input "entity26" + id: current_state_entity26 + + ##### Button27 Sync - Trigger "current_state_entity27" ##### + - platform: state + entity_id: !input "entity27" + id: current_state_entity27 + + ##### Button28 Sync - Trigger "current_state_entity28" ##### + - platform: state + entity_id: !input "entity28" + id: current_state_entity28 + + ##### Button29 Sync - Trigger "current_state_entity29" ##### + - platform: state + entity_id: !input "entity29" + id: current_state_entity29 + + ##### Button30 Sync - Trigger "current_state_entity30" ##### + - platform: state + entity_id: !input "entity30" + id: current_state_entity30 + + ##### Button31 Sync - Trigger "current_state_entity31" ##### + - platform: state + entity_id: !input "entity31" + id: current_state_entity31 + + ##### Button32 Sync - Trigger "current_state_entity32" ##### + - platform: state + entity_id: !input "entity32" + id: current_state_entity32 + + ##### Trigger - Home - Chips - State change ################################################################################################################# + ##### Chip 01 - Trigger "chip01_state" ##### + - platform: event + event_type: state_changed + event_data: + entity_id: !input "chip01" + id: chip01_state + + ##### Chip 02 - Trigger "chip02_state" ##### + - platform: event + event_type: state_changed + event_data: + entity_id: !input "chip02" + id: chip02_state + + ##### Chip 03 - Trigger "chip03_state" ##### + - platform: event + event_type: state_changed + event_data: + entity_id: !input "chip03" + id: chip03_state + + ##### Chip 04 - Trigger "chip04_state" ##### + - platform: event + event_type: state_changed + event_data: + entity_id: !input "chip04" + id: chip04_state + + ##### Chip 05 - Trigger "chip05_state" ##### + - platform: event + event_type: state_changed + event_data: + entity_id: !input "chip05" + id: chip05_state + + ##### Chip 06 - Trigger "chip06_state" ##### + - platform: event + event_type: state_changed + event_data: + entity_id: !input "chip06" + id: chip06_state + + ##### Chip 07 - Trigger "chip07_state" ##### + - platform: event + event_type: state_changed + event_data: + entity_id: !input "chip07" + id: chip07_state + + ##### Trigger - Home - Values - State change ################################################################################################################# + + ##### HOME Value 01 - Trigger "home_value01_state" ##### + - platform: state + entity_id: !input "home_value01" + not_to: + - unknown + - unavailable + id: home_value01_state + + ##### HOME Value 02 - Trigger "home_value02_state" ##### + - platform: state + entity_id: !input "home_value02" + not_to: + - unknown + - unavailable + id: home_value02_state + + ##### HOME Value 03 - Trigger "home_value03_state" ##### + - platform: state + entity_id: !input "home_value03" + not_to: + - unknown + - unavailable + id: home_value03_state + + ##### Trigger - Relays - State change ################################################################################################################# + + ##### Relay01 - Trigger "relay01_state" ##### + - platform: event + event_type: state_changed + event_data: + entity_id: "{{ relay01_entity }}" + id: relay01_state + + ##### Relay02 - Trigger "relay02_state" ##### + - platform: event + event_type: state_changed + event_data: + entity_id: "{{ relay02_entity }}" + id: relay02_state + + ##### Trigger - Climate - State change ################################################################################################################# + ##### Climate - Trigger "climate_state" ##### + - platform: event + event_type: state_changed + event_data: + entity_id: !input "climate" + id: climate_state + + ##### Trigger - Notifications ################################################################################################################# + + ##### Notification Text - Trigger "notification_text_state" ##### + - platform: event + event_type: state_changed + event_data: + entity_id: "{{ notification_text }}" + id: notification_text_state + + ##### Notification Text - Trigger "notification_text_state" ##### + - platform: event + event_type: state_changed + event_data: + entity_id: "{{ notification_unread }}" + id: notification_unread_state + + ##### Trigger - Hardware buttons ################################################################################################################# + + ##### Left Button - Trigger "left_button_press" ##### + - platform: template + value_template: "{{ is_state(left_button, 'on') | default(false) if left_button is string else false }}" + id: left_button_press + + ##### Right Button - Trigger "right_button_press" ##### + - platform: template + value_template: "{{ is_state(right_button, 'on') | default(false) if right_button is string else false }}" + id: right_button_press + + ##### Left Button - State "left_button_state" ##### + - platform: state + entity_id: !input "left_button_entity" + to: + - 'on' + - 'off' + id: left_button_state + + ##### Right Button - State "right_button_state" ##### + - platform: state + entity_id: !input "right_button_entity" + to: + - 'on' + - 'off' + id: right_button_state + + ##### Trigger - Time ################################################################################################################# + + ##### Time - Trigger "time_state" ##### + - platform: time_pattern + seconds: 0 + id: time_state + + ##### Trigger - Temperatures ################################################################################################################# + + ##### Outdoor Temp - Trigger "outdoortemp_state" ##### + - platform: event + event_type: state_changed + event_data: + entity_id: !input "outdoortemp" + id: outdoortemp_state + + ##### indoor Temp Sensor - Trigger "indoortemp_state" ##### + - platform: event + event_type: state_changed + event_data: + entity_id: !input "indoortemp" + id: indoortemp_state + + ##### NSPAnel Temp Sensor - Trigger "nspaneltemp_state" ##### + - platform: event + event_type: state_changed + event_data: + entity_id: "{{ nspaneltemp }}" + id: nspaneltemp_state + + ##### Trigger - Weather ################################################################################################################# + #### Weather state changed ####### + - platform: event + event_type: state_changed + event_data: + entity_id: !input "weather_entity" + id: weather_state_change + + ##### Trigger - Hot water ################################################################################################################# + + ##### Hot Water Charge - Trigger "hotwatercharge_state" ##### + - platform: event + event_type: state_changed + event_data: + entity_id: !input "hotwatercharge" + id: hotwatercharge_state + + ##### Hot Water - Trigger "hotwatertemp_state" ##### + - platform: event + event_type: state_changed + event_data: + entity_id: !input "hotwatertemp" + id: hotwatertemp_state + + ##### Trigger - TFT ################################################################################################################# + + ##### TFT Upload - Trigger "tft_upload" ##### + - platform: event + event_type: folder_watcher + event_data: + event_type: modified + path: !input "tft_path" + id: tft_upload ############################################################# ##### CLOSE - Trigger ##### @@ -3706,7 +3635,6 @@ condition: "{{ is_state(nextion_inited, 'on') | default(false) if nextion_inited ##### START - Action ##### ############################################################# action: - # main - alias: "choose alias (name)" - alias: Main choices choose: ##### JUMP TO - settings page lightsettings /coversettings / climate (SETTINGS ENTITY CHANGED) ##### @@ -3718,21 +3646,14 @@ action: sequence: - &variables-settings_entity variables: - settings_entity_value: "{{ states(settings_entity) | default('unavailable') if settings_entity is string else 'unavailable' }}" - settings_entity_split: "{{ settings_entity_value.split(',') if settings_entity_value is string and settings_entity_value not in ['unavailable', 'unknown', None] else [] }}" - settings_entity_count: "{{ settings_entity_split | count if settings_entity_split else 0 }}" - entity_long: "{{ settings_entity_split[0] if settings_entity_count >= 1 else 'unknown' }}" - entity_back: "{{ settings_entity_split[1] if settings_entity_count >= 2 else 'unknown' }}" - entity_long_name: "{{ settings_entity_split[2] if settings_entity_count >= 3 else 'unknown' }}" - entity_long_icon: "{{ settings_entity_split[3] if settings_entity_count >= 4 else 'unknown' }}" - entity_long_icon_color: "{{ settings_entity_split[4] if settings_entity_count >= 5 else 'unknown' }}" - - variables: - entity_long_domain: "{{ entity_long.split('.')[0] if entity_long.split('.') | count > 0 else 'unknown' }}" - - if: "{{ entity_long_domain in ['light', 'cover', 'climate'] }}" + settings_entity_state: "{{ states(settings_entity) if settings_entity is string else 'unknown' }}" + settings_entity_dict: '{{ settings_entity_state if settings_entity_state is mapping else { "page": "home", "entity": "unknown" } }}' + settings_entity_domain: "{{ settings_entity_dict.entity.split('.')[0] if settings_entity_dict.entity is defined and settings_entity_dict.entity is string and settings_entity_dict.entity.split('.') | count > 0 else 'unknown' }}" + - if: "{{ settings_entity_domain in ['light', 'cover', 'climate'] }}" then: - service: "{{ nextion.commands.printf }}" data: - cmd: "page {{ nextion.pages[entity_long_domain] }}" + cmd: "page {{ nextion.pages[settings_entity_domain] }}" continue_on_error: true ##### BOOT NSPANEL - boot init ##### @@ -3740,7 +3661,7 @@ action: conditions: - condition: trigger id: nspanel_boot_init - - "{{ nextion.pages.current != nextion.pages.home or (is_state(last_click, ['unavailable', 'unknown', None]) | default(False) if last_click is string else False) }}" + - "{{ nspanel_event.page != nextion.pages.home or (is_state(settings_entity, ['unavailable', 'unknown', None]) | default(False) if settings_entity is string else False) }}" sequence: ##### NSPanel boot init only ##### - delay: @@ -3785,1371 +3706,1807 @@ action: cmd: page home continue_on_error: true - ##### PAGE CHANGED - changes when page changed ##### - - alias: Page changed + ##### NSPanel event ##### + - alias: NSPanel Event conditions: - condition: trigger - id: current_page_changed + id: nspanelevent_changed sequence: - ##### climate-page left - apply climate temperature if climate_optimistic ##### ## TODO - remove from here - - if: "{{ trigger.event.data.old_state.state == nextion.pages.climate and climate_optimistic }}" - then: - - variables: - display_target_temperature_state: "{{ states(display_target_temperature) | default('unavailable') if display_target_temperature is string else 'unavailable' }}" - - if: "{{ is_number(display_target_temperature_state) }}" - then: - - *variables-settings_entity - - service: climate.set_temperature - data: - entity_id: "{{ entity_long }}" - #hvac_mode: 'heat' - temperature: "{{ display_target_temperature_state }}" - continue_on_error: true - - choose: - ## PAGE HOME ## - - alias: Home page - conditions: "{{ trigger.event.data.new_state.state == nextion.pages.home }}" - sequence: &refresh_page_home - - service: "{{ nextion.commands.set_settings_entity }}" - data: - entity: 'unknown' - continue_on_error: true - ##### NSPanel Date ##### - ### DATE Font Color ### - - *delay-default - - service: "{{ nextion.commands.font_color }}" - data: - component: home.date - message: "{{ page_home.general.date.label.color_rgb if is_number(page_home.general.date.label.color_rgb) else ((page_home.general.date.label.color_rgb[0] //(2**3)) *(2**11))+((page_home.general.date.label.color_rgb[1] //(2**2)) *(2**5))+(page_home.general.date.label.color_rgb[2] //(2**3)) }}" - continue_on_error: true - ### DATE Font ### - - *delay-default - - service: "{{ nextion.commands.text_printf }}" - data: - component: home.date - message: "{{ (dict.values(mui[language].weekdays) | list)[now().weekday()] ~ ', ' ~ as_timestamp(now()) | timestamp_custom(date_format) }}" - continue_on_error: true - ##### NSPanel Time ##### - ### TIME Font Color ### - - *delay-default - - service: "{{ nextion.commands.font_color }}" - data: - component: home.time - message: "{{ page_home.general.time.label.color_rgb if is_number(page_home.general.time.label.color_rgb) else ((page_home.general.time.label.color_rgb[0] //(2**3)) *(2**11))+((page_home.general.time.label.color_rgb[1] //(2**2)) *(2**5))+(page_home.general.time.label.color_rgb[2] //(2**3)) }}" - continue_on_error: true - ### TIME Font ### - - *delay-default - - service: "{{ nextion.commands.text_printf }}" - data: - component: home.time - message: "{{ time }}" - continue_on_error: true - - if: "{{ meridiem }}" - then: - ### TIME Meridiem Font Color ### - - *delay-default - - service: "{{ nextion.commands.font_color }}" - data: - component: home.meridiem - message: "{{ page_home.general.time.label.color_rgb if is_number(page_home.general.time.label.color_rgb) else ((page_home.general.time.label.color_rgb[0] //(2**3)) *(2**11))+((page_home.general.time.label.color_rgb[1] //(2**2)) *(2**5))+(page_home.general.time.label.color_rgb[2] //(2**3)) }}" - continue_on_error: true - ### TIME Meridiem Font ### - - *delay-default - - service: "{{ nextion.commands.text_printf }}" - data: - component: home.meridiem - message: "{{ meridiem }}" - continue_on_error: true - - ##### NSPanel Outdoor Temp ##### - - variables: - outdoor_temp_state: "{{ states(outdoortemp) | default('unavailable') if outdoortemp is string else 'unavailable' }}" - outdoor_temp: "{{ outdoor_temp_state if is_number(outdoor_temp_state) else state_attr(weather_entity, 'temperature') | default('unavailable') if weather_entity is string else 'unavailable' }}" - - if: "{{ is_number(outdoor_temp) }}" - then: - ### LABEL Outdoor Temp Font Color ### - - *delay-default - - service: "{{ nextion.commands.font_color }}" - data: - component: home.outdoor_temp - message: "{{ page_home.general.outdoor_temp.label.color_rgb if is_number(page_home.general.outdoor_temp.label.color_rgb) else ((page_home.general.outdoor_temp.label.color_rgb[0] //(2**3)) *(2**11))+((page_home.general.outdoor_temp.label.color_rgb[1] //(2**2)) *(2**5))+(page_home.general.outdoor_temp.label.color_rgb[2] //(2**3)) }}" - continue_on_error: true - ### LABEL Outdoor Temp Font ### - - *delay-default - - service: "{{ nextion.commands.text_printf }}" - data: - component: home.outdoor_temp - message: "{{ outdoor_temp | round(1) ~ temperature_units }}" - continue_on_error: true - - ##### NSPanel Indoor Temp ##### - - variables: - indoor_temp_state: "{{ states(indoortemp) | default('unavailable') if indoortemp is string else 'unavailable' }}" - - if: "{{ is_number(indoor_temp_state) }}" - then: - ### ICON Indoor Temp Font Color ### - - *delay-default - - service: "{{ nextion.commands.font_color }}" - data: - component: home.indoortempicon - message: "{{ page_home.general.indoor_temp.icon.color_rgb if is_number(page_home.general.indoor_temp.icon.color_rgb) else ((page_home.general.indoor_temp.icon.color_rgb[0] //(2**3)) *(2**11))+((page_home.general.indoor_temp.icon.color_rgb[1] //(2**2)) *(2**5))+(page_home.general.indoor_temp.icon.color_rgb[2] //(2**3)) }}" - continue_on_error: true - ### ICON Indoor Temp Font ### - - *delay-default - - service: "{{ nextion.commands.text_printf }}" - data: - component: home.indoortempicon - message: "{{ nextion.icons.all[page_home.general.indoor_temp.icon.icon.split(':')[1]] | default(page_home.general.indoor_temp.icon.icon if page_home.general.indoor_temp.icon.icon is string else '\U0000E2D5') }}" - continue_on_error: true - ### LABEL Indoor Temp Font Color ### - - *delay-default - - service: "{{ nextion.commands.font_color }}" - data: - component: home.current_temp - message: "{{ page_home.general.indoor_temp.label.color_rgb if is_number(page_home.general.indoor_temp.label.color_rgb) else ((page_home.general.indoor_temp.label.color_rgb[0] //(2**3)) *(2**11))+((page_home.general.indoor_temp.label.color_rgb[1] //(2**2)) *(2**5))+(page_home.general.indoor_temp.label.color_rgb[2] //(2**3)) }}" - continue_on_error: true - ### LABEL Indoor Temp Font ### - - *delay-default - - service: "{{ nextion.commands.text_printf }}" - data: - component: home.current_temp - message: "{{ (indoor_temp_state | round(1) ~ temperature_units) if is_number(indoor_temp_state) else (mui[language].unavailable if indoor_temp_state in ['unavailable', 'unknown', None] else indoor_temp_state) }}" - continue_on_error: true - - ##### Weather Icon Home Page ##### - - *delay-default - - service: "{{ nextion.commands.printf }}" - data: - cmd: home.weather.pic={{ nextion.pics.weather[states(weather_entity) | default('unavailable') if weather_entity is string else 'unavailable'] | default(None) }} - continue_on_error: true - - ##### NSPanel Buttons ##### - - variables: - left_button_state: "{{ states(page_home.hardware.buttons.left.entity) | default('unavailable') if page_home.hardware.buttons.left.entity is string else 'unavailable' }}" - right_button_state: "{{ states(page_home.hardware.buttons.right.entity) | default('unavailable') if page_home.hardware.buttons.right.entity is string else 'unavailable' }}" - - ##### NSPanel Left Button Name ##### - - if: "{{ page_home.hardware.buttons.left.name | length > 0 }}" - then: - ### LABEL Font Color ### - - *delay-default - - service: "{{ nextion.commands.font_color }}" - data: - component: home.left_bt_text - message: "{{ page_home.hardware.buttons.left.color_rgb if is_number(page_home.hardware.buttons.left.color_rgb) else ((page_home.hardware.buttons.left.color_rgb[0] //(2**3)) *(2**11))+((page_home.hardware.buttons.left.color_rgb[1] //(2**2)) *(2**5))+(page_home.hardware.buttons.left.color_rgb[2] //(2**3)) }}" - continue_on_error: true - ### LABEL Font ### - - *delay-default - - service: "{{ nextion.commands.text_printf }}" - data: - component: home.left_bt_text - message: "{{ page_home.hardware.buttons.left.name }}" - continue_on_error: true - - ##### SET Left Hardware Button PIC on Home Page #### - - if: "{{ left_button_state not in ['unavailable', 'unknown', None] }}" + - alias: NSPanel Event component changed + choose: + - alias: Page changed + conditions: '{{ nspanel_event.component == "currentpage" }}' + sequence: + - alias: old state + variables: + old_state: "{{ trigger.event.data.old_state.state }}" + ##### climate-page left - apply climate temperature if climate_optimistic ##### ## TODO - remove from here + - if: "{{ old_state.page == nextion.pages.climate and climate_optimistic }}" then: - variables: - # Hardware Button PIC - left_hardware_button_state: "{{ nextion.pics.hardware.button[left_button_state] | default(None) }}" - - *delay-default - - service: "{{ nextion.commands.printf }}" - data: - cmd: home.left_bt_pic.pic={{ left_hardware_button_state }} - continue_on_error: true - - ##### NSPanel Right Button Name ##### - - if: "{{ page_home.hardware.buttons.right.name | length > 0 }}" - then: - ### LABEL Font Color ### - - *delay-default - - service: "{{ nextion.commands.font_color }}" - data: - component: home.right_bt_text - message: "{{ page_home.hardware.buttons.right.color_rgb if is_number(page_home.hardware.buttons.right.color_rgb) else ((page_home.hardware.buttons.right.color_rgb[0] //(2**3)) *(2**11))+((page_home.hardware.buttons.right.color_rgb[1] //(2**2)) *(2**5))+(page_home.hardware.buttons.right.color_rgb[2] //(2**3)) }}" - continue_on_error: true - ### LABEL Font ### - - *delay-default - - service: "{{ nextion.commands.text_printf }}" - data: - component: home.right_bt_text - message: "{{ page_home.hardware.buttons.right.name }}" - continue_on_error: true - - ##### SET Right Hardware Button PIC on Home Page ##### - - if: "{{ right_button_state not in ['unavailable', 'unknown', None] }}" - then: - - variables: - # Hardware Button PIC - right_hardware_button_state: "{{ nextion.pics.hardware.button[right_button_state] | default(None) }}" - - *delay-default - - service: "{{ nextion.commands.printf }}" - data: - cmd: home.right_bt_pic.pic={{ right_hardware_button_state }} - continue_on_error: true - - ###### Status bar ###### - - &variables-home_page_status_bar - variables: - thermostat_icon: !input "thermostat_icon" #E50E - heat_icon: !input "heat_icon" #\U0000E50F - climate_state: "{{ states(climate) | default('unavailable') if climate is string else 'unavailable' }}" - climate_action: "{{ state_attr(climate, 'hvac_action') | default('unavailable') if climate is string else 'unavailable' }}" - home_page_status_bar: - - entity: "{{ relay01_entity }}" - icon: !input "relay01_icon" #E3A5 - icon_color_rgb: !input "relay01_icon_color" - component: home.icon_top_01 - - entity: "{{ relay02_entity }}" - icon: !input "relay02_icon" #E3A8 - icon_color_rgb: !input "relay02_icon_color" - component: home.icon_top_02 - - entity: "{{ climate }}" - icon: "{{ (nextion.icons.all[heat_icon.split(':')[1]] | default(heat_icon if heat_icon is string else '\U0000E2D5') if climate_action == 'heating' else nextion.icons.all[thermostat_icon.split(':')[1]] | default(thermostat_icon if thermostat_icon is string else '\U0000E2D5')) if climate_state == 'heat' else nextion.icons.blank }}" - icon_color_rgb: !input "thermostat_icon_color" - component: home.icon_top_03 - - entity: !input "chip01" - icon: !input "chip01_icon" - icon_color_rgb: !input "chip01_icon_color" - component: home.icon_top_04 - - entity: !input "chip02" - icon: !input "chip02_icon" - icon_color_rgb: !input "chip02_icon_color" - component: home.icon_top_05 - - entity: !input "chip03" - icon: !input "chip03_icon" - icon_color_rgb: !input "chip03_icon_color" - component: home.icon_top_06 - - entity: !input "chip04" - icon: !input "chip04_icon" - icon_color_rgb: !input "chip04_icon_color" - component: home.icon_top_07 - - entity: !input "chip05" - icon: !input "chip05_icon" - icon_color_rgb: !input "chip05_icon_color" - component: home.icon_top_08 - - entity: !input "chip06" - icon: !input "chip06_icon" - icon_color_rgb: !input "chip06_icon_color" - component: home.icon_top_09 - - entity: !input "chip07" - icon: !input "chip07_icon" - icon_color_rgb: !input "chip07_icon_color" - component: home.icon_top_10 - - repeat: - for_each: "{{ home_page_status_bar }}" - sequence: - - &display-home_page_status_bar - if: "{{ repeat.item.entity is defined and repeat.item.entity is string and repeat.item.entity | length > 0 }}" - then: - - variables: - repeat_item_state: "{{ states(repeat.item.entity) | default('unavailable') }}" - repeat_item_state_is_on: "{{ repeat_item_state in ['on', 'open'] }}" - repeat_item_icon: > - {% if repeat_item_state_is_on and repeat.item.icon is string and repeat.item.icon | length > 0 %}{{ nextion.icons.all[repeat.item.icon.split(':')[1]] | default(repeat.item.icon) }} - {% elif repeat_item_state_is_on and state_attr(repeat.item.entity, 'icon') | default('') not in ['unavailable', 'unknown', '', None] %}{{ nextion.icons.all[state_attr(repeat.item.entity, 'icon').split(':')[1]] | default(nextion.icons.blank) }} - {% else %}{{ nextion.icons.blank }} - {% endif %} - - if: "{{ repeat_item_state_is_on }}" - then: - ### ICON Font Color ### - - *delay-default - - service: "{{ nextion.commands.font_color }}" - data: - component: "{{ repeat.item.component }}" - message: "{{ repeat.item.icon_color_rgb if is_number(repeat.item.icon_color_rgb) else ((repeat.item.icon_color_rgb[0] //(2**3)) *(2**11))+((repeat.item.icon_color_rgb[1] //(2**2)) *(2**5))+(repeat.item.icon_color_rgb[2] //(2**3)) }}" - continue_on_error: true - ### ICON Font ### - - *delay-default - - service: "{{ nextion.commands.text_printf }}" - data: - component: "{{ repeat.item.component }}" - message: "{{ repeat_item_icon }}" - continue_on_error: true - # {{ is_state(repeat.item.entity, 'on') | default(False) if repeat.item.entity is string else 'unavailable' }} - - ##### HOME VALUE 01 - 03 - - *delay-default - - &variables-home_page_values - variables: - home_page_values: - - entity: !input "home_value01" - icon: !input "home_value01_icon" - icon_color_rgb: !input "home_value01_icon_color" - label_color_rgb: !input "home_value01_label_color" - component: home.value01 - - entity: !input "home_value02" - icon: !input "home_value02_icon" - icon_color_rgb: !input "home_value02_icon_color" - label_color_rgb: !input "home_value02_label_color" - component: home.value02 - - entity: !input "home_value03" - icon: !input "home_value03_icon" - icon_color_rgb: !input "home_value03_icon_color" - label_color_rgb: !input "home_value03_label_color" - component: home.value03 - - repeat: - for_each: "{{ home_page_values }}" - sequence: - - &display-home_page_value - if: "{{ repeat.item.entity is string and repeat.item.entity is match 'sensor.' and states(repeat.item.entity) not in ['unavailable', 'unknown', None] }}" - then: - - if: "{{ repeat.item.icon | length > 0 }}" - then: - ### ICON Font Color ### - - *delay-default - - service: "{{ nextion.commands.font_color }}" - data: - component: "{{ repeat.item.component }}_icon" - message: "{{ repeat.item.icon_color_rgb if is_number(repeat.item.icon_color_rgb) else ((repeat.item.icon_color_rgb[0] //(2**3)) *(2**11))+((repeat.item.icon_color_rgb[1] //(2**2)) *(2**5))+(repeat.item.icon_color_rgb[2] //(2**3)) }}" - continue_on_error: true - ### ICON Font ### - - *delay-default - - service: "{{ nextion.commands.text_printf }}" - data: - component: "{{ repeat.item.component }}_icon" - message: "{{ nextion.icons.all[repeat.item.icon.split(':')[1]] | default(repeat.item.icon if repeat.item.icon is string else '\U0000E2D5') }}" - continue_on_error: true - - variables: - repeat_item_state: "{{ states(repeat.item.entity) | default('unavailable') }}" - repeat_item_state_available: "{{ repeat_item_state not in ['unavailable', 'unknown', None] }}" - - if: "{{ repeat_item_state_available }}" - then: - ### LABEL Font Color ### - - *delay-default - - service: "{{ nextion.commands.font_color }}" - data: - component: "{{ repeat.item.component }}_state" - message: "{{ repeat.item.label_color_rgb if is_number(repeat.item.label_color_rgb) else ((repeat.item.label_color_rgb[0] //(2**3)) *(2**11))+((repeat.item.label_color_rgb[1] //(2**2)) *(2**5))+(repeat.item.label_color_rgb[2] //(2**3)) }}" - continue_on_error: true - ### LABEL Font ### - - *delay-default - - service: "{{ nextion.commands.text_printf }}" - data: - component: "{{ repeat.item.component }}_state" - message: "{{ (repeat_item_state | round(1) ~ state_attr(repeat.item.entity, 'unit_of_measurement') | default('')) if is_number(repeat_item_state) else repeat_item_state }}" - continue_on_error: true - - ##### Set notify icon ##### - - variables: - notification_unread_state: "{{ states(notification_unread) | default('unavailable') if notification_unread is string else 'unavailable' }}" - - if: "{{ notification_unread_state in ['on', 'off'] }}" - then: - - variables: - notification_text_state: "{{ states(notification_text) | default(None) if notification_text is string else None }}" - set_button04_icon: "{{ nextion.icons.all[page_home.buttons[3].icon.split(':')[1]] | default(page_home.buttons[3].icon if page_home.buttons[3].icon is string else '\U0000E2D5') if notification_unread_state == 'on' and notification_text_state | length > 0 else nextion.icons.blank }}" - set_button04_icon_font: "{{ (page_home.buttons[3].color_rgb[notification_unread_state] if is_number(page_home.buttons[3].color_rgb[notification_unread_state]) else ((page_home.buttons[3].color_rgb[notification_unread_state][0] //(2**3)) *(2**11))+((page_home.buttons[3].color_rgb[notification_unread_state][1] //(2**2)) *(2**5))+(page_home.buttons[3].color_rgb[notification_unread_state][2] //(2**3))) if notification_unread_state in ['on', 'off'] and notification_text_state | length > 0 else nextion.colors.grey_light }}" - ##### SET ICON Font - Notify ##### - - *delay-default - - service: "{{ nextion.commands.text_printf }}" - data: - component: home.button04_icon - message: "{{ set_button04_icon }}" - continue_on_error: true - - ##### SET ICON Font Color - Notify ##### - - *delay-default - - service: "{{ nextion.commands.font_color }}" - data: - component: home.button04_icon - message: "{{ set_button04_icon_font }}" - continue_on_error: true - - ###### QR Code - Icon ###### - - *delay-default - - if: "{{ qrcode_enabled == true }}" - then: # Display QR code icon - ### ICON Font Color ### - - service: "{{ nextion.commands.font_color }}" - data: - component: home.button05_icon - message: "{{ page_home.buttons[4].color_rgb.on if is_number(page_home.buttons[4].color_rgb.on) else ((page_home.buttons[4].color_rgb.on[0] //(2**3)) *(2**11))+((page_home.buttons[4].color_rgb.on[1] //(2**2)) *(2**5))+(page_home.buttons[4].color_rgb.on[2] //(2**3)) }}" - continue_on_error: true - ### ICON Font ### - - *delay-default - - service: "{{ nextion.commands.text_printf }}" - data: - component: home.button05_icon - message: "{{ nextion.icons.all[page_home.buttons[4].icon.split(':')[1]] | default(page_home.buttons[4].icon if page_home.buttons[4].icon is string else '\U0000E2D5') }}" - continue_on_error: true - else: # Display blank icon - - service: "{{ nextion.commands.text_printf }}" - data: - component: home.button05_icon - message: "{{ nextion.icons.blank }}" - continue_on_error: true - - ###### ENTITIES - Icon ###### - - *delay-default - - if: "{{ entitypages_enabled }}" - then: # Display entities icon - ### ICON Font Color ### - - service: "{{ nextion.commands.font_color }}" - data: - component: home.button06_icon - message: "{{ page_home.buttons[5].color_rgb.on if is_number(page_home.buttons[5].color_rgb.on) else ((page_home.buttons[5].color_rgb.on[0] //(2**3)) *(2**11))+((page_home.buttons[5].color_rgb.on[1] //(2**2)) *(2**5))+(page_home.buttons[5].color_rgb.on[2] //(2**3)) }}" - continue_on_error: true - ### ICON Font ### - - *delay-default - - service: "{{ nextion.commands.text_printf }}" - data: - component: home.button06_icon - message: "{{ nextion.icons.all[page_home.buttons[5].icon.split(':')[1]] | default(page_home.buttons[5].icon if page_home.buttons[5].icon is string else '\U0000E2D5') }}" - continue_on_error: true - else: # Display blank icon - - service: "{{ nextion.commands.text_printf }}" - data: - component: home.button06_icon - message: "{{ nextion.icons.blank }}" - continue_on_error: true - - ###### SHOW All component when page loading done ##### - - *delay-default - - service: "{{ nextion.commands.show_all }}" - continue_on_error: true - - ## BUTTON PAGES 01 - 04 ## - - alias: Button pages - conditions: "{{ trigger.event.data.new_state.state in nextion.pages.buttonpages }}" - sequence: &refresh_page_buttonpage - - &variables-page_buttons - variables: - button_page_index: "{{ (nextion.pages.current[-2:] | int(-1)) - 1 }}" - first_button: "{{ button_page_index * 8 }}" - last_button: "{{ first_button + 8 }}" - ##### BUTTON Page Labels ##### - button_pages_labels: - - label: !input button_page01_label - - label: !input button_page02_label - - label: !input button_page03_label - - label: !input button_page04_label - ##### BUTTONS Page - Buttons 1 - 32 ##### - button_pages_buttons: - - entity: !input "entity01" - name: !input "entity01_name" - icon: !input "entity01_icon" - icon_color_rgb: !input "entity01_icon_color" - confirm: !input "entity01_confirm" - component: buttonpage01.button01 - - entity: !input "entity02" - name: !input "entity02_name" - icon: !input "entity02_icon" - icon_color_rgb: !input "entity02_icon_color" - confirm: !input "entity02_confirm" - component: buttonpage01.button02 - - entity: !input "entity03" - name: !input "entity03_name" - icon: !input "entity03_icon" - icon_color_rgb: !input "entity03_icon_color" - confirm: !input "entity03_confirm" - component: buttonpage01.button03 - - entity: !input "entity04" - name: !input "entity04_name" - icon: !input "entity04_icon" - icon_color_rgb: !input "entity04_icon_color" - confirm: !input "entity04_confirm" - component: buttonpage01.button04 - - entity: !input "entity05" - name: !input "entity05_name" - icon: !input "entity05_icon" - icon_color_rgb: !input "entity05_icon_color" - confirm: !input "entity05_confirm" - component: buttonpage01.button05 - - entity: !input "entity06" - name: !input "entity06_name" - icon: !input "entity06_icon" - icon_color_rgb: !input "entity06_icon_color" - confirm: !input "entity06_confirm" - component: buttonpage01.button06 - - entity: !input "entity07" - name: !input "entity07_name" - icon: !input "entity07_icon" - icon_color_rgb: !input "entity07_icon_color" - confirm: !input "entity07_confirm" - component: buttonpage01.button07 - - entity: !input "entity08" - name: !input "entity08_name" - icon: !input "entity08_icon" - icon_color_rgb: !input "entity08_icon_color" - confirm: !input "entity08_confirm" - component: buttonpage01.button08 - - entity: !input "entity09" - name: !input "entity09_name" - icon: !input "entity09_icon" - icon_color_rgb: !input "entity09_icon_color" - confirm: !input "entity09_confirm" - component: buttonpage02.button01 - - entity: !input "entity10" - name: !input "entity10_name" - icon: !input "entity10_icon" - icon_color_rgb: !input "entity10_icon_color" - confirm: !input "entity10_confirm" - component: buttonpage02.button02 - - entity: !input "entity11" - name: !input "entity11_name" - icon: !input "entity11_icon" - icon_color_rgb: !input "entity11_icon_color" - confirm: !input "entity11_confirm" - component: buttonpage02.button03 - - entity: !input "entity12" - name: !input "entity12_name" - icon: !input "entity12_icon" - icon_color_rgb: !input "entity12_icon_color" - confirm: !input "entity12_confirm" - component: buttonpage02.button04 - - entity: !input "entity13" - name: !input "entity13_name" - icon: !input "entity13_icon" - icon_color_rgb: !input "entity13_icon_color" - confirm: !input "entity13_confirm" - component: buttonpage02.button05 - - entity: !input "entity14" - name: !input "entity14_name" - icon: !input "entity14_icon" - icon_color_rgb: !input "entity14_icon_color" - confirm: !input "entity14_confirm" - component: buttonpage02.button06 - - entity: !input "entity15" - name: !input "entity15_name" - icon: !input "entity15_icon" - icon_color_rgb: !input "entity15_icon_color" - confirm: !input "entity15_confirm" - component: buttonpage02.button07 - - entity: !input "entity16" - name: !input "entity16_name" - icon: !input "entity16_icon" - icon_color_rgb: !input "entity16_icon_color" - confirm: !input "entity16_confirm" - component: buttonpage02.button08 - - entity: !input "entity17" - name: !input "entity17_name" - icon: !input "entity17_icon" - icon_color_rgb: !input "entity17_icon_color" - confirm: !input "entity17_confirm" - component: buttonpage03.button01 - - entity: !input "entity18" - name: !input "entity18_name" - icon: !input "entity18_icon" - icon_color_rgb: !input "entity18_icon_color" - confirm: !input "entity18_confirm" - component: buttonpage03.button02 - - entity: !input "entity19" - name: !input "entity19_name" - icon: !input "entity19_icon" - icon_color_rgb: !input "entity19_icon_color" - confirm: !input "entity19_confirm" - component: buttonpage03.button03 - - entity: !input "entity20" - name: !input "entity20_name" - icon: !input "entity20_icon" - icon_color_rgb: !input "entity20_icon_color" - confirm: !input "entity20_confirm" - component: buttonpage03.button04 - - entity: !input "entity21" - name: !input "entity21_name" - icon: !input "entity21_icon" - icon_color_rgb: !input "entity21_icon_color" - confirm: !input "entity21_confirm" - component: buttonpage03.button05 - - entity: !input "entity22" - name: !input "entity22_name" - icon: !input "entity22_icon" - icon_color_rgb: !input "entity22_icon_color" - confirm: !input "entity22_confirm" - component: buttonpage03.button06 - - entity: !input "entity23" - name: !input "entity23_name" - icon: !input "entity23_icon" - icon_color_rgb: !input "entity23_icon_color" - confirm: !input "entity23_confirm" - component: buttonpage03.button07 - - entity: !input "entity24" - name: !input "entity24_name" - icon: !input "entity24_icon" - icon_color_rgb: !input "entity24_icon_color" - confirm: !input "entity24_confirm" - component: buttonpage03.button08 - - entity: !input "entity25" - name: !input "entity25_name" - icon: !input "entity25_icon" - icon_color_rgb: !input "entity25_icon_color" - confirm: !input "entity25_confirm" - component: buttonpage04.button01 - - entity: !input "entity26" - name: !input "entity26_name" - icon: !input "entity26_icon" - icon_color_rgb: !input "entity26_icon_color" - confirm: !input "entity26_confirm" - component: buttonpage04.button02 - - entity: !input "entity27" - name: !input "entity27_name" - icon: !input "entity27_icon" - icon_color_rgb: !input "entity27_icon_color" - confirm: !input "entity27_confirm" - component: buttonpage04.button03 - - entity: !input "entity28" - name: !input "entity28_name" - icon: !input "entity28_icon" - icon_color_rgb: !input "entity28_icon_color" - confirm: !input "entity28_confirm" - component: buttonpage04.button04 - - entity: !input "entity29" - name: !input "entity29_name" - icon: !input "entity29_icon" - icon_color_rgb: !input "entity29_icon_color" - confirm: !input "entity29_confirm" - component: buttonpage04.button05 - - entity: !input "entity30" - name: !input "entity30_name" - icon: !input "entity30_icon" - icon_color_rgb: !input "entity30_icon_color" - confirm: !input "entity30_confirm" - component: buttonpage04.button06 - - entity: !input "entity31" - name: !input "entity31_name" - icon: !input "entity31_icon" - icon_color_rgb: !input "entity31_icon_color" - confirm: !input "entity31_confirm" - component: buttonpage04.button07 - - entity: !input "entity32" - name: !input "entity32_name" - icon: !input "entity32_icon" - icon_color_rgb: !input "entity32_icon_color" - confirm: !input "entity32_confirm" - component: buttonpage04.button08 - - if: "{{ button_page_index >= 0 and button_page_index <= 3 }}" - then: - - service: "{{ nextion.commands.set_settings_entity }}" - data: - entity: 'unknown' - continue_on_error: true - ##### Button Page Label ##### - - if: "{{ button_pages_labels[button_page_index].label | length > 0 }}" + display_target_temperature_state: "{{ states(display_target_temperature) | default('unavailable') if display_target_temperature is string else 'unavailable' }}" + - if: "{{ is_number(display_target_temperature_state) }}" then: + - *variables-settings_entity + - if: "{{ settings_entity_domain == 'climate' }}" + then: + - service: climate.set_temperature + data: + entity_id: "{{ settings_entity_dict.entity }}" + temperature: "{{ display_target_temperature_state }}" + continue_on_error: true + - choose: + ## PAGE HOME ## + - alias: Home page + conditions: "{{ nspanel_event.page == nextion.pages.home }}" + sequence: &refresh_page_home + - service: "{{ nextion.commands.set_settings_entity }}" + data: + entity: "{{ nspanel_event }}" + continue_on_error: true + ##### NSPanel Date ##### + ### DATE Font Color ### + - *delay-default + - service: "{{ nextion.commands.font_color }}" + data: + component: home.date + message: "{{ page_home.general.date.label.color_rgb if is_number(page_home.general.date.label.color_rgb) else ((page_home.general.date.label.color_rgb[0] //(2**3)) *(2**11))+((page_home.general.date.label.color_rgb[1] //(2**2)) *(2**5))+(page_home.general.date.label.color_rgb[2] //(2**3)) }}" + continue_on_error: true + ### DATE Font ### + - *delay-default - service: "{{ nextion.commands.text_printf }}" data: - component: "{{ 'bpage%02d_label' | format(button_page_index+1) }}" - message: "{{ button_pages_labels[button_page_index].label }}" + component: home.date + message: "{{ (dict.values(mui[language].weekdays) | list)[now().weekday()] ~ ', ' ~ as_timestamp(now()) | timestamp_custom(date_format) }}" + continue_on_error: true + ##### NSPanel Time ##### + ### TIME Font Color ### + - *delay-default + - service: "{{ nextion.commands.font_color }}" + data: + component: home.time + message: "{{ page_home.general.time.label.color_rgb if is_number(page_home.general.time.label.color_rgb) else ((page_home.general.time.label.color_rgb[0] //(2**3)) *(2**11))+((page_home.general.time.label.color_rgb[1] //(2**2)) *(2**5))+(page_home.general.time.label.color_rgb[2] //(2**3)) }}" + continue_on_error: true + ### TIME Font ### + - *delay-default + - service: "{{ nextion.commands.text_printf }}" + data: + component: home.time + message: "{{ time }}" + continue_on_error: true + - if: "{{ meridiem }}" + then: + ### TIME Meridiem Font Color ### + - *delay-default + - service: "{{ nextion.commands.font_color }}" + data: + component: home.meridiem + message: "{{ page_home.general.time.label.color_rgb if is_number(page_home.general.time.label.color_rgb) else ((page_home.general.time.label.color_rgb[0] //(2**3)) *(2**11))+((page_home.general.time.label.color_rgb[1] //(2**2)) *(2**5))+(page_home.general.time.label.color_rgb[2] //(2**3)) }}" + continue_on_error: true + ### TIME Meridiem Font ### + - *delay-default + - service: "{{ nextion.commands.text_printf }}" + data: + component: home.meridiem + message: "{{ meridiem }}" + continue_on_error: true + + ##### NSPanel Outdoor Temp ##### + - variables: + outdoor_temp_state: "{{ states(outdoortemp) | default('unavailable') if outdoortemp is string else 'unavailable' }}" + outdoor_temp: "{{ outdoor_temp_state if is_number(outdoor_temp_state) else state_attr(weather_entity, 'temperature') | default('unavailable') if weather_entity is string else 'unavailable' }}" + - if: "{{ is_number(outdoor_temp) }}" + then: + ### LABEL Outdoor Temp Font Color ### + - *delay-default + - service: "{{ nextion.commands.font_color }}" + data: + component: home.outdoor_temp + message: "{{ page_home.general.outdoor_temp.label.color_rgb if is_number(page_home.general.outdoor_temp.label.color_rgb) else ((page_home.general.outdoor_temp.label.color_rgb[0] //(2**3)) *(2**11))+((page_home.general.outdoor_temp.label.color_rgb[1] //(2**2)) *(2**5))+(page_home.general.outdoor_temp.label.color_rgb[2] //(2**3)) }}" + continue_on_error: true + ### LABEL Outdoor Temp Font ### + - *delay-default + - service: "{{ nextion.commands.text_printf }}" + data: + component: home.outdoor_temp + message: "{{ outdoor_temp | round(1) ~ temperature_units }}" + continue_on_error: true + + ##### NSPanel Indoor Temp ##### + - variables: + indoor_temp_state: "{{ states(indoortemp) | default('unavailable') if indoortemp is string and indoortemp is match 'sensor.' else states(nspaneltemp) }}" + - if: "{{ is_number(indoor_temp_state) }}" + then: + ### ICON Indoor Temp Font Color ### + - *delay-default + - service: "{{ nextion.commands.font_color }}" + data: + component: home.indoortempicon + message: "{{ page_home.general.indoor_temp.icon.color_rgb if is_number(page_home.general.indoor_temp.icon.color_rgb) else ((page_home.general.indoor_temp.icon.color_rgb[0] //(2**3)) *(2**11))+((page_home.general.indoor_temp.icon.color_rgb[1] //(2**2)) *(2**5))+(page_home.general.indoor_temp.icon.color_rgb[2] //(2**3)) }}" + continue_on_error: true + ### ICON Indoor Temp Font ### + - *delay-default + - service: "{{ nextion.commands.text_printf }}" + data: + component: home.indoortempicon + message: "{{ nextion.icons.all[page_home.general.indoor_temp.icon.icon.split(':')[1]] | default(page_home.general.indoor_temp.icon.icon if page_home.general.indoor_temp.icon.icon is string else '\U0000E2D5') }}" + continue_on_error: true + ### LABEL Indoor Temp Font Color ### + - *delay-default + - service: "{{ nextion.commands.font_color }}" + data: + component: home.current_temp + message: "{{ page_home.general.indoor_temp.label.color_rgb if is_number(page_home.general.indoor_temp.label.color_rgb) else ((page_home.general.indoor_temp.label.color_rgb[0] //(2**3)) *(2**11))+((page_home.general.indoor_temp.label.color_rgb[1] //(2**2)) *(2**5))+(page_home.general.indoor_temp.label.color_rgb[2] //(2**3)) }}" + continue_on_error: true + ### LABEL Indoor Temp Font ### + - *delay-default + - service: "{{ nextion.commands.text_printf }}" + data: + component: home.current_temp + message: "{{ (indoor_temp_state | round(1) ~ temperature_units) if is_number(indoor_temp_state) else (mui[language].unavailable if indoor_temp_state in ['unavailable', 'unknown', None] else indoor_temp_state) }}" + continue_on_error: true + + ##### Weather Icon Home Page ##### + - *delay-default + - service: "{{ nextion.commands.printf }}" + data: + cmd: home.weather.pic={{ nextion.pics.weather[states(weather_entity) | default('unavailable') if weather_entity is string else 'unavailable'] | default(None) }} continue_on_error: true - ##### NSPanel build Button page ##### - - repeat: - for_each: "{{ button_pages_buttons[first_button:last_button] }}" - sequence: &display-button_page_button - - if: "{{ repeat.item.entity is string and repeat.item.entity | length > 0 and repeat.item.entity.split('.') | default([]) | count > 0 }}" - then: - - variables: - item_domain: "{{ repeat.item.entity.split('.')[0] | default('unknown') }}" - # {{ states(entity_id) | default('unavailable') if entity_id is string else 'unavailable' }} - current_entity_state: "{{ states(repeat.item.entity) | default('unavailable') }}" - current_entity_state_available: "{{ current_entity_state not in ['unavailable'] }}" - # Button PIC GRAY/WHITE - btn_pic: "{{ nextion.pics.button.on if current_entity_state in ['on', 'open', 'opening', 'home'] or (item_domain == 'climate' and current_entity_state != 'off') else nextion.pics.button.off }}" - # TEXT, BRIGHTNESS and ICON Background - btn_bg: "{{ nextion.colors.white if current_entity_state in ['on', 'open', 'opening', 'home'] or (item_domain == 'climate' and current_entity_state != 'off') else nextion.colors.grey_dark }}" - # ICON Font Color - btn_icon_font: > - {% if not current_entity_state_available %} {{ nextion.colors.red }} - {% elif item_domain in ['button', 'input_button', 'scene'] or current_entity_state in ['off', 'closed', 'closing'] or (item_domain == 'person' and current_entity_state != 'home') %} {{ nextion.colors.grey_light }} - {% elif current_entity_state in ['on', 'open', 'opening', 'home'] or (item_domain == 'climate' and current_entity_state != 'off') %} {{ repeat.item.icon_color_rgb if is_number(repeat.item.icon_color_rgb) else ((repeat.item.icon_color_rgb[0] //(2**3)) *(2**11))+((repeat.item.icon_color_rgb[1] //(2**2)) *(2**5))+(repeat.item.icon_color_rgb[2] //(2**3)) }} - {% else %} {{ nextion.colors.red }} - {% endif %} - # LABEL Font Color - btn_txt_font: >- - {% if not current_entity_state_available %} {{ nextion.colors.white }} - {% elif item_domain in ['button', 'input_button', 'scene'] or current_entity_state in ['off', 'closed', 'closing'] or (item_domain == 'person' and current_entity_state != 'home') %} {{ nextion.colors.white }} - {% elif current_entity_state in ['on', 'open', 'opening', 'home'] or (item_domain == 'climate' and current_entity_state != 'off') %} {{ nextion.colors.grey_dark }} - {% else %} {{ nextion.colors.white }} - {% endif %} - # BRIGHTNESS Font Color - btn_bri_font: "{{ btn_txt_font }}" #"{{ nextion.colors.grey_dark }}" - # ICON Value - btn_icon: > - {% if not current_entity_state_available %} {{ nextion.icons.buttons.unknown }} - {% elif repeat.item.icon | length > 0 %} {{ nextion.icons.all[repeat.item.icon.split(':')[1]] | default(repeat.item.icon if repeat.item.icon is string else '\U0000E2D5') }} - {% elif repeat.item.entity and repeat.item.entity.split('.') | count > 1 %} {{ nextion.icons.buttons[repeat.item.entity.split('.')[0] if repeat.item.entity else 'unknown'] }} - {% else %} {{ nextion.icons.buttons.unknown }} - {% endif %} - # LABEL Value - btn_label: "{{ repeat.item.name }}" - # BRIGHTNESS Value - btn_bri_txt: >- - {% if not current_entity_state_available %} 0 - {% elif item_domain == 'light' and current_entity_state == 'on' and state_attr(repeat.item.entity, 'brightness') != None %} {{ (state_attr(repeat.item.entity, 'brightness') | int * 100 /255) | round(0) }}% - {% elif item_domain == 'cover' and current_entity_state in ['open', 'opening', 'closing'] and state_attr(repeat.item.entity, 'current_position') != None %} {{ (state_attr(repeat.item.entity, 'current_position') | int(100)) | round(0) }}% - {% elif item_domain == 'climate' and current_entity_state != 'off' and state_attr(repeat.item.entity, "current_temperature") != None %} {{ (state_attr(repeat.item.entity, "current_temperature") | float) | round(0) }}{{ temperature_units }} - {% else -%} 0 - {% endif -%} - - *delay-default - - service: "{{ nextion.commands.set_button }}" - data: - btn_id: "{{ repeat.item.component }}" - btn_pic: "{{ btn_pic }}" - btn_bg: "{{ btn_bg }}" - btn_icon_font: "{{ btn_icon_font }}" - btn_txt_font: "{{ btn_txt_font }}" - btn_bri_font: "{{ btn_bri_font }}" - btn_icon: "{{ btn_icon }}" - btn_label: "{{ btn_label }}" - btn_bri_txt: "{{ btn_bri_txt }}" - continue_on_error: true - ###### SHOW All component when page loading done ##### - - *delay-default - - service: "{{ nextion.commands.show_all }}" - continue_on_error: true - - ## PAGE LIGHTSETTINGS ## - - alias: Light settings page - conditions: "{{ trigger.event.data.new_state.state == nextion.pages.light }}" - sequence: - - *variables-settings_entity - - service: "{{ nextion.commands.text_printf }}" - data: - component: lightsettings.light_name - message: "{{ entity_long_name }}" - continue_on_error: true - ##### LIGHT ICON - ON / OFF ##### - - variables: - lightsettings_icon_font: "{{ nextion.icons.all[entity_long_icon.split(':')[1]] | default(entity_long_icon if entity_long_icon is string else nextion.icons.buttons.light) if entity_long_icon not in ['unavailable', 'unknown', None] and entity_long_icon | length > 0 else nextion.icons.buttons.light }}" - lightsettings_icon_font_color: "{{ entity_long_icon_color if is_state(entity_long, 'on') else nextion.colors.grey_light }}" - - *delay-default - - service: "{{ nextion.commands.text_printf }}" - data: - component: lightsettings.icon_state - message: "{{ lightsettings_icon_font }}" - continue_on_error: true - - *delay-default - - service: "{{ nextion.commands.font_color }}" - data: - component: lightsettings.icon_state - message: "{{ lightsettings_icon_font_color }}" - continue_on_error: true - ##### LIGHT State ##### - - *delay-default - - if: "{{ state_attr(entity_long, 'brightness') != none }}" - then: - - service: "{{ nextion.commands.value }}" - data: - component: lightsettings.lightslider - message: "{{ (state_attr(entity_long, 'brightness') | int * 100 / 255) | round(0) }}" - continue_on_error: true - - *delay-default - - service: "{{ nextion.commands.text_printf }}" - data: - component: lightsettings.light_value - message: "{{ (state_attr(entity_long, 'brightness') | int * 100 / 255) | round(0) }}%" - continue_on_error: true - - *delay-default - - service: "{{ nextion.commands.text_printf }}" - data: - component: lightsettings.light_value_2 - message: "{{ (state_attr(entity_long, 'brightness') | int * 100 /255) | round(0) }}%" - continue_on_error: true - else: - - service: "{{ nextion.commands.value }}" - data: - component: lightsettings.lightslider - message: '0' - continue_on_error: true - - *delay-default - - service: "{{ nextion.commands.text_printf }}" - data: - component: lightsettings.light_value - message: '0 %' - continue_on_error: true - - *delay-default - - service: "{{ nextion.commands.text_printf }}" - data: - component: lightsettings.light_value_2 - message: '0 %' - continue_on_error: true - - ##### LIGHT Check Color_Temp Value is available when yes send some current Values ##### - - if: "{{ state_attr(entity_long, 'color_temp') != none }}" - then: - - *delay-default - - service: "{{ nextion.commands.text_printf }}" - data: - component: lightsettings.temp_value - message: "{{ (state_attr(entity_long, 'color_temp') | int ) | round(0) }}" - continue_on_error: true - - *delay-default - - service: "{{ nextion.commands.text_printf }}" - data: - component: lightsettings.temp_value_2 - message: "{{ (state_attr(entity_long, 'color_temp') | int ) | round(0) }}" - continue_on_error: true - - *delay-default - - service: "{{ nextion.commands.value }}" - data: - component: lightsettings.tempslider - message: "{{ (state_attr(entity_long, 'color_temp') | int ) | round(0) }}" - continue_on_error: true - - ## PAGE COVERSETTINGS ## - - alias: Cover settings page - conditions: "{{ trigger.event.data.new_state.state == nextion.pages.cover }}" - sequence: - ##### COVER - OPEN / CLOSE ##### - - *variables-settings_entity - - variables: - coversettings_icon_font: "{{ nextion.icons.all[entity_long_icon.split(':')[1]] | default(entity_long_icon if entity_long_icon is string else nextion.icons.buttons.cover) if entity_long_icon | length > 0 else nextion.icons.buttons.cover }}" - coversettings_icon_font_color: "{{ entity_long_icon_color if is_state(entity_long, 'open') else nextion.colors.grey_light }}" - - *delay-default - - service: "{{ nextion.commands.text_printf }}" - data: - component: coversettings.icon_state - message: "{{ coversettings_icon_font }}" - continue_on_error: true - - *delay-default - - service: "{{ nextion.commands.font_color }}" - data: - component: coversettings.icon_state - message: "{{ coversettings_icon_font_color }}" - continue_on_error: true - - *delay-default - - service: "{{ nextion.commands.text_printf }}" - data: - component: coversettings.cover_name - message: "{{ entity_long_name }}" - continue_on_error: true - - ##### COVER State - - service: "{{ nextion.commands.value }}" - data: - component: coversettings.coverslider - message: "{{ (state_attr(entity_long, 'current_position') | int ) | round(0) }}" - continue_on_error: true - - *delay-default - - service: "{{ nextion.commands.text_printf }}" - data: - component: coversettings.cover_value - message: "{{ (state_attr(entity_long, 'current_position') | int ) | round(0) }} %" - continue_on_error: true - - ##### COVER Battery ICON Yes / NO ##### - - variables: - battery_level: > - {% if state_attr(entity_long, 'battery') | default('unavailable') not in ['unavailable', 'unknown', None] %} - {{ state_attr(entity_long, 'battery') | default('unavailable') }} - {% elif expand(device_entities(device_id(entity_long))) | selectattr('attributes.device_class', 'defined') | selectattr('attributes.device_class', 'eq', 'battery') | map(attribute='state') | map('float') | list | count > 0 %} - {{ expand(device_entities(device_id(entity_long))) | selectattr('attributes.device_class', 'defined') | selectattr('attributes.device_class', 'eq', 'battery') | map(attribute='state') | map('float') | list | first }} - {% elif states(entity_long | replace('cover.','sensor.') ~ '_battery') | default('unavailable') not in ['unavailable', 'unknown', None] %} - {{ states(entity_long | replace('cover.','sensor.') ~ '_battery') | default('unavailable') }} - {% elif states(entity_long | replace('cover.','sensor.') | replace('cover', 'battery')) | default('unavailable') not in ['unavailable', 'unknown', None] %} - {{ states(entity_long | replace('cover.','sensor.') | replace('cover', 'battery')) | default('unavailable') }} - {% else %} unavailable - {% endif %} - - if: "{{ is_number(battery_level) }}" - then: - - *delay-default - - service: "{{ nextion.commands.text_printf }}" - data: - component: coversettings.battery_value - message: "{{ battery_level | round(0) }} %" - continue_on_error: true - ### ICON Battery Font Color ### - - *delay-default - - service: "{{ nextion.commands.font_color }}" - data: - component: coversettings.battery_icon - message: "{{ nextion.colors.grey_super_light }}" - continue_on_error: true - ### ICON Battery Font ### - - *delay-default - - service: "{{ nextion.commands.text_printf }}" - data: - component: coversettings.battery_icon - message: "{{ nextion.icons.battery }}" - continue_on_error: true - - ## ENTITY PAGES 01 - 04 ## - - alias: Entity pages - conditions: "{{ trigger.event.data.new_state.state in nextion.pages.entitypages }}" - sequence: &refresh-entity_pages - - &variables-entity_pages - variables: - ##### Entity pages ##### - entity_pages_labels: - - label: !input "entity_page01_label" - - label: !input "entity_page02_label" - - label: !input "entity_page03_label" - - label: !input "entity_page04_label" - entity_pages_entities: - - entity: !input "entities_entity01" - name: !input "entities_entity01_name" - icon: !input "entities_entity01_icon" - component: entitypage01.value01 - - entity: !input "entities_entity02" - name: !input "entities_entity02_name" - icon: !input "entities_entity02_icon" - component: entitypage01.value02 - - entity: !input "entities_entity03" - name: !input "entities_entity03_name" - icon: !input "entities_entity03_icon" - component: entitypage01.value03 - - entity: !input "entities_entity04" - name: !input "entities_entity04_name" - icon: !input "entities_entity04_icon" - component: entitypage01.value04 - - entity: !input "entities_entity05" - name: !input "entities_entity05_name" - icon: !input "entities_entity05_icon" - component: entitypage01.value05 - - entity: !input "entities_entity06" - name: !input "entities_entity06_name" - icon: !input "entities_entity06_icon" - component: entitypage01.value06 - - entity: !input "entities_entity07" - name: !input "entities_entity07_name" - icon: !input "entities_entity07_icon" - component: entitypage01.value07 - - entity: !input "entities_entity08" - name: !input "entities_entity08_name" - icon: !input "entities_entity08_icon" - component: entitypage01.value08 - - entity: !input "entities_entity09" - name: !input "entities_entity09_name" - icon: !input "entities_entity09_icon" - component: entitypage02.value01 - - entity: !input "entities_entity10" - name: !input "entities_entity10_name" - icon: !input "entities_entity10_icon" - component: entitypage02.value02 - - entity: !input "entities_entity11" - name: !input "entities_entity11_name" - icon: !input "entities_entity11_icon" - component: entitypage02.value03 - - entity: !input "entities_entity12" - name: !input "entities_entity12_name" - icon: !input "entities_entity12_icon" - component: entitypage02.value04 - - entity: !input "entities_entity13" - name: !input "entities_entity13_name" - icon: !input "entities_entity13_icon" - component: entitypage02.value05 - - entity: !input "entities_entity14" - name: !input "entities_entity14_name" - icon: !input "entities_entity14_icon" - component: entitypage02.value06 - - entity: !input "entities_entity15" - name: !input "entities_entity15_name" - icon: !input "entities_entity15_icon" - component: entitypage02.value07 - - entity: !input "entities_entity16" - name: !input "entities_entity16_name" - icon: !input "entities_entity16_icon" - component: entitypage02.value08 - - entity: !input "entities_entity17" - name: !input "entities_entity17_name" - icon: !input "entities_entity17_icon" - component: entitypage03.value01 - - entity: !input "entities_entity18" - name: !input "entities_entity18_name" - icon: !input "entities_entity18_icon" - component: entitypage03.value02 - - entity: !input "entities_entity19" - name: !input "entities_entity19_name" - icon: !input "entities_entity19_icon" - component: entitypage03.value03 - - entity: !input "entities_entity20" - name: !input "entities_entity20_name" - icon: !input "entities_entity20_icon" - component: entitypage03.value04 - - entity: !input "entities_entity21" - name: !input "entities_entity21_name" - icon: !input "entities_entity21_icon" - component: entitypage03.value05 - - entity: !input "entities_entity22" - name: !input "entities_entity22_name" - icon: !input "entities_entity22_icon" - component: entitypage03.value06 - - entity: !input "entities_entity23" - name: !input "entities_entity23_name" - icon: !input "entities_entity23_icon" - component: entitypage03.value07 - - entity: !input "entities_entity24" - name: !input "entities_entity24_name" - icon: !input "entities_entity24_icon" - component: entitypage03.value08 - - entity: !input "entities_entity25" - name: !input "entities_entity25_name" - icon: !input "entities_entity25_icon" - component: entitypage04.value01 - - entity: !input "entities_entity26" - name: !input "entities_entity26_name" - icon: !input "entities_entity26_icon" - component: entitypage04.value02 - - entity: !input "entities_entity27" - name: !input "entities_entity27_name" - icon: !input "entities_entity27_icon" - component: entitypage04.value03 - - entity: !input "entities_entity28" - name: !input "entities_entity28_name" - icon: !input "entities_entity28_icon" - component: entitypage04.value04 - - entity: !input "entities_entity29" - name: !input "entities_entity29_name" - icon: !input "entities_entity29_icon" - component: entitypage04.value05 - - entity: !input "entities_entity30" - name: !input "entities_entity30_name" - icon: !input "entities_entity30_icon" - component: entitypage04.value06 - - entity: !input "entities_entity31" - name: !input "entities_entity31_name" - icon: !input "entities_entity31_icon" - component: entitypage04.value07 - - entity: !input "entities_entity32" - name: !input "entities_entity32_name" - icon: !input "entities_entity32_icon" - component: entitypage04.value08 - - variables: - entity_page_index: "{{ (nextion.pages.current[-2:] | int(-1)) - 1 }}" - first_entity: "{{ entity_page_index * 8 }}" - last_entity: "{{ first_entity + 8 }}" - ##### Entity page - Label ##### - - if: "{{ entity_pages_labels[entity_page_index].label | length > 0 }}" - then: - - service: "{{ nextion.commands.text_printf }}" - data: - component: "{{ 'entity%02d_label' | format(entity_page_index + 1) }}" - message: "{{ entity_pages_labels[entity_page_index].label }}" - continue_on_error: true - - *delay-default - ##### Entities ##### - - repeat: - for_each: "{{ entity_pages_entities[first_entity:last_entity] }}" - sequence: &update-entity_page_entity - - if: "{{ repeat.item.entity is string and repeat.item.entity | length > 0 }}" - then: - - variables: - repeat_item_state: "{{ states(repeat.item.entity) | default('unavailable') }}" - repeat_item_icon: > - {% if repeat.item.icon is string and repeat.item.icon | length > 0 %}{{ nextion.icons.all[repeat.item.icon.split(':')[1]] | default(repeat.item.icon) }} - {% elif state_attr(repeat.item.entity, 'icon') | default('') not in ['unavailable', 'unknown', '', None] %}{{ nextion.icons.all[state_attr(repeat.item.entity, 'icon').split(':')[1]] | default(None) }} - {% endif %} - - service: "{{ nextion.commands.set_entity }}" - data: - ent_id: "{{ repeat.item.component }}" - ent_icon: "{{ repeat_item_icon }}" - ent_label: >- - {%- if repeat.item.name | length > 0 -%} {{ repeat.item.name }} - {%- elif repeat_item_state in ['unavailable', 'unknown', None] -%} {{ repeat.item.entity }} - {%- else -%} {{ state_attr(repeat.item.entity, 'friendly_name') | default(mui[language].no_name) }} - {%- endif -%} - ent_value: "{{ repeat_item_state ~ ((state_attr(repeat.item.entity, 'unit_of_measurement') | default('')) if state_attr(repeat.item.entity, 'unit_of_measurement') else '') }}" - continue_on_error: true - - ## PAGE CLIMATE ## - - alias: Climate page - conditions: "{{ trigger.event.data.new_state.state == nextion.pages.climate }}" - sequence: - - *variables-settings_entity - - variables: - hvac_mode: "{{ states(entity_long) | default('unavailable') if entity_long is string else 'unavailable' }}" - outdoor_temp_state: "{{ states(outdoortemp) | default('unavailable') if outdoortemp is string else 'unavailable' }}" - outdoor_temp: "{{ outdoor_temp_state if is_number(outdoor_temp_state) else state_attr(weather_entity, 'temperature') | default('unavailable') if weather_entity is string else 'unavailable' }}" - heating_state: "{{ mui[language].climate.states.off if hvac_mode == 'off' else mui[language].climate.states.on }}" - - service: "{{ nextion.commands.text_printf }}" - data: - component: climate.climate_label - message: "{{ entity_long_name }}" - continue_on_error: true - - *delay-default - - service: "{{ nextion.commands.text_printf }}" - data: - component: outdoor_temp - message: "{{ (outdoor_temp | round(1) ~ temperature_units) if is_number(outdoor_temp) else (mui[language].unavailable if outdoor_temp in ['unavailable', 'unknown', None] else outdoor_temp) }}" - continue_on_error: true - - - service: "{{ nextion.commands.text_printf }}" - data: - component: current_temp - message: "{{ (state_attr(entity_long, 'current_temperature') | round(1) ~ temperature_units) if is_number(state_attr(entity_long, 'current_temperature')) else '' }}" # mui[language].unavailable? - continue_on_error: true - - if: "{{ hvac_mode != 'off' and is_number(state_attr(entity_long, 'temperature')) }}" - then: - - variables: - target_temp: "{{state_attr(entity_long, 'temperature') | round(1)}}" - - service: "{{ nextion.commands.thermostat_cycle }}" - data: - value: "{{ target_temp }}" - continue_on_error: true - else: - - service: "{{ nextion.commands.thermostat_cycle }}" - data: - value: "0" - continue_on_error: true - - service: "{{ nextion.commands.text_printf }}" - data: - component: target_temp - message: " " - continue_on_error: true - - service: "{{ nextion.commands.text_printf }}" - data: - component: heating_state - message: "{{ heating_state }}" - continue_on_error: true - - # HVAC Button PIC - - variables: - heating_bt_pic: "{{ nextion.pics.heating.button.off if hvac_mode == 'off' else nextion.pics.heating.button.on }}" - - *delay-default - - service: "{{ nextion.commands.printf }}" - data: - cmd: heating_bt_pic.pic={{ heating_bt_pic }} - continue_on_error: true - - variables: - hotwatercharge_state: "{{ states(hotwatercharge) | default('unavailable') if hotwatercharge is string else 'unavailable' }}" - hotwatertemp_state: "{{ states(hotwatertemp) | default('unavailable') if hotwatertemp is string else 'unavailable' }}" - hotw_bt_pic: "{{ nextion.pics.hvac.button[hotwatercharge_state] | default(nextion.pics.hvac.button.blank) if hotwatercharge_state not in ['unavailable', 'unknown', None] else nextion.pics.hvac.button.blank }}" - - *delay-default - - service: "{{ nextion.commands.printf }}" - data: - cmd: hotw_bt_pic.pic={{ hotw_bt_pic }} - continue_on_error: true - - if: "{{ hotwatertemp_state not in ['unavailable', 'unknown', None] }}" - then: - - *delay-default - - service: "{{ nextion.commands.text_printf }}" - data: - component: climate.hotwater_temp - message: "{{ (hotwatertemp_state | round(1) ~ temperature_units) if is_number(hotwatertemp_state) else hotwatertemp_state }}" - continue_on_error: true - - ## PAGE WEATHER (WEATHER01 to WEATHER05) ## - - alias: Weather pages - conditions: "{{ trigger.event.data.new_state.state in nextion.pages.weatherpages }}" - sequence: - - variables: - weather_attribution: "{{ state_attr(weather_entity, 'attribution') if weather_entity is string }}" - weather_type: > - {% if not weather_attribution %} unavailable - {% elif 'AccuWeather' in weather_attribution %} AccuWeather - {% elif 'OpenWeatherMap' in weather_attribution %} OpenWeather - {% elif 'SMHI' in weather_attribution %} SMHI - {% elif 'met.no' in weather_attribution %} Met.no - {% elif 'OpenWeatherMap' in weather_attribution %} OpenWeather - {% else %} Other - {% endif %} - weather_units: - hours_of_sun: "{{ state_attr(weather_entity, 'hours_of_sun_unit') | default('h') if weather_entity is string and state_attr(weather_entity, 'hours_of_sun_unit') else 'h' }}" - precipitation: "{{ state_attr(weather_entity, 'precipitation_unit') | default('') if weather_entity is string and state_attr(weather_entity, 'precipitation_unit') }}" - precipitation_probability: "{{ state_attr(weather_entity, 'precipitation_probability_unit') | default('%') if weather_entity is string and state_attr(weather_entity, 'precipitation_probability_unit') else '%' }}" - pressure: "{{ state_attr(weather_entity, 'pressure_unit') | default('') if weather_entity is string and state_attr(weather_entity, 'pressure_unit') }}" - #temperature: "{{ state_attr(weather_entity, 'temperature_unit') | default('°') if weather_entity is string and state_attr(weather_entity, 'temperature_unit') else '°' }}" - thunderstorm_probability: "{{ state_attr(weather_entity, 'thunderstorm_probability_unit') | default('%') if weather_entity is string and state_attr(weather_entity, 'thunderstorm_probability_unit') else '%' }}" - uv_index: "{{ state_attr(weather_entity, 'uv_index_unit') | default('') if weather_entity is string and state_attr(weather_entity, 'uv_index_unit') }}" - #visibility: "{{ state_attr(weather_entity, 'visibility_unit') | default('') if weather_entity is string and state_attr(weather_entity, 'visibility_unit') }}" - wind_speed: "{{ state_attr(weather_entity, 'wind_speed_unit') | default('') if weather_entity is string and state_attr(weather_entity, 'wind_speed_unit') }}" - page_name: "{{ trigger.event.data.new_state.state }}" - page_index: "{{ (page_name[-2:] | int(0)) - 1 }}" - - ##### Display relative day ##### - - service: "{{ nextion.commands.text_printf }}" - data: - component: "{{ page_name }}.day" - message: "{{ (dict.values(mui[language].relative_day) | list)[page_index] }}" - continue_on_error: true - - *delay-default - - ##### Display date (long) ##### - - service: "{{ nextion.commands.text_printf }}" - data: - component: "{{ page_name }}.date" - message: "{{ (dict.values(mui[language].weekdays) | list)[(now() + timedelta(days= (page_index))).weekday()] ~ ', ' ~ as_timestamp(now() + timedelta(days= (page_index))) | timestamp_custom(date_format) }}" - continue_on_error: true - - *delay-default - - ##### Display weather data only when available ##### - - variables: - forecast_day: > - {{ state_attr(weather_entity, 'forecast') | default([]) - | selectattr('datetime', 'defined') - | selectattr('datetime', '>=', (today_at('00:00') + timedelta(days= page_index )) | as_timestamp | timestamp_local ) - | selectattr('datetime', '<', (today_at('00:00') + timedelta(days= (page_index+1))) | as_timestamp | timestamp_local ) - | list - }} - - if: "{{ forecast_day | count > 0 or page_index == 0 }}" - then: # Display forecast - - variables: - metnoweather: "{{ weather_type == 'Met.no' }}" - metnoweather_hourly_forecast: "{{ state_attr(weather_entity ~ '_hourly', 'forecast') if metnoweather and states(weather_entity ~ '_hourly') not in ['unavailable', 'unknown', None] }}" - forecast_day: > - {% if forecast_day | count > 0 %}{{ forecast_day }} - {% elif metnoweather and metnoweather_hourly_forecast %} - {{ metnoweather_hourly_forecast - | selectattr('datetime', 'defined') - | selectattr('datetime', '>=', (today_at('00:00') + timedelta(days= page_index )) | as_timestamp | timestamp_local ) - | selectattr('datetime', '<', (today_at('00:00') + timedelta(days= (page_index+1))) | as_timestamp | timestamp_local ) - | list - }} - {% endif %} - - variables: - forecast_day: > - {% if forecast_day | count > 0 %}{{ forecast_day }} - {% elif page_index == 0 %} - [ - { - "condition": "{{ states(weather_entity) }}", - "temperature": "{{ state_attr(weather_entity, 'temperature') }}", - "wind_speed": "{{ state_attr(weather_entity, 'wind_speed') }}" - } - ] - {% endif %} - - if: "{{ forecast_day | count > 0 }}" - then: + ##### NSPanel Buttons ##### - variables: - accuweather: "{{ weather_type == 'AccuWeather' }}" - accuweather_day_name: "{{ 'day_' ~ page_index }}" - accuweather_sensor_prefix: "{{ 'sensor.' ~ (weather_entity | replace('weather.','')) ~ '_' }}" - accuweather_sensor_sufix: "{{ '_' ~ page_index ~ 'd' }}" - temp_min: > - {{ forecast_day | selectattr('templow', 'defined') | map(attribute='templow') | map('float') | list | min - if forecast_day | selectattr('templow', 'defined') | map(attribute='templow') | map('float') | list | count > 0 - else forecast_day | selectattr('temperature', 'defined') | map(attribute='temperature') | map('float') | list | min | default('unknown') - }} - temp_max: "{{ forecast_day | selectattr('temperature', 'defined') | map(attribute='temperature') | map('float') | list | max if forecast_day | selectattr('temperature', 'defined') | map(attribute='temperature') | map('float') | list | count > 0 }}" - condition: "{{ forecast_day | selectattr('condition', 'defined') | map(attribute='condition') | list | first if forecast_day | selectattr('condition', 'defined') | map(attribute='condition') | list | count > 0 }}" - precipitation: "{{ forecast_day | selectattr('precipitation', 'defined') | map(attribute='precipitation') | map('float') | list | sum if forecast_day | selectattr('precipitation', 'defined') | map(attribute='precipitation') | map('float') | list | count > 0 }}" - precipitation_probability: "{{ forecast_day | selectattr('precipitation_probability', 'defined') | map(attribute='precipitation_probability') | map('float') | list | max if forecast_day | selectattr('precipitation_probability', 'defined') | map(attribute='precipitation_probability') | map('float') | list | count > 0 }}" - pressure: "{{ forecast_day | selectattr('pressure', 'defined') | map(attribute='pressure') | map('float') | list | max if forecast_day | selectattr('pressure', 'defined') | map(attribute='pressure') | map('float') | list | count > 0 }}" - wind_speed: "{{ forecast_day | selectattr('wind_speed', 'defined') | map(attribute='wind_speed') | map('float') | list | max if forecast_day | selectattr('wind_speed', 'defined') | map(attribute='wind_speed') | map('float') | list | count > 0 }}" - hours_of_sun: "{{ states(accuweather_sensor_prefix ~ 'hours_of_sun' ~ accuweather_sensor_sufix) | default('unknown') if accuweather else (forecast_day | selectattr('hours_of_sun', 'defined') | map(attribute='hours_of_sun') | map('float') | list | sum if forecast_day | selectattr('hours_of_sun', 'defined') | map(attribute='hours_of_sun') | map('float') | list | count > 0) }}" - uv_index: "{{ states(accuweather_sensor_prefix ~ 'uv_index' ~ accuweather_sensor_sufix) | default('unknown') if accuweather else (forecast_day | selectattr('uv_index', 'defined') | map(attribute='uv_index') | map('float') | list | max if forecast_day | selectattr('uv_index', 'defined') | map(attribute='uv_index') | map('float') | list | count > 0) }}" - thunderstorm_probability: "{{ states(accuweather_sensor_prefix ~ 'thunderstorm_probability_day' ~ accuweather_sensor_sufix) | default('unknown') if accuweather else (forecast_day | selectattr('thunderstorm_probability', 'defined') | map(attribute='thunderstorm_probability') | map('float') | list | max if forecast_day | selectattr('thunderstorm_probability', 'defined') | map(attribute='thunderstorm_probability') | map('float') | list | count > 0) }}" - parameters: - - name: hours_of_sun - visibility: "{{ is_number(hours_of_sun) }}" - value: "{{ (hours_of_sun | round(0) ~ ' ' ~ weather_units.hours_of_sun) if is_number(hours_of_sun) }}" - icon: "{{ nextion.icons.weather.sun }}" - - name: thunderstorm_probability - visibility: "{{ is_number(thunderstorm_probability) }}" - value: "{{ (thunderstorm_probability | round(0) ~ weather_units.thunderstorm_probability) if is_number(thunderstorm_probability) }}" - icon: "{{ nextion.icons.weather.lightning }}" - - name: precipitation - visibility: "{{ is_number(precipitation) or is_number(precipitation_probability) }}" - value: > - {{ (precipitation | round(0) ~ ' ' ~ weather_units.precipitation) if is_number(precipitation) }} - {{ '-' if is_number(precipitation) and is_number(precipitation_probability) }} - {{ (precipitation_probability | round(0) ~ weather_units.precipitation_probability) if is_number(precipitation_probability) }} - icon: "{{ nextion.icons.weather.rain }}" - - name: uv_index - visibility: "{{ is_number(uv_index) }}" - value: > - {{ (state_attr(accuweather_sensor_prefix ~ 'uv_index' ~ accuweather_sensor_sufix, 'level') | default(None) ~ ': ') if weather_type == 'AccuWeather' }} - {{ (uv_index | round(0) ~ weather_units.uv_index) if is_number(uv_index) }} - icon: "{{ nextion.icons.weather.protect }}" - - name: wind_speed - visibility: "{{ is_number(wind_speed) }}" - value: "{{ (wind_speed | round(0) ~ ' ' ~ weather_units.wind_speed) if is_number(wind_speed) }}" - icon: "{{ nextion.icons.weather.wind }}" - - name: pressure - visibility: "{{ is_number(pressure) }}" - value: "{{ (pressure | round(0) ~ ' ' ~ weather_units.pressure) if is_number(pressure) }}" - icon: "{{ nextion.icons.weather.gauge }}" + left_button_state: "{{ states(page_home.hardware.buttons.left.entity) | default('unavailable') if page_home.hardware.buttons.left.entity is string else 'unavailable' }}" + right_button_state: "{{ states(page_home.hardware.buttons.right.entity) | default('unavailable') if page_home.hardware.buttons.right.entity is string else 'unavailable' }}" - ##### Display weather PIC when available - - if: "{{ condition not in ['unknown', None] }}" - then: - - service: "{{ nextion.commands.printf }}" - data: - cmd: "{{ page_name }}.weather_icon.pic={{ nextion.pics.weather[states(weather_entity) | default('unavailable') if weather_entity is string else 'unavailable'] | default(None) if condition == 'unknown' and page_name == nextion.pages.weatherpages[0] else nextion.pics.weather[condition] | default(None) }}" - continue_on_error: true - - *delay-default - - ##### Display temperature min/max when available - - variables: - temperature_string: > - {{ (temp_min | round(0) ~ temperature_units) if is_number(temp_min) }} - {{ '/' if is_number(temp_min) and is_number(temp_max) and temp_min != temp_max }} - {{ (temp_max | round(0) ~ temperature_units) if is_number(temp_max) and temp_min != temp_max }} - - if: "{{ (is_number(temp_min) or is_number(temp_max)) and temperature_string is string and temperature_string | length > 0 }}" + ##### NSPanel Left Button Name ##### + - if: "{{ page_home.hardware.buttons.left.name | length > 0 }}" then: + ### LABEL Font Color ### + - *delay-default + - service: "{{ nextion.commands.font_color }}" + data: + component: home.left_bt_text + message: "{{ page_home.hardware.buttons.left.color_rgb if is_number(page_home.hardware.buttons.left.color_rgb) else ((page_home.hardware.buttons.left.color_rgb[0] //(2**3)) *(2**11))+((page_home.hardware.buttons.left.color_rgb[1] //(2**2)) *(2**5))+(page_home.hardware.buttons.left.color_rgb[2] //(2**3)) }}" + continue_on_error: true + ### LABEL Font ### + - *delay-default - service: "{{ nextion.commands.text_printf }}" data: - component: "{{ page_name }}.temperature" ### Temperature MIN/MAX ### - message: "{{ temperature_string }}" + component: home.left_bt_text + message: "{{ page_home.hardware.buttons.left.name }}" continue_on_error: true - - *delay-default - ##### fields 1 to 5 (Parameters) ##### + ##### SET Left Hardware Button PIC on Home Page #### + - if: "{{ left_button_state not in ['unavailable', 'unknown', None] }}" + then: + - variables: + # Hardware Button PIC + left_hardware_button_state: "{{ nextion.pics.hardware.button[left_button_state] | default(None) }}" + - *delay-default + - service: "{{ nextion.commands.printf }}" + data: + cmd: home.left_bt_pic.pic={{ left_hardware_button_state }} + continue_on_error: true + + ##### NSPanel Right Button Name ##### + - if: "{{ page_home.hardware.buttons.right.name | length > 0 }}" + then: + ### LABEL Font Color ### + - *delay-default + - service: "{{ nextion.commands.font_color }}" + data: + component: home.right_bt_text + message: "{{ page_home.hardware.buttons.right.color_rgb if is_number(page_home.hardware.buttons.right.color_rgb) else ((page_home.hardware.buttons.right.color_rgb[0] //(2**3)) *(2**11))+((page_home.hardware.buttons.right.color_rgb[1] //(2**2)) *(2**5))+(page_home.hardware.buttons.right.color_rgb[2] //(2**3)) }}" + continue_on_error: true + ### LABEL Font ### + - *delay-default + - service: "{{ nextion.commands.text_printf }}" + data: + component: home.right_bt_text + message: "{{ page_home.hardware.buttons.right.name }}" + continue_on_error: true + + ##### SET Right Hardware Button PIC on Home Page ##### + - if: "{{ right_button_state not in ['unavailable', 'unknown', None] }}" + then: + - variables: + # Hardware Button PIC + right_hardware_button_state: "{{ nextion.pics.hardware.button[right_button_state] | default(None) }}" + - *delay-default + - service: "{{ nextion.commands.printf }}" + data: + cmd: home.right_bt_pic.pic={{ right_hardware_button_state }} + continue_on_error: true + + ###### Status bar ###### + - &variables-home_page_status_bar + variables: + thermostat_icon: !input "thermostat_icon" #E50E + heat_icon: !input "heat_icon" #\U0000E50F + climate_state: "{{ states(climate) | default('unavailable') if climate is string else 'unavailable' }}" + climate_action: "{{ state_attr(climate, 'hvac_action') | default('unavailable') if climate is string else 'unavailable' }}" + home_page_status_bar: + - entity: "{{ relay01_entity }}" + icon: !input "relay01_icon" #E3A5 + icon_color_rgb: !input "relay01_icon_color" + page: home + component: icon_top_01 + - entity: "{{ relay02_entity }}" + icon: !input "relay02_icon" #E3A8 + icon_color_rgb: !input "relay02_icon_color" + page: home + component: icon_top_02 + - entity: "{{ climate }}" + icon: "{{ (nextion.icons.all[heat_icon.split(':')[1]] | default(heat_icon if heat_icon is string else '\U0000E2D5') if climate_action == 'heating' else nextion.icons.all[thermostat_icon.split(':')[1]] | default(thermostat_icon if thermostat_icon is string else '\U0000E2D5')) if climate_state == 'heat' else nextion.icons.blank }}" + icon_color_rgb: !input "thermostat_icon_color" + page: home + component: icon_top_03 + - entity: !input "chip01" + icon: !input "chip01_icon" + icon_color_rgb: !input "chip01_icon_color" + page: home + component: icon_top_04 + - entity: !input "chip02" + icon: !input "chip02_icon" + icon_color_rgb: !input "chip02_icon_color" + page: home + component: icon_top_05 + - entity: !input "chip03" + icon: !input "chip03_icon" + icon_color_rgb: !input "chip03_icon_color" + page: home + component: icon_top_06 + - entity: !input "chip04" + icon: !input "chip04_icon" + icon_color_rgb: !input "chip04_icon_color" + page: home + component: icon_top_07 + - entity: !input "chip05" + icon: !input "chip05_icon" + icon_color_rgb: !input "chip05_icon_color" + page: home + component: icon_top_08 + - entity: !input "chip06" + icon: !input "chip06_icon" + icon_color_rgb: !input "chip06_icon_color" + page: home + component: icon_top_09 + - entity: !input "chip07" + icon: !input "chip07_icon" + icon_color_rgb: !input "chip07_icon_color" + page: home + component: icon_top_10 - repeat: - for_each: "{{ (parameters | selectattr('visibility', 'eq', true) | list)[:5] }}" + for_each: "{{ home_page_status_bar }}" sequence: + - &display-home_page_status_bar + if: "{{ repeat.item.entity is defined and repeat.item.entity is string and repeat.item.entity | length > 0 }}" + then: + - variables: + repeat_item_state: "{{ states(repeat.item.entity) | default('unavailable') }}" + repeat_item_state_is_on: "{{ repeat_item_state in ['on', 'open'] }}" + repeat_item_icon: > + {% if repeat_item_state_is_on and repeat.item.icon is string and repeat.item.icon | length > 0 %}{{ nextion.icons.all[repeat.item.icon.split(':')[1]] | default(repeat.item.icon) }} + {% elif repeat_item_state_is_on and state_attr(repeat.item.entity, 'icon') | default('') not in ['unavailable', 'unknown', '', None] %}{{ nextion.icons.all[state_attr(repeat.item.entity, 'icon').split(':')[1]] | default(nextion.icons.blank) }} + {% else %}{{ nextion.icons.blank }} + {% endif %} + - if: "{{ repeat_item_state_is_on }}" + then: + ### ICON Font Color ### + - *delay-default + - service: "{{ nextion.commands.font_color }}" + data: + component: "{{ repeat.item.page }}.{{ repeat.item.component }}" + message: "{{ repeat.item.icon_color_rgb if is_number(repeat.item.icon_color_rgb) else ((repeat.item.icon_color_rgb[0] //(2**3)) *(2**11))+((repeat.item.icon_color_rgb[1] //(2**2)) *(2**5))+(repeat.item.icon_color_rgb[2] //(2**3)) }}" + continue_on_error: true + ### ICON Font ### + - *delay-default + - service: "{{ nextion.commands.text_printf }}" + data: + component: "{{ repeat.item.page }}.{{ repeat.item.component }}" + message: "{{ repeat_item_icon }}" + continue_on_error: true + # {{ is_state(repeat.item.entity, 'on') | default(False) if repeat.item.entity is string else 'unavailable' }} + + ##### HOME VALUE 01 - 03 + - *delay-default + - &variables-home_page_values + variables: + home_page_values: + - entity: !input "home_value01" + icon: !input "home_value01_icon" + icon_color_rgb: !input "home_value01_icon_color" + label_color_rgb: !input "home_value01_label_color" + page: home + component: value01 + - entity: !input "home_value02" + icon: !input "home_value02_icon" + icon_color_rgb: !input "home_value02_icon_color" + label_color_rgb: !input "home_value02_label_color" + page: home + component: value02 + - entity: !input "home_value03" + icon: !input "home_value03_icon" + icon_color_rgb: !input "home_value03_icon_color" + label_color_rgb: !input "home_value03_label_color" + page: home + component: value03 + - repeat: + for_each: "{{ home_page_values }}" + sequence: + - &display-home_page_value + if: "{{ repeat.item.entity is string and repeat.item.entity is match 'sensor.' and states(repeat.item.entity) not in ['unavailable', 'unknown', None] }}" + then: + - if: "{{ repeat.item.icon | length > 0 }}" + then: + ### ICON Font Color ### + - *delay-default + - service: "{{ nextion.commands.font_color }}" + data: + component: "{{ repeat.item.page }}.{{ repeat.item.component }}_icon" + message: "{{ repeat.item.icon_color_rgb if is_number(repeat.item.icon_color_rgb) else ((repeat.item.icon_color_rgb[0] //(2**3)) *(2**11))+((repeat.item.icon_color_rgb[1] //(2**2)) *(2**5))+(repeat.item.icon_color_rgb[2] //(2**3)) }}" + continue_on_error: true + ### ICON Font ### + - *delay-default + - service: "{{ nextion.commands.text_printf }}" + data: + component: "{{ repeat.item.page }}.{{ repeat.item.component }}_icon" + message: "{{ nextion.icons.all[repeat.item.icon.split(':')[1]] | default(repeat.item.icon if repeat.item.icon is string else '\U0000E2D5') }}" + continue_on_error: true + - variables: + repeat_item_state: "{{ states(repeat.item.entity) | default('unavailable') }}" + repeat_item_state_available: "{{ repeat_item_state not in ['unavailable', 'unknown', None] }}" + - if: "{{ repeat_item_state_available }}" + then: + ### LABEL Font Color ### + - *delay-default + - service: "{{ nextion.commands.font_color }}" + data: + component: "{{ repeat.item.page }}.{{ repeat.item.component }}_state" + message: "{{ repeat.item.label_color_rgb if is_number(repeat.item.label_color_rgb) else ((repeat.item.label_color_rgb[0] //(2**3)) *(2**11))+((repeat.item.label_color_rgb[1] //(2**2)) *(2**5))+(repeat.item.label_color_rgb[2] //(2**3)) }}" + continue_on_error: true + ### LABEL Font ### + - *delay-default + - service: "{{ nextion.commands.text_printf }}" + data: + component: "{{ repeat.item.page }}.{{ repeat.item.component }}_state" + message: "{{ (repeat_item_state | round(1) ~ state_attr(repeat.item.entity, 'unit_of_measurement') | default('')) if is_number(repeat_item_state) else repeat_item_state }}" + continue_on_error: true + + ##### Set notify icon ##### + - variables: + notification_unread_state: "{{ states(notification_unread) | default('unavailable') if notification_unread is string else 'unavailable' }}" + - if: "{{ notification_unread_state in ['on', 'off'] }}" + then: + - variables: + notification_text_state: "{{ states(notification_text) | default(None) if notification_text is string else None }}" + set_button04_icon: "{{ nextion.icons.all[page_home.buttons[3].icon.split(':')[1]] | default(page_home.buttons[3].icon if page_home.buttons[3].icon is string else '\U0000E2D5') if notification_unread_state == 'on' and notification_text_state | length > 0 else nextion.icons.blank }}" + set_button04_icon_font: "{{ (page_home.buttons[3].color_rgb[notification_unread_state] if is_number(page_home.buttons[3].color_rgb[notification_unread_state]) else ((page_home.buttons[3].color_rgb[notification_unread_state][0] //(2**3)) *(2**11))+((page_home.buttons[3].color_rgb[notification_unread_state][1] //(2**2)) *(2**5))+(page_home.buttons[3].color_rgb[notification_unread_state][2] //(2**3))) if notification_unread_state in ['on', 'off'] and notification_text_state | length > 0 else nextion.colors.grey_light }}" + ##### SET ICON Font - Notify ##### + - *delay-default - service: "{{ nextion.commands.text_printf }}" data: - component: "{{ page_name }}.value0{{ repeat.index }}" - message: "{{ repeat.item.value }}" + component: home.button04_icon + message: "{{ set_button04_icon }}" + continue_on_error: true + + ##### SET ICON Font Color - Notify ##### + - *delay-default + - service: "{{ nextion.commands.font_color }}" + data: + component: home.button04_icon + message: "{{ set_button04_icon_font }}" + continue_on_error: true + + ###### QR Code - Icon ###### + - *delay-default + - if: "{{ qrcode_enabled == true }}" + then: # Display QR code icon + ### ICON Font Color ### + - service: "{{ nextion.commands.font_color }}" + data: + component: home.button05_icon + message: "{{ page_home.buttons[4].color_rgb.on if is_number(page_home.buttons[4].color_rgb.on) else ((page_home.buttons[4].color_rgb.on[0] //(2**3)) *(2**11))+((page_home.buttons[4].color_rgb.on[1] //(2**2)) *(2**5))+(page_home.buttons[4].color_rgb.on[2] //(2**3)) }}" + continue_on_error: true + ### ICON Font ### + - *delay-default + - service: "{{ nextion.commands.text_printf }}" + data: + component: home.button05_icon + message: "{{ nextion.icons.all[page_home.buttons[4].icon.split(':')[1]] | default(page_home.buttons[4].icon if page_home.buttons[4].icon is string else '\U0000E2D5') }}" + continue_on_error: true + else: # Display blank icon + - service: "{{ nextion.commands.text_printf }}" + data: + component: home.button05_icon + message: "{{ nextion.icons.blank }}" + continue_on_error: true + + ###### ENTITIES - Icon ###### + - *delay-default + - if: "{{ entitypages_enabled }}" + then: # Display entities icon + ### ICON Font Color ### + - service: "{{ nextion.commands.font_color }}" + data: + component: home.button06_icon + message: "{{ page_home.buttons[5].color_rgb.on if is_number(page_home.buttons[5].color_rgb.on) else ((page_home.buttons[5].color_rgb.on[0] //(2**3)) *(2**11))+((page_home.buttons[5].color_rgb.on[1] //(2**2)) *(2**5))+(page_home.buttons[5].color_rgb.on[2] //(2**3)) }}" + continue_on_error: true + ### ICON Font ### + - *delay-default + - service: "{{ nextion.commands.text_printf }}" + data: + component: home.button06_icon + message: "{{ nextion.icons.all[page_home.buttons[5].icon.split(':')[1]] | default(page_home.buttons[5].icon if page_home.buttons[5].icon is string else '\U0000E2D5') }}" + continue_on_error: true + else: # Display blank icon + - service: "{{ nextion.commands.text_printf }}" + data: + component: home.button06_icon + message: "{{ nextion.icons.blank }}" + continue_on_error: true + + ###### SHOW All component when page loading done ##### + - *delay-default + - service: "{{ nextion.commands.show_all }}" + continue_on_error: true + + ## BUTTON PAGES 01 - 04 ## + - alias: Button pages + conditions: "{{ nspanel_event.page in nextion.pages.buttonpages }}" + sequence: &refresh_page_buttonpage + - &variables-page_buttons + variables: + button_page_index: "{{ (nspanel_event.page[-2:] | int(-1)) - 1 }}" + first_button: "{{ button_page_index * 8 }}" + last_button: "{{ first_button + 8 }}" + ##### BUTTON Page Labels ##### + button_pages_labels: + - label: !input button_page01_label + - label: !input button_page02_label + - label: !input button_page03_label + - label: !input button_page04_label + ##### BUTTONS Page - Buttons 1 - 32 ##### + button_pages_buttons: + - entity: !input "entity01" + name: !input "entity01_name" + icon: !input "entity01_icon" + icon_color_rgb: !input "entity01_icon_color" + confirm: !input "entity01_confirm" + page: buttonpage01 + component: button01 + - entity: !input "entity02" + name: !input "entity02_name" + icon: !input "entity02_icon" + icon_color_rgb: !input "entity02_icon_color" + confirm: !input "entity02_confirm" + page: buttonpage01 + component: button02 + - entity: !input "entity03" + name: !input "entity03_name" + icon: !input "entity03_icon" + icon_color_rgb: !input "entity03_icon_color" + confirm: !input "entity03_confirm" + page: buttonpage01 + component: button03 + - entity: !input "entity04" + name: !input "entity04_name" + icon: !input "entity04_icon" + icon_color_rgb: !input "entity04_icon_color" + confirm: !input "entity04_confirm" + page: buttonpage01 + component: button04 + - entity: !input "entity05" + name: !input "entity05_name" + icon: !input "entity05_icon" + icon_color_rgb: !input "entity05_icon_color" + confirm: !input "entity05_confirm" + page: buttonpage01 + component: button05 + - entity: !input "entity06" + name: !input "entity06_name" + icon: !input "entity06_icon" + icon_color_rgb: !input "entity06_icon_color" + confirm: !input "entity06_confirm" + page: buttonpage01 + component: button06 + - entity: !input "entity07" + name: !input "entity07_name" + icon: !input "entity07_icon" + icon_color_rgb: !input "entity07_icon_color" + confirm: !input "entity07_confirm" + page: buttonpage01 + component: button07 + - entity: !input "entity08" + name: !input "entity08_name" + icon: !input "entity08_icon" + icon_color_rgb: !input "entity08_icon_color" + confirm: !input "entity08_confirm" + page: buttonpage01 + component: button08 + - entity: !input "entity09" + name: !input "entity09_name" + icon: !input "entity09_icon" + icon_color_rgb: !input "entity09_icon_color" + confirm: !input "entity09_confirm" + page: buttonpage02 + component: button01 + - entity: !input "entity10" + name: !input "entity10_name" + icon: !input "entity10_icon" + icon_color_rgb: !input "entity10_icon_color" + confirm: !input "entity10_confirm" + page: buttonpage02 + component: button02 + - entity: !input "entity11" + name: !input "entity11_name" + icon: !input "entity11_icon" + icon_color_rgb: !input "entity11_icon_color" + confirm: !input "entity11_confirm" + page: buttonpage02 + component: button03 + - entity: !input "entity12" + name: !input "entity12_name" + icon: !input "entity12_icon" + icon_color_rgb: !input "entity12_icon_color" + confirm: !input "entity12_confirm" + page: buttonpage02 + component: button04 + - entity: !input "entity13" + name: !input "entity13_name" + icon: !input "entity13_icon" + icon_color_rgb: !input "entity13_icon_color" + confirm: !input "entity13_confirm" + page: buttonpage02 + component: button05 + - entity: !input "entity14" + name: !input "entity14_name" + icon: !input "entity14_icon" + icon_color_rgb: !input "entity14_icon_color" + confirm: !input "entity14_confirm" + page: buttonpage02 + component: button06 + - entity: !input "entity15" + name: !input "entity15_name" + icon: !input "entity15_icon" + icon_color_rgb: !input "entity15_icon_color" + confirm: !input "entity15_confirm" + page: buttonpage02 + component: button07 + - entity: !input "entity16" + name: !input "entity16_name" + icon: !input "entity16_icon" + icon_color_rgb: !input "entity16_icon_color" + confirm: !input "entity16_confirm" + page: buttonpage02 + component: button08 + - entity: !input "entity17" + name: !input "entity17_name" + icon: !input "entity17_icon" + icon_color_rgb: !input "entity17_icon_color" + confirm: !input "entity17_confirm" + page: buttonpage03 + component: button01 + - entity: !input "entity18" + name: !input "entity18_name" + icon: !input "entity18_icon" + icon_color_rgb: !input "entity18_icon_color" + confirm: !input "entity18_confirm" + page: buttonpage03 + component: button02 + - entity: !input "entity19" + name: !input "entity19_name" + icon: !input "entity19_icon" + icon_color_rgb: !input "entity19_icon_color" + confirm: !input "entity19_confirm" + page: buttonpage03 + component: button03 + - entity: !input "entity20" + name: !input "entity20_name" + icon: !input "entity20_icon" + icon_color_rgb: !input "entity20_icon_color" + confirm: !input "entity20_confirm" + page: buttonpage03 + component: button04 + - entity: !input "entity21" + name: !input "entity21_name" + icon: !input "entity21_icon" + icon_color_rgb: !input "entity21_icon_color" + confirm: !input "entity21_confirm" + page: buttonpage03 + component: button05 + - entity: !input "entity22" + name: !input "entity22_name" + icon: !input "entity22_icon" + icon_color_rgb: !input "entity22_icon_color" + confirm: !input "entity22_confirm" + page: buttonpage03 + component: button06 + - entity: !input "entity23" + name: !input "entity23_name" + icon: !input "entity23_icon" + icon_color_rgb: !input "entity23_icon_color" + confirm: !input "entity23_confirm" + page: buttonpage03 + component: button07 + - entity: !input "entity24" + name: !input "entity24_name" + icon: !input "entity24_icon" + icon_color_rgb: !input "entity24_icon_color" + confirm: !input "entity24_confirm" + page: buttonpage03 + component: button08 + - entity: !input "entity25" + name: !input "entity25_name" + icon: !input "entity25_icon" + icon_color_rgb: !input "entity25_icon_color" + confirm: !input "entity25_confirm" + page: buttonpage04 + component: button01 + - entity: !input "entity26" + name: !input "entity26_name" + icon: !input "entity26_icon" + icon_color_rgb: !input "entity26_icon_color" + confirm: !input "entity26_confirm" + page: buttonpage04 + component: button02 + - entity: !input "entity27" + name: !input "entity27_name" + icon: !input "entity27_icon" + icon_color_rgb: !input "entity27_icon_color" + confirm: !input "entity27_confirm" + page: buttonpage04 + component: button03 + - entity: !input "entity28" + name: !input "entity28_name" + icon: !input "entity28_icon" + icon_color_rgb: !input "entity28_icon_color" + confirm: !input "entity28_confirm" + page: buttonpage04 + component: button04 + - entity: !input "entity29" + name: !input "entity29_name" + icon: !input "entity29_icon" + icon_color_rgb: !input "entity29_icon_color" + confirm: !input "entity29_confirm" + page: buttonpage04 + component: button05 + - entity: !input "entity30" + name: !input "entity30_name" + icon: !input "entity30_icon" + icon_color_rgb: !input "entity30_icon_color" + confirm: !input "entity30_confirm" + page: buttonpage04 + component: button06 + - entity: !input "entity31" + name: !input "entity31_name" + icon: !input "entity31_icon" + icon_color_rgb: !input "entity31_icon_color" + confirm: !input "entity31_confirm" + page: buttonpage04 + component: button07 + - entity: !input "entity32" + name: !input "entity32_name" + icon: !input "entity32_icon" + icon_color_rgb: !input "entity32_icon_color" + confirm: !input "entity32_confirm" + page: buttonpage04 + component: button08 + - if: "{{ button_page_index >= 0 and button_page_index <= 3 }}" + then: + - service: "{{ nextion.commands.set_settings_entity }}" + data: + entity: "{{ nspanel_event }}" + continue_on_error: true + ##### Button Page Label ##### + - if: "{{ button_pages_labels[button_page_index].label | length > 0 }}" + then: + - service: "{{ nextion.commands.text_printf }}" + data: + component: "{{ 'bpage%02d_label' | format(button_page_index+1) }}" + message: "{{ button_pages_labels[button_page_index].label }}" + continue_on_error: true + + ##### NSPanel build Button page ##### + - repeat: + for_each: "{{ button_pages_buttons[first_button:last_button] }}" + sequence: &display-button_page_button + - if: "{{ repeat.item.entity is string and repeat.item.entity | length > 0 and repeat.item.entity.split('.') | default([]) | count > 0 }}" + then: + - variables: + item_domain: "{{ repeat.item.entity.split('.')[0] | default('unknown') }}" + # {{ states(entity_id) | default('unavailable') if entity_id is string else 'unavailable' }} + current_entity_state: "{{ states(repeat.item.entity) | default('unavailable') }}" + current_entity_state_available: "{{ current_entity_state not in ['unavailable'] }}" + # Button PIC GRAY/WHITE + btn_pic: "{{ nextion.pics.button.on if current_entity_state in ['on', 'open', 'opening', 'home'] or (item_domain == 'climate' and current_entity_state != 'off') else nextion.pics.button.off }}" + # TEXT, BRIGHTNESS and ICON Background + btn_bg: "{{ nextion.colors.white if current_entity_state in ['on', 'open', 'opening', 'home'] or (item_domain == 'climate' and current_entity_state != 'off') else nextion.colors.grey_dark }}" + # ICON Font Color + btn_icon_font: > + {% if not current_entity_state_available %} {{ nextion.colors.red }} + {% elif item_domain in ['button', 'input_button', 'scene'] or current_entity_state in ['off', 'closed', 'closing'] or (item_domain == 'person' and current_entity_state != 'home') %} {{ nextion.colors.grey_light }} + {% elif current_entity_state in ['on', 'open', 'opening', 'home'] or (item_domain == 'climate' and current_entity_state != 'off') %} {{ repeat.item.icon_color_rgb if is_number(repeat.item.icon_color_rgb) else ((repeat.item.icon_color_rgb[0] //(2**3)) *(2**11))+((repeat.item.icon_color_rgb[1] //(2**2)) *(2**5))+(repeat.item.icon_color_rgb[2] //(2**3)) }} + {% else %} {{ nextion.colors.red }} + {% endif %} + # LABEL Font Color + btn_txt_font: >- + {% if not current_entity_state_available %} {{ nextion.colors.white }} + {% elif item_domain in ['button', 'input_button', 'scene'] or current_entity_state in ['off', 'closed', 'closing'] or (item_domain == 'person' and current_entity_state != 'home') %} {{ nextion.colors.white }} + {% elif current_entity_state in ['on', 'open', 'opening', 'home'] or (item_domain == 'climate' and current_entity_state != 'off') %} {{ nextion.colors.grey_dark }} + {% else %} {{ nextion.colors.white }} + {% endif %} + # BRIGHTNESS Font Color + btn_bri_font: "{{ btn_txt_font }}" #"{{ nextion.colors.grey_dark }}" + # ICON Value + btn_icon: > + {% if not current_entity_state_available %} {{ nextion.icons.buttons.unknown }} + {% elif repeat.item.icon | length > 0 %} {{ nextion.icons.all[repeat.item.icon.split(':')[1]] | default(repeat.item.icon if repeat.item.icon is string else '\U0000E2D5') }} + {% elif repeat.item.entity and repeat.item.entity.split('.') | count > 1 %} {{ nextion.icons.buttons[repeat.item.entity.split('.')[0] if repeat.item.entity else 'unknown'] }} + {% else %} {{ nextion.icons.buttons.unknown }} + {% endif %} + # LABEL Value + btn_label: "{{ repeat.item.name }}" + # BRIGHTNESS Value + btn_bri_txt: >- + {% if not current_entity_state_available %} 0 + {% elif item_domain == 'light' and current_entity_state == 'on' and state_attr(repeat.item.entity, 'brightness') != None %} {{ (state_attr(repeat.item.entity, 'brightness') | int * 100 /255) | round(0) }}% + {% elif item_domain == 'cover' and current_entity_state in ['open', 'opening', 'closing'] and state_attr(repeat.item.entity, 'current_position') != None %} {{ (state_attr(repeat.item.entity, 'current_position') | int(100)) | round(0) }}% + {% elif item_domain == 'climate' and current_entity_state != 'off' and state_attr(repeat.item.entity, "current_temperature") != None %} {{ (state_attr(repeat.item.entity, "current_temperature") | float) | round(0) }}{{ temperature_units }} + {% else -%} 0 + {% endif -%} + - *delay-default + - service: "{{ nextion.commands.set_button }}" + data: + btn_id: "{{ repeat.item.page }}.{{ repeat.item.component }}" + btn_pic: "{{ btn_pic }}" + btn_bg: "{{ btn_bg }}" + btn_icon_font: "{{ btn_icon_font }}" + btn_txt_font: "{{ btn_txt_font }}" + btn_bri_font: "{{ btn_bri_font }}" + btn_icon: "{{ btn_icon }}" + btn_label: "{{ btn_label }}" + btn_bri_txt: "{{ btn_bri_txt }}" + continue_on_error: true + ###### SHOW All component when page loading done ##### + - *delay-default + - service: "{{ nextion.commands.show_all }}" + continue_on_error: true + + + ## PAGE LIGHTSETTINGS ## + - alias: Light settings page + conditions: "{{ nspanel_event.page == nextion.pages.light }}" + sequence: + - *variables-settings_entity + - if: "{{ settings_entity_domain == 'light' }}" + then: + - service: "{{ nextion.commands.text_printf }}" + data: + component: lightsettings.light_name + message: "{{ settings_entity_dict.name if settings_entity_dict.name is defined and settings_entity_dict.name is string and settings_entity_dict.name | length > 0 else state_attr(settings_entity_dict.entity, 'friendly_name') if state_attr(settings_entity_dict.entity, 'friendly_name') | length > 0 else ('Light' ~ (': ' ~ settings_entity_dict.component) if settings_entity_dict.component is string and settings_entity_dict.component | length > 0) }}" + continue_on_error: true + ##### LIGHT ICON - ON / OFF ##### + - *delay-default + - service: "{{ nextion.commands.text_printf }}" + data: + component: lightsettings.icon_state + message: "{{ nextion.icons.all[settings_entity_dict.icon.split(':')[1]] | default(settings_entity_dict.icon if settings_entity_dict.icon is defined and settings_entity_dict.icon is string else nextion.icons.buttons.light) if settings_entity_dict.icon not in ['unavailable', 'unknown', None] and settings_entity_dict.icon | length > 0 else nextion.icons.buttons.light }}" + continue_on_error: true + - *delay-default + - service: "{{ nextion.commands.font_color }}" + data: + component: lightsettings.icon_state + message: "{{ (settings_entity_dict.icon_color_rgb if is_number(settings_entity_dict.icon_color_rgb) else ((settings_entity_dict.icon_color_rgb[0] //(2**3)) *(2**11))+((settings_entity_dict.icon_color_rgb[1] //(2**2)) *(2**5))+(settings_entity_dict.icon_color_rgb[2] //(2**3))) if is_state(settings_entity_dict.entity, 'on') else nextion.colors.grey_light }}" + continue_on_error: true + ##### LIGHT State ##### + - *delay-default + - if: "{{ state_attr(settings_entity_dict.entity, 'brightness') != none }}" + then: + - service: "{{ nextion.commands.value }}" + data: + component: lightsettings.lightslider + message: "{{ (state_attr(settings_entity_dict.entity, 'brightness') | int * 100 / 255) | round(0) }}" + continue_on_error: true + - *delay-default + - service: "{{ nextion.commands.text_printf }}" + data: + component: lightsettings.light_value + message: "{{ (state_attr(settings_entity_dict.entity, 'brightness') | int * 100 / 255) | round(0) }}%" + continue_on_error: true + - *delay-default + - service: "{{ nextion.commands.text_printf }}" + data: + component: lightsettings.light_value_2 + message: "{{ (state_attr(settings_entity_dict.entity, 'brightness') | int * 100 /255) | round(0) }}%" + continue_on_error: true + else: + - service: "{{ nextion.commands.value }}" + data: + component: lightsettings.lightslider + message: '0' + continue_on_error: true + - *delay-default + - service: "{{ nextion.commands.text_printf }}" + data: + component: lightsettings.light_value + message: '0 %' + continue_on_error: true + - *delay-default + - service: "{{ nextion.commands.text_printf }}" + data: + component: lightsettings.light_value_2 + message: '0 %' + continue_on_error: true + + ##### LIGHT Check Color_Temp Value is available when yes send some current Values ##### + - if: "{{ state_attr(settings_entity_dict.entity, 'color_temp') != none }}" + then: + - *delay-default + - service: "{{ nextion.commands.text_printf }}" + data: + component: lightsettings.temp_value + message: "{{ (state_attr(settings_entity_dict.entity, 'color_temp') | int ) | round(0) }}" + continue_on_error: true + - *delay-default + - service: "{{ nextion.commands.text_printf }}" + data: + component: lightsettings.temp_value_2 + message: "{{ (state_attr(settings_entity_dict.entity, 'color_temp') | int ) | round(0) }}" + continue_on_error: true + - *delay-default + - service: "{{ nextion.commands.value }}" + data: + component: lightsettings.tempslider + message: "{{ (state_attr(settings_entity_dict.entity, 'color_temp') | int ) | round(0) }}" + continue_on_error: true + + ## PAGE COVERSETTINGS ## + - alias: Cover settings page + conditions: "{{ nspanel_event.page == nextion.pages.cover }}" + sequence: + ##### COVER - OPEN / CLOSE ##### + - *variables-settings_entity + - if: "{{ settings_entity_domain == 'cover' }}" + then: + - *delay-default + - service: "{{ nextion.commands.text_printf }}" + data: + component: coversettings.icon_state + message: "{{ nextion.icons.all[settings_entity_dict.icon.split(':')[1]] | default(settings_entity_dict.icon if settings_entity_dict.icon is defined and settings_entity_dict.icon is string else nextion.icons.buttons.cover) if settings_entity_dict.icon not in ['unavailable', 'unknown', None] and settings_entity_dict.icon | length > 0 else nextion.icons.buttons.cover }}" + continue_on_error: true + - *delay-default + - service: "{{ nextion.commands.font_color }}" + data: + component: coversettings.icon_state + message: "{{ (settings_entity_dict.icon_color_rgb if is_number(settings_entity_dict.icon_color_rgb) else ((settings_entity_dict.icon_color_rgb[0] //(2**3)) *(2**11))+((settings_entity_dict.icon_color_rgb[1] //(2**2)) *(2**5))+(settings_entity_dict.icon_color_rgb[2] //(2**3))) if states(settings_entity_dict.entity) in ['open', 'opening'] else nextion.colors.grey_light }}" continue_on_error: true - *delay-default - service: "{{ nextion.commands.text_printf }}" data: - component: "{{ page_name }}.value0{{ repeat.index }}_icon" - message: "{{ repeat.item.icon }}" + component: coversettings.cover_name + message: "{{ settings_entity_dict.entity }}" + continue_on_error: true + + ##### COVER State + - service: "{{ nextion.commands.value }}" + data: + component: coversettings.coverslider + message: "{{ (state_attr(settings_entity_dict.entity, 'current_position') | int ) | round(0) }}" continue_on_error: true - *delay-default - else: &forecast_unavailable + - service: "{{ nextion.commands.text_printf }}" + data: + component: coversettings.cover_value + message: "{{ (state_attr(settings_entity_dict.entity, 'current_position') | int ) | round(0) }} %" + continue_on_error: true + + ##### COVER Battery ICON Yes / NO ##### + - variables: + battery_level: > + {% if state_attr(settings_entity_dict.entity, 'battery') | default('unavailable') not in ['unavailable', 'unknown', None] %} + {{ state_attr(settings_entity_dict.entity, 'battery') | default('unavailable') }} + {% elif expand(device_entities(device_id(settings_entity_dict.entity))) | selectattr('attributes.device_class', 'defined') | selectattr('attributes.device_class', 'eq', 'battery') | map(attribute='state') | map('float') | list | count > 0 %} + {{ expand(device_entities(device_id(settings_entity_dict.entity))) | selectattr('attributes.device_class', 'defined') | selectattr('attributes.device_class', 'eq', 'battery') | map(attribute='state') | map('float') | list | first }} + {% elif states(settings_entity_dict.entity | replace('cover.','sensor.') ~ '_battery') | default('unavailable') not in ['unavailable', 'unknown', None] %} + {{ states(settings_entity_dict.entity | replace('cover.','sensor.') ~ '_battery') | default('unavailable') }} + {% elif states(settings_entity_dict.entity | replace('cover.','sensor.') | replace('cover', 'battery')) | default('unavailable') not in ['unavailable', 'unknown', None] %} + {{ states(settings_entity_dict.entity | replace('cover.','sensor.') | replace('cover', 'battery')) | default('unavailable') }} + {% else %} unavailable + {% endif %} + - if: "{{ is_number(battery_level) }}" + then: + - *delay-default + - service: "{{ nextion.commands.text_printf }}" + data: + component: coversettings.battery_value + message: "{{ battery_level | round(0) }} %" + continue_on_error: true + ### ICON Battery Font Color ### + - *delay-default + - service: "{{ nextion.commands.font_color }}" + data: + component: coversettings.battery_icon + message: "{{ nextion.colors.grey_super_light }}" + continue_on_error: true + ### ICON Battery Font ### + - *delay-default + - service: "{{ nextion.commands.text_printf }}" + data: + component: coversettings.battery_icon + message: "{{ nextion.icons.battery }}" + continue_on_error: true + + ## PAGE CLIMATE ## + - alias: Climate page + conditions: "{{ nspanel_event.page == nextion.pages.climate }}" + sequence: + - *variables-settings_entity + - variables: + settings_entity_dict: > + {% if settings_entity_dict.entity is not defined and settings_entity_dict.page == nextion.pages.home and settings_entity_dict.component == "climate" %} + { + "page": "{{ settings_entity_dict.page }}", + "entity": "{{ climate }}", + "name": "{{ state_attr(climate, 'friendly_name') | default(mui[language].no_name) if climate is string and state_attr(climate, 'friendly_name') is string and state_attr(climate, 'friendly_name') | length > 0 else climate }}" + } + {% else %}{{ settings_entity_dict }} + {% endif %} + settings_entity_domain: "{{ settings_entity_dict.entity.split('.')[0] if settings_entity_dict.entity is defined and settings_entity_dict.entity is string and settings_entity_dict.entity.split('.') | count > 0 else 'unknown' }}" + - condition: "{{ settings_entity_domain == 'climate' }}" + - variables: + hvac_mode: "{{ states(settings_entity_dict.entity) | default('unavailable') if settings_entity_dict.entity is string else 'unavailable' }}" + outdoor_temp_state: "{{ states(outdoortemp) | default('unavailable') if outdoortemp is string else 'unavailable' }}" + outdoor_temp: "{{ outdoor_temp_state if is_number(outdoor_temp_state) else state_attr(weather_entity, 'temperature') | default('unavailable') if weather_entity is string else 'unavailable' }}" + heating_state: "{{ mui[language].climate.states.off if hvac_mode == 'off' else mui[language].climate.states.on }}" - service: "{{ nextion.commands.text_printf }}" data: - component: "{{ page_name }}.value01" - message: "{{ mui[language].unavailable }}" + component: climate.climate_label + message: "{{ settings_entity_dict.name }}" continue_on_error: true - *delay-default - else: *forecast_unavailable + - service: "{{ nextion.commands.text_printf }}" + data: + component: outdoor_temp + message: "{{ (outdoor_temp | round(1) ~ temperature_units) if is_number(outdoor_temp) else (mui[language].unavailable if outdoor_temp in ['unavailable', 'unknown', None] else outdoor_temp) }}" + continue_on_error: true - ## PAGE NOTIFICATION ## - - alias: Notification page - conditions: "{{ trigger.event.data.new_state.state == nextion.pages.notification }}" + - service: "{{ nextion.commands.text_printf }}" + data: + component: current_temp + message: "{{ (state_attr(settings_entity_dict.entity, 'current_temperature') | round(1) ~ temperature_units) if is_number(state_attr(settings_entity_dict.entity, 'current_temperature')) else '' }}" # mui[language].unavailable? + continue_on_error: true + - if: "{{ hvac_mode != 'off' and is_number(state_attr(settings_entity_dict.entity, 'temperature')) }}" + then: + - variables: + target_temp: "{{state_attr(settings_entity_dict.entity, 'temperature') | round(1)}}" + - service: "{{ nextion.commands.thermostat_cycle }}" + data: + value: "{{ target_temp }}" + continue_on_error: true + else: + - service: "{{ nextion.commands.thermostat_cycle }}" + data: + value: "0" + continue_on_error: true + - service: "{{ nextion.commands.text_printf }}" + data: + component: target_temp + message: " " + continue_on_error: true + - service: "{{ nextion.commands.text_printf }}" + data: + component: heating_state + message: "{{ heating_state }}" + continue_on_error: true + + # HVAC Button PIC + - variables: + heating_bt_pic: "{{ nextion.pics.heating.button.off if hvac_mode == 'off' else nextion.pics.heating.button.on }}" + - *delay-default + - service: "{{ nextion.commands.printf }}" + data: + cmd: heating_bt_pic.pic={{ heating_bt_pic }} + continue_on_error: true + - variables: + hotwatercharge_state: "{{ states(hotwatercharge) | default('unavailable') if hotwatercharge is string else 'unavailable' }}" + hotwatertemp_state: "{{ states(hotwatertemp) | default('unavailable') if hotwatertemp is string else 'unavailable' }}" + hotw_bt_pic: "{{ nextion.pics.hvac.button[hotwatercharge_state] | default(nextion.pics.hvac.button.blank) if hotwatercharge_state not in ['unavailable', 'unknown', None] else nextion.pics.hvac.button.blank }}" + - *delay-default + - service: "{{ nextion.commands.printf }}" + data: + cmd: hotw_bt_pic.pic={{ hotw_bt_pic }} + continue_on_error: true + - if: "{{ hotwatertemp_state not in ['unavailable', 'unknown', None] }}" + then: + - *delay-default + - service: "{{ nextion.commands.text_printf }}" + data: + component: climate.hotwater_temp + message: "{{ (hotwatertemp_state | round(1) ~ temperature_units) if is_number(hotwatertemp_state) else hotwatertemp_state }}" + continue_on_error: true + + ## ENTITY PAGES 01 - 04 ## + - alias: Entity pages + conditions: "{{ nspanel_event.page in nextion.pages.entitypages }}" + sequence: &refresh-entity_pages + - &variables-entity_pages + variables: + ##### Entity pages ##### + entity_pages_labels: + - label: !input "entity_page01_label" + - label: !input "entity_page02_label" + - label: !input "entity_page03_label" + - label: !input "entity_page04_label" + entity_pages_entities: + - entity: !input "entities_entity01" + name: !input "entities_entity01_name" + icon: !input "entities_entity01_icon" + page: entitypage01 + component: value01 + - entity: !input "entities_entity02" + name: !input "entities_entity02_name" + icon: !input "entities_entity02_icon" + page: entitypage01 + component: value02 + - entity: !input "entities_entity03" + name: !input "entities_entity03_name" + icon: !input "entities_entity03_icon" + page: entitypage01 + component: value03 + - entity: !input "entities_entity04" + name: !input "entities_entity04_name" + icon: !input "entities_entity04_icon" + page: entitypage01 + component: value04 + - entity: !input "entities_entity05" + name: !input "entities_entity05_name" + icon: !input "entities_entity05_icon" + page: entitypage01 + component: value05 + - entity: !input "entities_entity06" + name: !input "entities_entity06_name" + icon: !input "entities_entity06_icon" + page: entitypage01 + component: value06 + - entity: !input "entities_entity07" + name: !input "entities_entity07_name" + icon: !input "entities_entity07_icon" + page: entitypage01 + component: value07 + - entity: !input "entities_entity08" + name: !input "entities_entity08_name" + icon: !input "entities_entity08_icon" + page: entitypage01 + component: value08 + - entity: !input "entities_entity09" + name: !input "entities_entity09_name" + icon: !input "entities_entity09_icon" + page: entitypage02 + component: value01 + - entity: !input "entities_entity10" + name: !input "entities_entity10_name" + icon: !input "entities_entity10_icon" + page: entitypage02 + component: value02 + - entity: !input "entities_entity11" + name: !input "entities_entity11_name" + icon: !input "entities_entity11_icon" + page: entitypage02 + component: value03 + - entity: !input "entities_entity12" + name: !input "entities_entity12_name" + icon: !input "entities_entity12_icon" + page: entitypage02 + component: value04 + - entity: !input "entities_entity13" + name: !input "entities_entity13_name" + icon: !input "entities_entity13_icon" + page: entitypage02 + component: value05 + - entity: !input "entities_entity14" + name: !input "entities_entity14_name" + icon: !input "entities_entity14_icon" + page: entitypage02 + component: value06 + - entity: !input "entities_entity15" + name: !input "entities_entity15_name" + icon: !input "entities_entity15_icon" + page: entitypage02 + component: value07 + - entity: !input "entities_entity16" + name: !input "entities_entity16_name" + icon: !input "entities_entity16_icon" + page: entitypage02 + component: value08 + - entity: !input "entities_entity17" + name: !input "entities_entity17_name" + icon: !input "entities_entity17_icon" + page: entitypage03 + component: value01 + - entity: !input "entities_entity18" + name: !input "entities_entity18_name" + icon: !input "entities_entity18_icon" + page: entitypage03 + component: value02 + - entity: !input "entities_entity19" + name: !input "entities_entity19_name" + icon: !input "entities_entity19_icon" + page: entitypage03 + component: value03 + - entity: !input "entities_entity20" + name: !input "entities_entity20_name" + icon: !input "entities_entity20_icon" + page: entitypage03 + component: value04 + - entity: !input "entities_entity21" + name: !input "entities_entity21_name" + icon: !input "entities_entity21_icon" + page: entitypage03 + component: value05 + - entity: !input "entities_entity22" + name: !input "entities_entity22_name" + icon: !input "entities_entity22_icon" + page: entitypage03 + component: value06 + - entity: !input "entities_entity23" + name: !input "entities_entity23_name" + icon: !input "entities_entity23_icon" + page: entitypage03 + component: value07 + - entity: !input "entities_entity24" + name: !input "entities_entity24_name" + icon: !input "entities_entity24_icon" + page: entitypage03 + component: value08 + - entity: !input "entities_entity25" + name: !input "entities_entity25_name" + icon: !input "entities_entity25_icon" + page: entitypage04 + component: value01 + - entity: !input "entities_entity26" + name: !input "entities_entity26_name" + icon: !input "entities_entity26_icon" + page: entitypage04 + component: value02 + - entity: !input "entities_entity27" + name: !input "entities_entity27_name" + icon: !input "entities_entity27_icon" + page: entitypage04 + component: value03 + - entity: !input "entities_entity28" + name: !input "entities_entity28_name" + icon: !input "entities_entity28_icon" + page: entitypage04 + component: value04 + - entity: !input "entities_entity29" + name: !input "entities_entity29_name" + icon: !input "entities_entity29_icon" + page: entitypage04 + component: value05 + - entity: !input "entities_entity30" + name: !input "entities_entity30_name" + icon: !input "entities_entity30_icon" + page: entitypage04 + component: value06 + - entity: !input "entities_entity31" + name: !input "entities_entity31_name" + icon: !input "entities_entity31_icon" + page: entitypage04 + component: value07 + - entity: !input "entities_entity32" + name: !input "entities_entity32_name" + icon: !input "entities_entity32_icon" + page: entitypage04 + component: value08 + - variables: + entity_page_index: "{{ (nspanel_event.page[-2:] | int(-1)) - 1 }}" + first_entity: "{{ entity_page_index * 8 }}" + last_entity: "{{ first_entity + 8 }}" + ##### Entity page - Label ##### + - if: "{{ entity_pages_labels[entity_page_index].label | length > 0 }}" + then: + - service: "{{ nextion.commands.text_printf }}" + data: + component: "{{ 'entity%02d_label' | format(entity_page_index + 1) }}" + message: "{{ entity_pages_labels[entity_page_index].label }}" + continue_on_error: true + - *delay-default + ##### Entities ##### + - repeat: + for_each: "{{ entity_pages_entities[first_entity:last_entity] }}" + sequence: &update-entity_page_entity + - if: "{{ repeat.item.entity is string and repeat.item.entity | length > 0 }}" + then: + - variables: + repeat_item_state: "{{ states(repeat.item.entity) | default('unavailable') }}" + repeat_item_icon: > + {% if repeat.item.icon is string and repeat.item.icon | length > 0 %}{{ nextion.icons.all[repeat.item.icon.split(':')[1]] | default(repeat.item.icon) }} + {% elif state_attr(repeat.item.entity, 'icon') | default('') not in ['unavailable', 'unknown', '', None] %}{{ nextion.icons.all[state_attr(repeat.item.entity, 'icon').split(':')[1]] | default(None) }} + {% endif %} + - service: "{{ nextion.commands.set_entity }}" + data: + ent_id: "{{ repeat.item.page }}.{{ repeat.item.component }}" + ent_icon: "{{ repeat_item_icon if repeat_item_icon else nextion.icons.blank }}" + ent_label: >- + {%- if repeat.item.name | length > 0 -%} {{ repeat.item.name }} + {%- elif repeat_item_state in ['unavailable', 'unknown', None] -%} {{ repeat.item.entity }} + {%- else -%} {{ state_attr(repeat.item.entity, 'friendly_name') | default(mui[language].no_name) }} + {%- endif -%} + ent_value: "{{ repeat_item_state ~ ((state_attr(repeat.item.entity, 'unit_of_measurement') | default('')) if state_attr(repeat.item.entity, 'unit_of_measurement') else '') }}" + continue_on_error: true + + ## PAGE WEATHER (WEATHER01 to WEATHER05) ## + - alias: Weather pages + conditions: "{{ nspanel_event.page in nextion.pages.weatherpages }}" + sequence: + - variables: + weather_attribution: "{{ state_attr(weather_entity, 'attribution') if weather_entity is string }}" + weather_type: > + {% if not weather_attribution %} unavailable + {% elif 'AccuWeather' in weather_attribution %} AccuWeather + {% elif 'OpenWeatherMap' in weather_attribution %} OpenWeather + {% elif 'SMHI' in weather_attribution %} SMHI + {% elif 'met.no' in weather_attribution %} Met.no + {% elif 'OpenWeatherMap' in weather_attribution %} OpenWeather + {% else %} Other + {% endif %} + weather_units: + hours_of_sun: "{{ state_attr(weather_entity, 'hours_of_sun_unit') | default('h') if weather_entity is string and state_attr(weather_entity, 'hours_of_sun_unit') else 'h' }}" + precipitation: "{{ state_attr(weather_entity, 'precipitation_unit') | default('') if weather_entity is string and state_attr(weather_entity, 'precipitation_unit') }}" + precipitation_probability: "{{ state_attr(weather_entity, 'precipitation_probability_unit') | default('%') if weather_entity is string and state_attr(weather_entity, 'precipitation_probability_unit') else '%' }}" + pressure: "{{ state_attr(weather_entity, 'pressure_unit') | default('') if weather_entity is string and state_attr(weather_entity, 'pressure_unit') }}" + #temperature: "{{ state_attr(weather_entity, 'temperature_unit') | default('°') if weather_entity is string and state_attr(weather_entity, 'temperature_unit') else '°' }}" + thunderstorm_probability: "{{ state_attr(weather_entity, 'thunderstorm_probability_unit') | default('%') if weather_entity is string and state_attr(weather_entity, 'thunderstorm_probability_unit') else '%' }}" + uv_index: "{{ state_attr(weather_entity, 'uv_index_unit') | default('') if weather_entity is string and state_attr(weather_entity, 'uv_index_unit') }}" + #visibility: "{{ state_attr(weather_entity, 'visibility_unit') | default('') if weather_entity is string and state_attr(weather_entity, 'visibility_unit') }}" + wind_speed: "{{ state_attr(weather_entity, 'wind_speed_unit') | default('') if weather_entity is string and state_attr(weather_entity, 'wind_speed_unit') }}" + page_name: "{{ nspanel_event.page }}" + page_index: "{{ (page_name[-2:] | int(0)) - 1 }}" + + ##### Display relative day ##### + - service: "{{ nextion.commands.text_printf }}" + data: + component: "{{ page_name }}.day" + message: "{{ (dict.values(mui[language].relative_day) | list)[page_index] }}" + continue_on_error: true + - *delay-default + + ##### Display date (long) ##### + - service: "{{ nextion.commands.text_printf }}" + data: + component: "{{ page_name }}.date" + message: "{{ (dict.values(mui[language].weekdays) | list)[(now() + timedelta(days= (page_index))).weekday()] ~ ', ' ~ as_timestamp(now() + timedelta(days= (page_index))) | timestamp_custom(date_format) }}" + continue_on_error: true + - *delay-default + + ##### Display weather data only when available ##### + - variables: + forecast_day: > + {{ state_attr(weather_entity, 'forecast') | default([]) + | selectattr('datetime', 'defined') + | selectattr('datetime', '>=', (today_at('00:00') + timedelta(days= page_index )) | as_timestamp | timestamp_local ) + | selectattr('datetime', '<', (today_at('00:00') + timedelta(days= (page_index+1))) | as_timestamp | timestamp_local ) + | list + }} + - if: "{{ forecast_day | count > 0 or page_index == 0 }}" + then: # Display forecast + - variables: + metnoweather: "{{ weather_type == 'Met.no' }}" + metnoweather_hourly_forecast: "{{ state_attr(weather_entity ~ '_hourly', 'forecast') if metnoweather and states(weather_entity ~ '_hourly') not in ['unavailable', 'unknown', None] }}" + forecast_day: > + {% if forecast_day | count > 0 %}{{ forecast_day }} + {% elif metnoweather and metnoweather_hourly_forecast %} + {{ metnoweather_hourly_forecast + | selectattr('datetime', 'defined') + | selectattr('datetime', '>=', (today_at('00:00') + timedelta(days= page_index )) | as_timestamp | timestamp_local ) + | selectattr('datetime', '<', (today_at('00:00') + timedelta(days= (page_index+1))) | as_timestamp | timestamp_local ) + | list + }} + {% endif %} + - variables: + forecast_day: > + {% if forecast_day | count > 0 %}{{ forecast_day }} + {% elif page_index == 0 %} + [ + { + "condition": "{{ states(weather_entity) }}", + "temperature": "{{ state_attr(weather_entity, 'temperature') }}", + "wind_speed": "{{ state_attr(weather_entity, 'wind_speed') }}" + } + ] + {% endif %} + - if: "{{ forecast_day | count > 0 }}" + then: + - variables: + accuweather: "{{ weather_type == 'AccuWeather' }}" + accuweather_day_name: "{{ 'day_' ~ page_index }}" + accuweather_sensor_prefix: "{{ 'sensor.' ~ (weather_entity | replace('weather.','')) ~ '_' }}" + accuweather_sensor_sufix: "{{ '_' ~ page_index ~ 'd' }}" + temp_min: > + {{ forecast_day | selectattr('templow', 'defined') | map(attribute='templow') | map('float') | list | min + if forecast_day | selectattr('templow', 'defined') | map(attribute='templow') | map('float') | list | count > 0 + else forecast_day | selectattr('temperature', 'defined') | map(attribute='temperature') | map('float') | list | min | default('unknown') + }} + temp_max: "{{ forecast_day | selectattr('temperature', 'defined') | map(attribute='temperature') | map('float') | list | max if forecast_day | selectattr('temperature', 'defined') | map(attribute='temperature') | map('float') | list | count > 0 }}" + condition: "{{ forecast_day | selectattr('condition', 'defined') | map(attribute='condition') | list | first if forecast_day | selectattr('condition', 'defined') | map(attribute='condition') | list | count > 0 }}" + precipitation: "{{ forecast_day | selectattr('precipitation', 'defined') | map(attribute='precipitation') | map('float') | list | sum if forecast_day | selectattr('precipitation', 'defined') | map(attribute='precipitation') | map('float') | list | count > 0 }}" + precipitation_probability: "{{ forecast_day | selectattr('precipitation_probability', 'defined') | map(attribute='precipitation_probability') | map('float') | list | max if forecast_day | selectattr('precipitation_probability', 'defined') | map(attribute='precipitation_probability') | map('float') | list | count > 0 }}" + pressure: "{{ forecast_day | selectattr('pressure', 'defined') | map(attribute='pressure') | map('float') | list | max if forecast_day | selectattr('pressure', 'defined') | map(attribute='pressure') | map('float') | list | count > 0 }}" + wind_speed: "{{ forecast_day | selectattr('wind_speed', 'defined') | map(attribute='wind_speed') | map('float') | list | max if forecast_day | selectattr('wind_speed', 'defined') | map(attribute='wind_speed') | map('float') | list | count > 0 }}" + hours_of_sun: "{{ states(accuweather_sensor_prefix ~ 'hours_of_sun' ~ accuweather_sensor_sufix) | default('unknown') if accuweather else (forecast_day | selectattr('hours_of_sun', 'defined') | map(attribute='hours_of_sun') | map('float') | list | sum if forecast_day | selectattr('hours_of_sun', 'defined') | map(attribute='hours_of_sun') | map('float') | list | count > 0) }}" + uv_index: "{{ states(accuweather_sensor_prefix ~ 'uv_index' ~ accuweather_sensor_sufix) | default('unknown') if accuweather else (forecast_day | selectattr('uv_index', 'defined') | map(attribute='uv_index') | map('float') | list | max if forecast_day | selectattr('uv_index', 'defined') | map(attribute='uv_index') | map('float') | list | count > 0) }}" + thunderstorm_probability: "{{ states(accuweather_sensor_prefix ~ 'thunderstorm_probability_day' ~ accuweather_sensor_sufix) | default('unknown') if accuweather else (forecast_day | selectattr('thunderstorm_probability', 'defined') | map(attribute='thunderstorm_probability') | map('float') | list | max if forecast_day | selectattr('thunderstorm_probability', 'defined') | map(attribute='thunderstorm_probability') | map('float') | list | count > 0) }}" + parameters: + - name: hours_of_sun + visibility: "{{ is_number(hours_of_sun) }}" + value: "{{ (hours_of_sun | round(0) ~ ' ' ~ weather_units.hours_of_sun) if is_number(hours_of_sun) }}" + icon: "{{ nextion.icons.weather.sun }}" + - name: thunderstorm_probability + visibility: "{{ is_number(thunderstorm_probability) }}" + value: "{{ (thunderstorm_probability | round(0) ~ weather_units.thunderstorm_probability) if is_number(thunderstorm_probability) }}" + icon: "{{ nextion.icons.weather.lightning }}" + - name: precipitation + visibility: "{{ is_number(precipitation) or is_number(precipitation_probability) }}" + value: > + {{ (precipitation | round(0) ~ ' ' ~ weather_units.precipitation) if is_number(precipitation) }} + {{ '-' if is_number(precipitation) and is_number(precipitation_probability) }} + {{ (precipitation_probability | round(0) ~ weather_units.precipitation_probability) if is_number(precipitation_probability) }} + icon: "{{ nextion.icons.weather.rain }}" + - name: uv_index + visibility: "{{ is_number(uv_index) }}" + value: > + {{ (state_attr(accuweather_sensor_prefix ~ 'uv_index' ~ accuweather_sensor_sufix, 'level') | default(None) ~ ': ') if weather_type == 'AccuWeather' }} + {{ (uv_index | round(0) ~ weather_units.uv_index) if is_number(uv_index) }} + icon: "{{ nextion.icons.weather.protect }}" + - name: wind_speed + visibility: "{{ is_number(wind_speed) }}" + value: "{{ (wind_speed | round(0) ~ ' ' ~ weather_units.wind_speed) if is_number(wind_speed) }}" + icon: "{{ nextion.icons.weather.wind }}" + - name: pressure + visibility: "{{ is_number(pressure) }}" + value: "{{ (pressure | round(0) ~ ' ' ~ weather_units.pressure) if is_number(pressure) }}" + icon: "{{ nextion.icons.weather.gauge }}" + + ##### Display weather PIC when available + - if: "{{ condition not in ['unknown', None] }}" + then: + - service: "{{ nextion.commands.printf }}" + data: + cmd: "{{ page_name }}.weather_icon.pic={{ nextion.pics.weather[states(weather_entity) | default('unavailable') if weather_entity is string else 'unavailable'] | default(None) if condition == 'unknown' and page_name == nextion.pages.weatherpages[0] else nextion.pics.weather[condition] | default(None) }}" + continue_on_error: true + - *delay-default + + ##### Display temperature min/max when available + - variables: + temperature_string: > + {{ (temp_min | round(0) ~ temperature_units) if is_number(temp_min) }} + {{ '/' if is_number(temp_min) and is_number(temp_max) and temp_min != temp_max }} + {{ (temp_max | round(0) ~ temperature_units) if is_number(temp_max) and temp_min != temp_max }} + - if: "{{ (is_number(temp_min) or is_number(temp_max)) and temperature_string is string and temperature_string | length > 0 }}" + then: + - service: "{{ nextion.commands.text_printf }}" + data: + component: "{{ page_name }}.temperature" ### Temperature MIN/MAX ### + message: "{{ temperature_string }}" + continue_on_error: true + - *delay-default + + ##### fields 1 to 5 (Parameters) ##### + - repeat: + for_each: "{{ (parameters | selectattr('visibility', 'eq', true) | list)[:5] }}" + sequence: + - service: "{{ nextion.commands.text_printf }}" + data: + component: "{{ page_name }}.value0{{ repeat.index }}" + message: "{{ repeat.item.value }}" + continue_on_error: true + - *delay-default + - service: "{{ nextion.commands.text_printf }}" + data: + component: "{{ page_name }}.value0{{ repeat.index }}_icon" + message: "{{ repeat.item.icon }}" + continue_on_error: true + - *delay-default + else: &forecast_unavailable + - service: "{{ nextion.commands.text_printf }}" + data: + component: "{{ page_name }}.value01" + message: "{{ mui[language].unavailable }}" + continue_on_error: true + - *delay-default + else: *forecast_unavailable + + ## PAGE NOTIFICATION ## + - alias: Notification page + conditions: "{{ nspanel_event.page == nextion.pages.notification }}" + sequence: + - service: "{{ nextion.commands.text_printf }}" + data: + component: notification.notifi_text01 + message: "{{ states(notification_text) | default(mui[language].unavailable) if notification_text is string else mui[language].unavailable }}" + continue_on_error: true + - *delay-default + - service: "{{ nextion.commands.text_printf }}" + data: + component: notification.notifi_label + message: "{{ states(notification_label) | default(mui[language].unavailable) if notification_label is string else mui[language].unavailable }}" + continue_on_error: true + + ## PAGE QR Code ## + - alias: QRCode page + conditions: "{{ nspanel_event.page == nextion.pages.qrcode }}" + sequence: + - variables: + qrcode_label: !input "qrcode_label" + qrcode_value: !input "qrcode_value" + - if: "{{ qrcode_label | length > 0 }}" + then: + - service: "{{ nextion.commands.text_printf }}" + data: + component: "qrcode_label" + message: "{{ qrcode_label }}" + continue_on_error: true + - *delay-default + - service: "{{ nextion.commands.text_printf }}" + data: + component: "qrcode_value" + message: "{{ qrcode_value }}" + continue_on_error: true + + ## PAGE SETTINGS ## + #- alias: Settings page + # conditions: "{{ nspanel_event.page == nextion.pages.settings }}" + # sequence: + + ## PAGE BOOT ## + #- alias: Boot page + # conditions: "{{ nspanel_event.page == nextion.pages.boot }}" + # sequence: + + ## PAGE SCREENSAVER ## + #- alias: Screensaver page + # conditions: "{{ nspanel_event.page == nextion.pages.screensaver }}" + # sequence: + + - alias: Page close # general + conditions: '{{ nspanel_event.component == "close" and nspanel_event.value == "release" }}' sequence: - - service: "{{ nextion.commands.text_printf }}" + - *variables-settings_entity + - service: "{{ nextion.commands.printf }}" data: - component: notification.notifi_text01 - message: "{{ states(notification_text) | default(mui[language].unavailable) if notification_text is string else mui[language].unavailable }}" - continue_on_error: true - - *delay-default - - service: "{{ nextion.commands.text_printf }}" - data: - component: notification.notifi_label - message: "{{ states(notification_label) | default(mui[language].unavailable) if notification_label is string else mui[language].unavailable }}" + cmd: "page {{ settings_entity_dict.page if settings_entity_dict.page is defined else nextion.pages.home }}" continue_on_error: true - ## PAGE QR Code ## - - alias: QRCode page - conditions: "{{ trigger.event.data.new_state.state == nextion.pages.qrcode }}" + - alias: lightsetting # rgb_color, brightness, color_temp + conditions: '{{ nspanel_event.component in ["rgb_color", "brightness_pct", "color_temp"] }}' sequence: - - variables: - qrcode_label: !input "qrcode_label" - qrcode_value: !input "qrcode_value" - - if: "{{ qrcode_label | length > 0 }}" + - *variables-settings_entity + - service: light.turn_on + data: + entity_id: "{{ settings_entity_dict.entity }}" + "{{ nspanel_event.component }}": "{{ nspanel_event.value }}" + continue_on_error: true + + - alias: coversetting position + conditions: '{{ nspanel_event.component == "cover_position" }}' + sequence: + - *variables-settings_entity + - service: "cover.set_cover_position" + data: + entity_id: "{{ settings_entity_dict.entity }}" + position: "{{ nspanel_event.value }}" + continue_on_error: true + + - alias: coversetting open close stop + conditions: '{{ nspanel_event.component in ["open_cover", "close_cover", "stop_cover"] }}' + sequence: + - *variables-settings_entity + - service: "cover.{{ nspanel_event.component }}" + data: + entity_id: "{{ settings_entity_dict.entity }}" + continue_on_error: true + + - alias: climate hotwater + conditions: '{{ nspanel_event.component == "hotwater" and nspanel_event.value == "release" }}' + sequence: + - service: >- + {% if hotwatercharge is match 'switch.' %} + switch.toggle + {% elif hotwatercharge is match 'input_boolean.' %} + input_boolean.toggle + {% endif %} + data: + entity_id: "{{ hotwatercharge }}" + continue_on_error: true + + - alias: climate heating + conditions: '{{ nspanel_event.component == "heating" and nspanel_event.value == "release" }}' + sequence: + - *variables-settings_entity + - if: "{{ settings_entity_dict.entity is string and states(settings_entity_dict.entity) == 'off' }}" then: - - service: "{{ nextion.commands.text_printf }}" + - service: climate.turn_on data: - component: "qrcode_label" - message: "{{ qrcode_label }}" + entity_id: "{{ settings_entity_dict.entity }}" continue_on_error: true - - *delay-default - - service: "{{ nextion.commands.text_printf }}" + else: + - service: climate.turn_off + data: + entity_id: "{{ settings_entity_dict.entity }}" + continue_on_error: true + + - alias: climate increasetemp decreasetemp + conditions: '{{ nspanel_event.component in ["decreasetemp", "increasetemp"] and nspanel_event.value == "release" }}' + sequence: + - *variables-settings_entity + - if: "{{ settings_entity_dict.entity is string and states(settings_entity_dict.entity) != 'off' }}" + then: + - variables: + delta: "{{ +0.5 if nspanel_event.component == 'increasetemp' else -0.5 }}" + - if: "{{ climate_optimistic == true }}" ## TODO - remove from here + then: + - variables: + current_setpoint: "{{ states(display_target_temperature) | default('unavailable') if display_target_temperature is string else 'unavailable' }}" + - if: "{{ is_number(current_setpoint) }}" + then: + - service: "{{ nextion.commands.thermostat_cycle }}" + data: + value: "{{ (current_setpoint + delta) | round(1) }}" + continue_on_error: true + else: + - variables: + current_setpoint: "{{state_attr(settings_entity_dict.entity, 'temperature') | default('unavailable') if settings_entity_dict.entity is string else 'unavailable' }}" + - if: "{{ is_number(current_setpoint) }}" + then: + - service: climate.set_temperature + data: + entity_id: "{{ settings_entity_dict.entity }}" + #hvac_mode: 'heat' + temperature: "{{ (current_setpoint + delta) | round(1) }}" + continue_on_error: true + + - alias: climate climateslider + conditions: '{{ nspanel_event.component == "climateslider" }}' + sequence: + - *variables-settings_entity + - if: "{{ settings_entity_dict.entity is string and states(settings_entity_dict.entity) != 'off' }}" + then: + - variables: + climateslider: "{{ nspanel_event.value | int(-1) }}" + new_setpoint: "{{ (13.0 + (climateslider * 0.5)) if climateslider >= 0 and climateslider <= 27 }}" + - if: "{{ climate_optimistic == true }}" ## TODO - remove from here + then: + - service: "{{ nextion.commands.thermostat_cycle }}" + data: + value: "{{ new_setpoint }}" + continue_on_error: true + else: + - service: climate.set_temperature + data: + entity_id: "{{ settings_entity_dict.entity }}" + #hvac_mode: 'heat' + temperature: "{{ new_setpoint }}" + continue_on_error: true + + - alias: Button page - Button press + conditions: + - "{{ nspanel_event.page in nextion.pages.buttonpages }}" + - "{{ nspanel_event.value == 'press' }}" + sequence: + - wait_template: > + {% set button_wait = states(nspanelevent) %} + {% set button_wait = button_wait | from_json if button_wait is string and button_wait not in ["unavailable", "unknown", None] else { "page": "unknown", "component": "unknown", "value": "unknown" } %} + {{ + button_wait.page == nspanel_event.page and + button_wait.component == nspanel_event.component and + button_wait.value == 'release' + }} + timeout: + seconds: 1 + continue_on_timeout: true + - *variables-page_buttons + - variables: + ##### Entity - Page Button - Toggle Entity ##### + button_wait: '{{ states(nspanelevent) if nspanelevent is string and states(nspanelevent) not in ["unavailable", "unknown", None] else { "page": "unknown", "component": "unknown", "value": "unknown" } }}' + last_click_button: "{{ button_pages_buttons | selectattr('page', 'defined') | selectattr('page', 'eq', nspanel_event.page) | selectattr('component', 'defined') | selectattr('component', 'eq', nspanel_event.component) | list }}" + - condition: "{{ last_click_button | count >= 0 }}" + - if: "{{ not wait.completed }}" + then: # Long press + - service: "{{ nextion.commands.set_settings_entity }}" + data: + entity: "{{ last_click_button[0] }}" + continue_on_error: true + else: # Short press + - variables: + last_click_button: "{{ last_click_button[0] }}" + entity_domain: "{{ (last_click_button.entity.split('.')[0] | default('unknown')) if last_click_button.entity is string and last_click_button.entity | length > 0 and last_click_button.entity.split('.') | count > 0 else 'unknown' }}" + - condition: "{{ entity_domain not in ['unknown', 'person', 'binary_sensor', 'sensor'] }}" + - if: "{{ entity_domain == 'climate' }}" + then: + - service: "{{ nextion.commands.set_settings_entity }}" + data: + entity: "{{ last_click_button }}" + continue_on_error: true + else: + - if: "{{ last_click_button.confirm }}" + then: + - variables: + btn_entity_name: >- + {%- if state_attr(last_click_button.entity, 'friendly_name') != None -%} {{ state_attr(last_click_button.entity, 'friendly_name') }} + {%- elif state_attr(last_click_button.entity, 'name') != None -%} {{ state_attr(last_click_button.entity, 'name') }} + {%- else -%} 'unknown' + {%- endif -%} + #### turn on switch confirmation_message + - service: switch.turn_on + data: + entity_id: "{{ confirmation_message }}" + continue_on_error: true + - service: "{{ nextion.commands.printf }}" + data: + cmd: "page {{ nextion.pages.notification }}" + continue_on_error: true + - service: "{{ nextion.commands.text_printf }}" + data: + component: notification.notifi_text01 + message: "{{ btn_entity_name }}" + continue_on_error: true + - *delay-default + - service: "{{ nextion.commands.text_printf }}" + data: + component: notification.notifi_label + message: "{{ mui[language].please_confirm }}" + continue_on_error: true + - wait_template: > + {% set notification_answer = states(nspanelevent) %} + {% set notification_answer = notification_answer | from_json if notification_answer is string and notification_answer not in ["unavailable", "unknown", None] else { "page": "unknown", "component": "unknown", "value": "unknown" } %} + {{ notification_answer.component in ["accept", "clear", "homepage"] }} + timeout: + seconds: 10 + continue_on_timeout: true + - variables: + notification_answer: '{{ states(nspanelevent) if nspanelevent is string and states(nspanelevent) not in ["unavailable", "unknown", None] else { "page": "unknown", "component": "unknown", "value": "unknown" } }}' + - choose: + - conditions: '{{ notification_answer.component == "accept" }}' + sequence: + - service: "{{ nextion.commands.printf }}" + data: + cmd: "page {{ nspanel_event.page }}" + continue_on_error: true + - service: switch.turn_off + data: + entity_id: "{{ confirmation_message }}" + continue_on_error: true + - &service-button_changed + service: >- + {% if entity_domain in ['light', 'switch', 'cover', 'input_boolean', 'automation', 'fan'] %} + {{ entity_domain }}.toggle + {% elif entity_domain in ['button', 'input_button'] %} + {{ entity_domain }}.press + {% elif entity_domain in ['scene', 'script'] %} + {{ entity_domain }}.turn_on + {% else %} + homeassistant.update_entity + {% endif %} + data: + entity_id: "{{ last_click_button.entity }}" + continue_on_error: true + - conditions: "{{ notification_answer.component == 'clear' }}" + sequence: + - service: "{{ nextion.commands.printf }}" + data: + cmd: "page {{ nspanel_event.page }}" + continue_on_error: true + - service: switch.turn_off + data: + entity_id: "{{ confirmation_message }}" + continue_on_error: true + - conditions: '{{ notification_answer.component == "homepage" }}' + sequence: + - service: switch.turn_off + data: + entity_id: "{{ confirmation_message }}" + continue_on_error: true + default: + - service: switch.turn_off + data: + entity_id: "{{ confirmation_message }}" + continue_on_error: true + - service: "{{ nextion.commands.printf }}" + data: + cmd: "page {{ nextion.pages.home }}" + continue_on_error: true + else: + - *service-button_changed + + - alias: Jump to climate page + conditions: + - "{{ nspanel_event.page == nextion.pages.home }} " + - '{{ nspanel_event.component == "climate" }}' + - '{{ nspanel_event.value == "release" }}' + - "{{ climate | length > 0 }} " + sequence: + - service: "{{ nextion.commands.set_settings_entity }}" data: - component: "qrcode_value" - message: "{{ qrcode_value }}" + entity: "{{ dict(nspanel_event.items(), entity=climate, name=state_attr(climate, 'friendly_name')) }}" continue_on_error: true - ## PAGE SETTINGS ## - #- alias: Settings page - # conditions: "{{ trigger.event.data.new_state.state == nextion.pages.settings }}" - # sequence: + - alias: Jump to weather page + conditions: + - "{{ nspanel_event.page == nextion.pages.home }}" + - '{{ nspanel_event.component == "weather" }}' + sequence: + - service: "{{ nextion.commands.printf }}" + data: + cmd: "page {{ nextion.pages.weatherpages[0] }}" + continue_on_error: true - ## PAGE BOOT ## - #- alias: Boot page - # conditions: "{{ trigger.event.data.new_state.state == nextion.pages.boot }}" - # sequence: + - alias: Jump to QR code page + conditions: + - "{{ qrcode_enabled == true }}" + - "{{ nspanel_event.page == nextion.pages.home }}" + - '{{ nspanel_event.component == "button05" }}' + sequence: + - service: "{{ nextion.commands.printf }}" + data: + cmd: "page {{ nextion.pages.qrcode }}" + continue_on_error: true + + - alias: Jump to entity page + conditions: + - "{{ entitypages_enabled == true }}" + - "{{ nspanel_event.page == nextion.pages.home }}" + - '{{ nspanel_event.component == "button06" }}' + sequence: + - service: "{{ nextion.commands.printf }}" + data: + cmd: "page {{ nextion.pages.entitypages[0] }}" + continue_on_error: true + + - alias: Jump to notification page + conditions: + - "{{ nspanel_event.page == nextion.pages.home }}" + - '{{ nspanel_event.component == "button04" }}' + - "{{ notification_text is string and states(notification_text) | length > 0 }}" + sequence: + - service: "{{ nextion.commands.printf }}" + data: + cmd: "page {{ nextion.pages.notification }}" + continue_on_error: true + + - alias: Show button - Notification clear + conditions: + - "{{ nspanel_event.page == nextion.pages.notification }}" + - '{{ nspanel_event.component == "clear" }}' + - "{{ confirmation_message is string and states(confirmation_message) | default('unavailable') != 'on' }}" + sequence: + - service: switch.turn_off + data: + entity_id: "{{ notification_unread }}" + continue_on_error: true + - service: "{{ nextion.commands.printf }}" + data: + cmd: "page {{ nextion.pages.home }}" + continue_on_error: true + + - alias: Show button - Notification accept + conditions: + - "{{ nspanel_event.page == nextion.pages.notification }}" + - '{{ nspanel_event.component == "accept" }}' + - "{{ confirmation_message is string and states(confirmation_message) | default('unavailable') != 'on' }}" + sequence: + - service: switch.turn_off + data: + entity_id: "{{ notification_unread }}" + continue_on_error: true + - service: "{{ nextion.commands.notification_clear }}" + data: {} + continue_on_error: true + - service: "{{ nextion.commands.printf }}" + data: + cmd: "page {{ nextion.pages.home }}" + continue_on_error: true - ## PAGE SCREENSAVER ## - #- alias: Screensaver page - # conditions: "{{ trigger.event.data.new_state.state == nextion.pages.screensaver }}" - # sequence: ##### BOOT NSPANEL - automation reload ##### - alias: Automation reloaded @@ -5159,15 +5516,15 @@ action: sequence: - choose: ## PAGE HOME ## - - conditions: "{{ nextion.pages.current == nextion.pages.home }}" + - conditions: "{{ nspanel_event.page == nextion.pages.home }}" sequence: *refresh_page_home ## PAGE BUTTON PAGES 01 - 04 ## - - conditions: "{{ nextion.pages.current in nextion.pages.buttonpages }}" + - conditions: "{{ nspanel_event.page in nextion.pages.buttonpages }}" sequence: *refresh_page_buttonpage ## ENTITY PAGES ## - - conditions: "{{ nextion.pages.current in nextion.pages.entitypages }}" + - conditions: "{{ nspanel_event.page in nextion.pages.entitypages }}" sequence: *refresh-entity_pages ##### UPDATE BUTTONS AND PAGES - button page / lightsettings page / coversettings page ##### @@ -5207,432 +5564,45 @@ action: - current_state_entity30 - current_state_entity31 - current_state_entity32 - - "{{ nextion.pages.current in nextion.pages.buttonpages and trigger.to_state.state not in ['unavailable', 'unknown'] }}" + - "{{ trigger.to_state.state not in ['unavailable', 'unknown'] }}" sequence: - - *variables-page_buttons - - variables: - buttonpage: "{{ nextion.pages.current }}" - - repeat: - for_each: "{{ button_pages_buttons | selectattr('component', 'defined') | selectattr('component', 'match', buttonpage) | selectattr('entity', 'defined') | selectattr('entity', 'eq', trigger.entity_id) | list }}" - sequence: *display-button_page_button - ##### release button/scene (stateless) ##### - - if: "{{ trigger.to_state.entity_id is match 'button.' or trigger.to_state.entity_id is match 'input_button.' or trigger.to_state.entity_id is match 'scene.' }}" - then: - - delay: - milliseconds: "1000" - - ##### SHORT PRESS BUTTON PAGE - toggle enities ##### - - alias: Button page - Short press - conditions: - - condition: trigger - id: short_press - - "{{ nextion.pages.current in nextion.pages.buttonpages }}" - sequence: - - *variables-page_buttons - - variables: - ##### Entity - Page Button - Toggle Entity ##### - last_click_state: "{{ states(last_click) | default('unavailable') if last_click is string else 'unavailable' }}" - last_click_coordinates: "{{ last_click_state.replace('releasebuttonpage', '').split('button') if last_click_state not in ['unavailable', 'unknown', None] else None }}" - last_click_entity_index: "{{ (last_click_coordinates[0] | int(-99) -1)*8 + last_click_coordinates[1] | int(-99) - 1 if last_click_coordinates and last_click_coordinates | count >= 1 else -1 }}" - - condition: "{{ last_click_entity_index >= 0 }}" - - variables: - last_click_button: "{{ button_pages_buttons[last_click_entity_index] | default([]) }}" - entity_short: "{{ last_click_button.entity | default('unavailable') if last_click_button and last_click_button.entity is defined }}" - entity_domain: "{{ (entity_short.split('.')[0] | default('unknown')) if entity_short is string and entity_short | length > 0 and entity_short.split('.') | count > 0 else 'unknown' }}" - - condition: "{{ entity_domain not in ['unknown', 'person', 'binary_sensor', 'sensor'] }}" - - if: "{{ entity_domain == 'climate' }}" - then: - - variables: - entity_long: "{{ entity_short }}" - entity_short_state: "{{ states(entity_short) | default('unavailable') if entity_short is string else 'unavailable' }}" - entity_long_name: "{{ entity_short if entity_short_state in ['unavailable', 'unknown'] else state_attr(entity_short, 'friendly_name') | default(mui[language].no_name) }}" - entity_back: "{{ nextion.pages.current }}" - - service: "{{ nextion.commands.set_settings_entity }}" - data: - entity: "{{ entity_long }},{{ entity_back }},{{ entity_long_name }}" - continue_on_error: true - else: - - if: "{{ last_click_button.confirm }}" - then: - - variables: - buttonpage: "{{ nextion.pages.current }}" - btn_entity_name: >- - {%- if state_attr(entity_short, 'friendly_name') != None -%} {{ state_attr(entity_short, 'friendly_name') }} - {%- elif state_attr(entity_short, 'name') != None -%} {{ state_attr(entity_short, 'name') }} - {%- else -%} 'unknown' - {%- endif -%} - #### turn on switch confirmation_message - - service: switch.turn_on - data: - entity_id: "{{ confirmation_message }}" - continue_on_error: true - - service: "{{ nextion.commands.printf }}" - data: - cmd: "page {{ nextion.pages.notification }}" - continue_on_error: true - - service: "{{ nextion.commands.text_printf }}" - data: - component: notification.notifi_text01 - message: "{{ btn_entity_name }}" - continue_on_error: true - - *delay-default - - service: "{{ nextion.commands.text_printf }}" - data: - component: notification.notifi_label - message: "{{ mui[language].please_confirm }}" - continue_on_error: true - - wait_template: "{{ is_state(last_click, ['notificationacceptrelease', 'notificationclearrelease', 'homepage']) }}" - timeout: - seconds: 10 - continue_on_timeout: true - - choose: - - conditions: "{{ is_state(last_click, 'notificationacceptrelease') }}" - sequence: - - service: "{{ nextion.commands.printf }}" - data: - cmd: "page {{ buttonpage }}" - continue_on_error: true - - service: switch.turn_off - data: - entity_id: "{{ confirmation_message }}" - continue_on_error: true - - &service-button_changed - service: >- - {% if entity_domain in ['light', 'switch', 'cover', 'input_boolean', 'automation', 'fan'] %} - {{ entity_domain }}.toggle - {% elif entity_domain in ['button', 'input_button'] %} - {{ entity_domain }}.press - {% elif entity_domain in ['scene', 'script'] %} - {{ entity_domain }}.turn_on - {% else %} - homeassistant.update_entity - {% endif %} - data: - entity_id: "{{ entity_short }}" - continue_on_error: true - - conditions: "{{ is_state(last_click, 'notificationclearrelease') }}" - sequence: - - service: "{{ nextion.commands.printf }}" - data: - cmd: "page {{ buttonpage }}" - continue_on_error: true - - service: switch.turn_off - data: - entity_id: "{{ confirmation_message }}" - continue_on_error: true - - conditions: "{{ is_state(last_click, 'homepage') }}" - sequence: - - service: switch.turn_off - data: - entity_id: "{{ confirmation_message }}" - continue_on_error: true - default: - - service: switch.turn_off - data: - entity_id: "{{ confirmation_message }}" - continue_on_error: true - - service: "{{ nextion.commands.printf }}" - data: - cmd: "page {{ nextion.pages.home }}" - continue_on_error: true - else: - - *service-button_changed - - ##### LONG PRESS BUTTON PAGE - save entity for settings pages ##### - - alias: Button page - Long press - conditions: - - condition: trigger - id: long_press - - "{{ nextion.pages.current in nextion.pages.buttonpages }}" - sequence: - - *variables-page_buttons - - variables: - last_click_state: "{{ trigger.to_state.state }}" - last_click_coordinates: "{{ last_click_state.replace('pressbuttonpage', '').split('button') }}" - last_click_entity_index: "{{ (last_click_coordinates[0] | int(-99) -1)*8 + last_click_coordinates[1] | int(-99) - 1 }}" - last_click_button: "{{ button_pages_buttons[last_click_entity_index] }}" - ##### Long Press Entity ##### - entity_long: "{{ last_click_button.entity }}" - entity_domain: "{{ (entity_long.split('.')[0] | default('unknown')) if entity_long | length > 0 else 'unknown' }}" - ##### Long Press Entity Name ##### - entity_long_name: "{{ last_click_button.name }}" - ##### Long Press Entity Icon ##### - entity_long_icon: "{{ (nextion.icons.all[last_click_button.icon.split(':')[1]] | default('\U0000E2D5') if last_click_button.icon.split(':') | count > 0 else last_click_button.icon) if last_click_button.icon is defined and last_click_button.icon is string and last_click_button.icon | length > 0 else '\U0000E2D5' }}" - ##### Long Press Entity Icon Color ##### - entity_long_icon_color: "{{ last_click_button.icon_color_rgb if is_number(last_click_button.icon_color_rgb) else ((last_click_button.icon_color_rgb[0] //(2**3)) *(2**11))+((last_click_button.icon_color_rgb[1] //(2**2)) *(2**5))+(last_click_button.icon_color_rgb[2] //(2**3)) }}" - ##### Current Page ##### - entity_back: "{{ nextion.pages.current }}" - - service: "{{ nextion.commands.set_settings_entity }}" - data: - entity: "{{ entity_long }},{{ entity_back }},{{ entity_long_name }},{{ entity_long_icon }},{{ entity_long_icon_color }}" - continue_on_error: true - - ##### LASTCLICK_LIGHTSETTINGS - changes on page lightsettings ##### - - alias: Changes on page lightsettings - conditions: - - condition: trigger - id: light_settings - - "{{ nextion.pages.current == nextion.pages.light }}" - sequence: - - *variables-settings_entity - - choose: - ##### Page Lightsettings - Brightness Slider MOVE ##### - - conditions: - #- '{{ trigger.event.data.new_state.state is match "brightness\d+" and trigger.event.data.new_state.state == states(last_click_lightsettings) }}' - - '{{ trigger.event.data.new_state.state is match "brightness\d+" }}' + - alias: choose current page + choose: + - alias: buttonpage + conditions: '{{ nspanel_event.page in nextion.pages.buttonpages }}' sequence: - - service: light.turn_on - data: - entity_id: "{{ entity_long }}" - brightness: "{{ (trigger.event.data.new_state.state | replace('brightness','') | int / 100 * 255) | round(0) }}" - continue_on_error: true - #### wird nicht mehr benötigt, da es im nextion editor nun direkt gemacht wird - # - delay: - # milliseconds: "{{ delay_value }}" - # - service: "{{ nextion.commands.text_printf }}" - # data: - # component: lightsettings.light_value - # message: "{{ (trigger.event.data.new_state.state | replace('brightness','') | int * 100 /255) | round(0) }}%' - # - delay: - # milliseconds: "{{ delay_value }}" - # - service: "{{ nextion.commands.text_printf }}" - # data: - # component: lightsettings.light_value_2 - # message: "{{ (trigger.event.data.new_state.state | replace('brightness','') | int * 100 /255) | round(0) }}%' - - # value_template: "{{ states(last_click_lightsettings) is match 'brightness\d+' }}" - # sequence: - # - service: light.turn_on - # data: - # entity_id: "{{ entity_long }}" - # brightness: "{{ states(last_click_lightsettings) | replace('brightness','') | int }}" - # - service: "{{ nextion.commands.text_printf }}" - # data: - # component: lightsettings.light_value - # message: "{{ (states(last_click_lightsettings) | replace('brightness','') | int * 100 /255) | round(0) }}" - - - ##### Page Lightsettings - color_Temp Slider MOVE ##### - - conditions: - - '{{ trigger.event.data.new_state.state is match "colortemp\d+" and trigger.event.data.new_state.state == (states(last_click_lightsettings) | default("unavailable") if last_click_lightsettings is string else "unavailable") }}' - sequence: - - service: light.turn_on - data: - entity_id: "{{ entity_long }}" - color_temp: "{{ trigger.event.data.new_state.state | replace('colortemp','') | int }}" - continue_on_error: true - #### wird nicht mehr benötigt, da es im nextion editor nun direkt gemacht wird - # - delay: - # milliseconds: "{{ delay_value }}" - # - service: "{{ nextion.commands.text_printf }}" - # data: - # component: lightsettings.temp_value - # message: "{{ trigger.event.data.new_state.state | replace('colortemp','') | int }}" - # - delay: - # milliseconds: "{{ delay_value }}" - # - service: "{{ nextion.commands.text_printf }}" - # data: - # component: lightsettings.temp_value_2 - # message: "{{ trigger.event.data.new_state.state | replace('colortemp','') | int }}" - - ##### Page Lightsettings - Color RGB Slider MOVE ##### - - conditions: - - '{{ trigger.event.data.new_state.state is match "\d+,\d+,\d+" }}' - sequence: - - service: light.turn_on - data: - entity_id: "{{ entity_long }}" - rgb_color: "{{ trigger.event.data.new_state.state.split(',') }}" - continue_on_error: true - - ##### Page Lightsettings - Close Lightsetting Page ##### - - conditions: - - "{{ trigger.event.data.new_state.state == 'releaselightsettingsclose' }}" - sequence: - - service: "{{ nextion.commands.printf }}" - data: - cmd: "page {{ entity_back }}" - continue_on_error: true - - ##### LASTCLICK_COVERSETTINGS - changes on page coversettings ##### - - alias: Changes on page coversettings - conditions: - - condition: trigger - id: cover_settings - - "{{ nextion.pages.current == nextion.pages.cover }}" - sequence: - - *variables-settings_entity - - choose: - ##### Page Coversettings - Cover Slider MOVE ##### - - conditions: - # - "{{ trigger.event.data.new_state.state is match 'coverposition\d+' and trigger.event.data.new_state.state == states(last_click_coversettings) }}" - - '{{ trigger.event.data.new_state.state is match "coverposition\d+" }}' - sequence: - - service: cover.set_cover_position - data: - entity_id: "{{ entity_long }}" - position: "{{ trigger.event.data.new_state.state | replace('coverposition','') | int }}" - continue_on_error: true - #### wird nicht mehr benötigt, da es im nextion editor nun direkt gemacht wird - # - delay: - # milliseconds: "{{ delay_value }}" - # - service: "{{ nextion.commands.text_printf }}" - # data: - # component: coversettings.cover_value - # message: "{{ trigger.event.data.new_state.state | replace('coverposition','') | int }} %' - # - delay: - # milliseconds: "{{ delay_value }}" - # - service: "{{ nextion.commands.text_printf }}" - # data: - # component: coversettings.cover_value_2 - # message: "{{ trigger.event.data.new_state.state | replace('coverposition','') | int }} %' - - ##### Page Coversettings - Cover CLOSE Button ##### - - conditions: - - "{{ trigger.event.data.new_state.state == 'cover_close_press' }}" - sequence: - - service: cover.close_cover - data: - entity_id: "{{ entity_long }}" - continue_on_error: true - - ##### Page Coversettings - Cover OPEN Button ##### - - conditions: - - "{{ trigger.event.data.new_state.state == 'cover_open_press' }}" - sequence: - - service: cover.open_cover - data: - entity_id: "{{ entity_long }}" - continue_on_error: true - - ##### Page Coversettings - Cover STOP Button ##### - - conditions: - - "{{ trigger.event.data.new_state.state == 'cover_stop_press' }}" - sequence: - - service: cover.stop_cover - data: - entity_id: "{{ entity_long }}" - continue_on_error: true - - ##### Page Coversettings - Close Coversettings Page ##### - - conditions: - - "{{ trigger.event.data.new_state.state == 'releasecoversettingsclose' }}" - sequence: - - service: "{{ nextion.commands.printf }}" - data: - cmd: "page {{ entity_back }}" - continue_on_error: true - - ##### LASTCLICK_CLIMATESETTINGS - changes on page climatesettings ##### - - alias: Changes on page climatesettings - conditions: - - condition: trigger - id: climate_settings - - "{{ nextion.pages.current == nextion.pages.climate }}" - sequence: - - *variables-settings_entity - - variables: - entity_long_state: "{{ states(entity_long) | default('unavailable') if entity_long is string else 'unavailable' }}" - - choose: - ##### Page Climatesettings - hotwater ##### - - conditions: "{{ trigger.event.data.new_state.state == 'releasehotwater' }}" - sequence: - - service: >- - {% if hotwatercharge is match 'switch.' %} - switch.toggle - {% elif hotwatercharge is match 'input_boolean.' %} - input_boolean.toggle - {% endif %} - data: - entity_id: "{{ hotwatercharge }}" - continue_on_error: true - - ##### Page Climatesettings - heating ##### - - conditions: "{{ trigger.event.data.new_state.state == 'releaseheating' }}" - sequence: - - if: "{{ entity_long_state == 'off' }}" + - *variables-page_buttons + - repeat: + for_each: "{{ button_pages_buttons | selectattr('page', 'defined') | selectattr('page', 'eq', nspanel_event.page) | selectattr('component', 'defined') | selectattr('component', 'eq', nspanel_event.component) | selectattr('entity', 'defined') | selectattr('entity', 'eq', trigger.entity_id) | list }}" + sequence: *display-button_page_button + ##### release button/scene (stateless) ##### + - if: "{{ trigger.to_state.entity_id is match 'button.' or trigger.to_state.entity_id is match 'input_button.' or trigger.to_state.entity_id is match 'scene.' }}" then: - - service: climate.turn_on ############ - data: - entity_id: "{{ entity_long }}" - continue_on_error: true - # - service: climate.set_temperature - # data: - # entity_id: !input climate - # hvac_mode: 'heat' - # temperature: "{{ state_attr(climate, 'temperature') }}" - else: - - service: climate.turn_off ############ - data: - entity_id: "{{ entity_long }}" - continue_on_error: true - # - service: climate.set_temperature - # data: - # entity_id: !input climate - # hvac_mode: 'off' - # temperature: "{{ state_attr(climate, 'temperature') }}" - - ##### Page Climatesettings - increase/decrease temp ##### - - conditions: "{{ trigger.event.data.new_state.state in [ 'releaseincreasetemp', 'releasedecreasetemp'] }}" + - delay: + milliseconds: "1000" + - alias: page climate + conditions: '{{ nspanel_event.page == nextion.pages.climate and trigger.entity_id is match "climate." }}' sequence: - - variables: - delta: "{{ +0.5 if trigger.event.data.new_state.state == 'releaseincreasetemp' else -0.5 }}" - - if: "{{ entity_long_state != 'off' }}" - then: - - if: "{{ climate_optimistic == true }}" ## TODO - remove from here - then: - - variables: - current_setpoint: "{{ states(display_target_temperature) | default('unavailable') if display_target_temperature is string else 'unavailable' }}" - - if: "{{ is_number(current_setpoint) }}" - then: - - service: "{{ nextion.commands.thermostat_cycle }}" - data: - value: "{{ (current_setpoint + delta) | round(1) }}" - continue_on_error: true - else: - - variables: - current_setpoint: "{{state_attr(entity_long, 'temperature') | default('unavailable') if entity_long is string else 'unavailable' }}" - - if: "{{ is_number(current_setpoint) }}" - then: - - service: climate.set_temperature - data: - entity_id: "{{ entity_long }}" - #hvac_mode: 'heat' - temperature: "{{ (current_setpoint + delta) | round(1) }}" - continue_on_error: true - - ##### Page Climatesettings - climateslider ##### - - conditions: '{{ trigger.event.data.new_state.state is match "climateslider\d+" and trigger.event.data.new_state.state == states(last_click_climatesettings) }}' - sequence: - - if: "{{ entity_long_state != 'off' }}" + - *variables-settings_entity + - if: "{{ trigger.entity_id == settings_entity_dict.entity }}" then: - variables: - climateslider: "{{ trigger.event.data.new_state.state | replace('climateslider','') | int(-1) }}" - new_setpoint: "{{ (13.0 + (climateslider * 0.5)) if climateslider >= 0 and climateslider <= 27 }}" - - if: "{{ climate_optimistic == true }}" ## TODO - remove from here - then: - - service: "{{ nextion.commands.thermostat_cycle }}" - data: - value: "{{ new_setpoint }}" - continue_on_error: true - else: - - service: climate.set_temperature - data: - entity_id: "{{ entity_long }}" - #hvac_mode: 'heat' - temperature: "{{ new_setpoint }}" - continue_on_error: true + hvac_mode: "{{ states(settings_entity_dict.entity) | default('unavailable') if settings_entity_dict.entity is string else 'unavailable' }}" + heating_state: "{{ mui[language].climate.states.off if hvac_mode == 'off' else mui[language].climate.states.on }}" + heating_bt_pic: "{{ nextion.pics.heating.button.off if hvac_mode == 'off' else nextion.pics.heating.button.on }}" + - service: "{{ nextion.commands.text_printf }}" + data: + component: heating_state + message: "{{ heating_state }}" + continue_on_error: true + - *delay-default + - service: "{{ nextion.commands.printf }}" + data: + cmd: heating_bt_pic.pic={{ heating_bt_pic }} + continue_on_error: true - #### Page Climate - Close Climate Page ##### - - conditions: - - "{{ trigger.event.data.new_state.state == 'releaseclimateclose' }}" - sequence: - - service: "{{ nextion.commands.printf }}" - data: - cmd: "page {{ entity_back }}" - continue_on_error: true -##### TRIGGER - HOME PAGE ###### + ########## TRIGGER - HOME PAGE ########### ##### HOME PAGE - Values ##### - alias: Home page - Values @@ -5642,10 +5612,9 @@ action: - home_value01_state - home_value02_state - home_value03_state - - "{{ nextion.pages.current == nextion.pages.home }}" + - "{{ nspanel_event.page == nextion.pages.home }}" sequence: - *variables-home_page_values - #- *display-home_page_values - repeat: for_each: "{{ home_page_values | selectattr('entity', 'defined') | selectattr('entity', 'eq', trigger.entity_id) | list }}" sequence: @@ -5666,7 +5635,7 @@ action: - chip05_state - chip06_state - chip07_state - - "{{ nextion.pages.current == nextion.pages.home and trigger.event.data.new_state.state not in ['unavailable', 'unknown'] }}" + - "{{ nspanel_event.page == nextion.pages.home and trigger.event.data.new_state.state not in ['unavailable', 'unknown'] }}" sequence: - *variables-home_page_status_bar - repeat: @@ -5674,81 +5643,6 @@ action: sequence: - *display-home_page_status_bar - ##### JUMP TO - climate page ##### - - alias: Jump to climate page - conditions: - - condition: trigger - id: open_climate_page - - condition: template - value_template: "{{ nextion.pages.current == nextion.pages.home and climate | length > 0 }} " - sequence: - - variables: - entity_long: "{{ climate }}" - entity_long_state: "{{ states(climate) | default('unavailable') if climate is string else 'unavailable' }}" - entity_long_name: "{{ climate if entity_long_state in ['unavailable', 'unknown', None] else (state_attr(climate, 'friendly_name') | default(mui[language].no_name) if climate is string else mui[language].unavailable )}}" - entity_back: "{{ nextion.pages.home }}" - - service: "{{ nextion.commands.set_settings_entity }}" - data: - entity: "{{ entity_long }},{{ entity_back }},{{ entity_long_name }}" - continue_on_error: true - - - service: "{{ nextion.commands.printf }}" - data: - cmd: "page {{ nextion.pages.climate }}" - continue_on_error: true - - ##### JUMP TO - Weather Page ##### - - alias: Jump to weather page - conditions: - - condition: trigger - id: open_weather_page - - condition: template - value_template: "{{ nextion.pages.current == nextion.pages.home }}" - sequence: - - service: "{{ nextion.commands.printf }}" - data: - cmd: "page {{ nextion.pages.weatherpages[0] }}" - continue_on_error: true - - ##### JUMP TO - QR Code Page ##### - - alias: Jump to QR code page - conditions: - - condition: trigger - id: open_qrcode_page - - condition: template - value_template: "{{ nextion.pages.current == nextion.pages.home and qrcode_enabled == true }}" - sequence: - - service: "{{ nextion.commands.printf }}" - data: - cmd: "page {{ nextion.pages.qrcode }}" - continue_on_error: true - - ##### JUMP TO - ENTITY Page ##### - - alias: Jump to entity page - conditions: - - condition: trigger - id: open_entity_page - - condition: template - value_template: "{{ nextion.pages.current == nextion.pages.home and entitypages_enabled == true }}" - sequence: - - service: "{{ nextion.commands.printf }}" - data: - cmd: "page {{ nextion.pages.entitypages[0] }}" - continue_on_error: true - - ##### JUMP TO - notification ##### - - alias: Jump to notification page - conditions: - - condition: trigger - id: open_notification_page - - condition: template - value_template: "{{ nextion.pages.current == nextion.pages.home and notification_text is string and states(notification_text) | length > 0 }}" - sequence: - - service: "{{ nextion.commands.printf }}" - data: - cmd: "page {{ nextion.pages.notification }}" - continue_on_error: true - #### SHOW BUTTON - notification #### - alias: Show button - Notification conditions: @@ -5757,7 +5651,7 @@ action: - notification_text_state - notification_unread_state - condition: template - value_template: "{{ nextion.pages.current == nextion.pages.home and trigger.event.data.new_state.state not in ['unavailable', 'unknown', None] }}" + value_template: "{{ nspanel_event.page == nextion.pages.home and trigger.event.data.new_state.state not in ['unavailable', 'unknown', None] }}" sequence: - alias: "Set notifiy pic" variables: @@ -5787,43 +5681,6 @@ action: message: "{{ set_button04_icon_font }}" continue_on_error: true - ##### SHOW BUTTON - notification clear ##### - - alias: Show button - Notification clear - conditions: - - condition: trigger - id: btn_notificationclearrelease - - condition: template - value_template: "{{ nextion.pages.current == nextion.pages.notification and confirmation_message is string and states(confirmation_message) | default('unavailable') != 'on' }}" - sequence: - - service: switch.turn_off - data: - entity_id: "{{ notification_unread }}" - continue_on_error: true - - service: "{{ nextion.commands.printf }}" - data: - cmd: "page {{ nextion.pages.home }}" - continue_on_error: true - - ##### SHOW BUTTON - notification accept ##### - - alias: Show button - Notification accept - conditions: - - condition: trigger - id: btn_notificationacceptrelease - - condition: template - value_template: "{{ nextion.pages.current == nextion.pages.notification and confirmation_message is string and states(confirmation_message) | default('unavailable') != 'on' }}" - sequence: - - service: switch.turn_off - data: - entity_id: "{{ notification_unread }}" - continue_on_error: true - - service: "{{ nextion.commands.notification_clear }}" - data: {} - continue_on_error: true - - service: "{{ nextion.commands.printf }}" - data: - cmd: "page {{ nextion.pages.home }}" - continue_on_error: true - ##### BUTTON - press ##### - alias: Button - Press conditions: @@ -5842,20 +5699,9 @@ action: - choose: - conditions: "{{ button_context.hold_select == 'Default' and button_context.entity | length > 0 }}" sequence: - - variables: - entity_long: "{{ button_context.entity }}" - button_status: "{{ states(button_context.entity) | default('unavailable') if button_context.entity is string else 'unavailable' }}" - entity_long_name: >- - {%- if button_context.name | length > 0 -%} {{ button_context.name }} - {%- elif button_status in ['unavailable', 'unknown', None] -%} {{ button_context.entity }} - {%- else -%} {{ state_attr(button_context.entity, 'friendly_name') | default(mui[language].no_name) }} - {%- endif -%} - entity_back: "{{ nextion.pages.home }}" - entity_long_icon: "{{ nextion.icons.buttons[button_context.entity.split('.')[0] if button_context.entity else '\U0000E2D5'] }}" - entity_long_icon_color: 1055 - service: "{{ nextion.commands.set_settings_entity }}" data: - entity: "{{ entity_long }},{{ entity_back }},{{ entity_long_name }},{{ entity_long_icon }},{{ entity_long_icon_color }}" + entity: "{{ button_context }}" continue_on_error: true - conditions: "{{ button_context.hold_select == 'Custom Action' and trigger.id == 'left_button_press' }}" sequence: !input left_button_hold_custom_action @@ -5888,7 +5734,7 @@ action: - left_button_state - right_button_state - condition: template - value_template: "{{ nextion.pages.current == nextion.pages.home }}" + value_template: "{{ nspanel_event.page == nextion.pages.home }}" sequence: - variables: # Hardware Button PIC @@ -5905,7 +5751,7 @@ action: - condition: trigger id: time_state - condition: template - value_template: "{{ nextion.pages.current == nextion.pages.home }}" + value_template: "{{ nspanel_event.page == nextion.pages.home }}" sequence: ### TIME Font Color ### - *delay-default @@ -5956,7 +5802,7 @@ action: - condition: trigger id: outdoortemp_state - condition: template - value_template: "{{ nextion.pages.current == nextion.pages.home and is_number(trigger.event.data.new_state.state) }}" + value_template: "{{ nspanel_event.page == nextion.pages.home and is_number(trigger.event.data.new_state.state) }}" sequence: ### LABEL Outdoor Temp Font Color ### - *delay-default @@ -5979,7 +5825,7 @@ action: - condition: trigger id: indoortemp_state - condition: template - value_template: "{{ nextion.pages.current == nextion.pages.home and trigger.event.data.new_state.state not in ['unavailable', 'unknown', None] }}" + value_template: "{{ nspanel_event.page == nextion.pages.home and trigger.event.data.new_state.state not in ['unavailable', 'unknown', None] }}" sequence: ### LABEL Indoor Temp Font Color ### - *delay-default @@ -6002,7 +5848,7 @@ action: - condition: trigger id: nspaneltemp_state - condition: template - value_template: "{{ nextion.pages.current == nextion.pages.home and is_number(trigger.event.data.new_state.state) }}" + value_template: "{{ nspanel_event.page == nextion.pages.home and is_number(trigger.event.data.new_state.state) }}" sequence: - if: "{{ indoortemp is not match 'sensor.' }}" then: @@ -6027,7 +5873,7 @@ action: - condition: trigger id: weather_state_change - condition: template - value_template: "{{ nextion.pages.current == nextion.pages.home and trigger.event.data.new_state.state not in ['unavailable', 'unknown', None] }}" + value_template: "{{ nspanel_event.page == nextion.pages.home and trigger.event.data.new_state.state not in ['unavailable', 'unknown', None] }}" sequence: - if: "{{ outdoortemp is not match 'sensor.' }}" then: @@ -6062,7 +5908,7 @@ action: id: climate_state - "{{ trigger.event.data.new_state.state not in ['unavailable', 'unknown', None] }}" # - condition: template - # value_template: "{{ nextion.pages.current == nextion.pages.climate }}" + # value_template: "{{ nspanel_event.page == nextion.pages.climate }}" # - condition: template # value_template: "{{ climate_optimistic == false }}" sequence: @@ -6106,7 +5952,7 @@ action: conditions: - condition: trigger id: hotwatercharge_state - - "{{ nextion.pages.current == nextion.pages.climate }}" + - "{{ nspanel_event.page == nextion.pages.climate }}" sequence: - variables: hotw_bt_pic: "{{ nextion.pics.hvac.button[trigger.event.data.new_state.state] }}" @@ -6120,7 +5966,7 @@ action: conditions: - condition: trigger id: hotwatertemp_state - - "{{ nextion.pages.current == nextion.pages.climate and trigger.event.data.new_state.state not in ['unavailable', 'unknown', None] }}" + - "{{ nspanel_event.page == nextion.pages.climate and trigger.event.data.new_state.state not in ['unavailable', 'unknown', None] }}" sequence: - service: "{{ nextion.commands.text_printf }}" data: diff --git a/nspanel_esphome.yaml b/nspanel_esphome.yaml index df35e12..640abef 100644 --- a/nspanel_esphome.yaml +++ b/nspanel_esphome.yaml @@ -111,6 +111,13 @@ uart: rx_pin: 17 baud_rate: ${baud_rate} id: tf_uart + # debug: + # direction: BOTH + # dummy_receiver: false + # after: + # delimiter: "\n" + # sequence: + # - lambda: UARTDebug::log_string(direction, bytes); ##### START - BUTTON CONFIGURATION ##### button: @@ -150,7 +157,7 @@ api: # password: ${api_password} services: - ##### SERVICE TO UPDATE THE HMI FILE ##### + ##### SERVICE TO UPDATE THE HMI FILE ############## - service: upload_tft then: - switch.turn_off: nextion_init @@ -407,36 +414,6 @@ globals: restore_value: true initial_value: '0' - ##### lastclick_general State ##### - - id: lastclick_general_global - type: std::string - restore_value: no - initial_value: '' - - ##### lastclick_lightsettings State ##### - - id: lastclick_lightsettings_global - type: std::string - restore_value: no - initial_value: '' - - ##### lastclick_coversettings State ##### - - id: lastclick_coversettings_global - type: std::string - restore_value: no - initial_value: '' - - ##### lastclick_climatesettings State ##### - - id: lastclick_climatesettings_global - type: std::string - restore_value: no - initial_value: '' - - ##### lastclick_currentpage State ##### - - id: currentpage_global - type: std::string - restore_value: no - initial_value: '' - ##### START - BINARY SENSOR CONFIGURATION ##### binary_sensor: @@ -659,140 +636,35 @@ text_sensor: name: ${device_name} Settings Entity id: settings_entity - ##### last click sensor, the main action variable - push to HA ##### + ##### NSPanel event sensor, the main action sensor - push to HA ##### - platform: nextion nextion_id: disp1 - name: ${device_name} Last Click - id: disp1_lastclick_general - update_interval: 50ms - component_name: lastclick + name: ${device_name} NSPanel event + id: disp1_nspanel_event + component_name: nspanelevent internal: false filters: - lambda: |- - if (strcmp(x.c_str(), id(lastclick_general_global).c_str()) != 0) { - return x; - } else { - return {}; - } + x = x.c_str(); + x.shrink_to_fit(); + return x; on_value: then: - - globals.set: - id: lastclick_general_global - value: !lambda return x; - lambda: |- id(page_timer)->execute(int(id(page_timeout).state)); - ##### last click lightsettings page, the main action variable - push to HA ##### - - platform: nextion - nextion_id: disp1 - name: ${device_name} last click lightsettings - id: disp1_lastclick_lightsettings - update_interval: 50ms - component_name: lightsetting - internal: false - filters: - - lambda: |- - if (strcmp(x.c_str(), id(lastclick_lightsettings_global).c_str()) != 0) { - return x; - } else { - return {}; - } - on_value: - then: - - globals.set: - id: lastclick_lightsettings_global - value: !lambda return x; - - lambda: |- - id(page_timer)->execute(int(id(page_timeout).state)); - - ##### last click coversettings page, the main action variable - push to HA ##### - - platform: nextion - nextion_id: disp1 - name: ${device_name} last click coversettings - id: disp1_lastclick_coversettings - update_interval: 50ms - component_name: coversetting - internal: false - filters: - - lambda: |- - if (strcmp(x.c_str(), id(lastclick_coversettings_global).c_str()) != 0) { - return x; - } else { - return {}; - } - on_value: - then: - - globals.set: - id: lastclick_coversettings_global - value: !lambda return x; - - lambda: |- - id(page_timer)->execute(int(id(page_timeout).state)); - - ##### last click climate page, the main action variable - push to HA ##### - - platform: nextion - nextion_id: disp1 - name: ${device_name} last click climatesettings - id: disp1_lastclick_climatesettings - update_interval: 50ms - component_name: climatesetting - internal: false - filters: - - lambda: |- - if (strcmp(x.c_str(), id(lastclick_climatesettings_global).c_str()) != 0) { - return x; - } else { - return {}; - } - on_value: - then: - - globals.set: - id: lastclick_climatesettings_global - value: !lambda return x; - - lambda: |- - id(page_timer)->execute(int(id(page_timeout).state)); - - ##### currentpage sensor, the main action variable - push to HA ##### - - platform: nextion - nextion_id: disp1 - name: ${device_name} currentpage - id: disp1_currentpage - update_interval: 50ms - component_name: currentpage - internal: false - filters: - - lambda: |- - if (strcmp(x.c_str(), id(currentpage_global).c_str()) != 0) { - return x; - } else { - return {}; - } - on_value: - then: - - globals.set: - id: currentpage_global - value: !lambda return x; - - lambda: |- - id(page_timer)->execute(int(id(page_timeout).state)); - - ##### touchevent sensor, Reset the page timeout ##### - platform: nextion nextion_id: disp1 #name: ${device_name} touchevent id: disp1_touchevent - update_interval: 50ms component_name: touchevent internal: true filters: - lambda: |- - static std::string touchevent_history = ""; - if (strcmp(x.c_str(), touchevent_history.c_str()) != 0) { - touchevent_history = x; - return x; - // touchevent_history = ""; - } else { - return {}; - } + x = x.c_str(); + x.shrink_to_fit(); + return x; on_value: then: - lambda: |- @@ -1007,7 +879,10 @@ script: - lambda: ESP_LOGD("nspanel", "start page-timer delay %i", int(id(page_timeout).state)); - delay: !lambda return delay *1000; - lambda: |- - if (id(disp1_currentpage).state == "home" or id(disp1_currentpage).state == "screensaver" or id(disp1_currentpage).state == "boot" or int(id(page_timeout).state) == 0) { + DynamicJsonDocument doc(1024); + deserializeJson(doc, id(disp1_nspanel_event).state); + std::string page = doc["page"]; + if (page == "home" or page == "screensaver" or page == "boot" or int(id(page_timeout).state) == 0) { ESP_LOGD("nspanel", "no page-jump"); } else { ESP_LOGD("nspanel", "timer->home"); diff --git a/nspanel_eu.HMI b/nspanel_eu.HMI index 314db18..4e3f537 100644 Binary files a/nspanel_eu.HMI and b/nspanel_eu.HMI differ diff --git a/nspanel_eu.tft b/nspanel_eu.tft index 8f9af8c..61ea836 100644 Binary files a/nspanel_eu.tft and b/nspanel_eu.tft differ diff --git a/nspanel_eu_code/Program.s.txt b/nspanel_eu_code/Program.s.txt new file mode 100644 index 0000000..81f0ee5 --- /dev/null +++ b/nspanel_eu_code/Program.s.txt @@ -0,0 +1,11 @@ +Program.s + //The following code is only run once when power on, and is generally used for global variable definition and power on initialization data + int sys0=0,sys1=0,sys2=0,swipex=0,swipey=0,swipex2=0,swipey2=0,swipec=0,swipec2=0,swipedx=100,swipedy=100 //At present, the definition of global variable only supports 4-byte signed integer (int), and other types of global quantity declaration are not supported. If you want to use string type, you can use variable control in the page to implement + int r=0,g=0,b=0 + int h=0,s=0,v=0 + int p=0,q=0,t=0,f=0 + bauds=115200//Configure baudrat + recmod=0//Serial data parsing mode:0-Passive mode;1-Active mod + printh 00 00 00 ff ff ff 88 ff ff ff//Output power on information to serial pore + lcd_dev fffb 0002 0000 0020// Fix touch offset for EU Version + page 8//Power on start page boot diff --git a/nspanel_eu_code/boot.txt b/nspanel_eu_code/boot.txt new file mode 100644 index 0000000..f69593e --- /dev/null +++ b/nspanel_eu_code/boot.txt @@ -0,0 +1,302 @@ +Page boot + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 480 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : picture + Back. Picture ID : 98 + + Events + Preinitialize Event + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"boot\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + +Text ip_addr + Attributes + ID : 1 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 27 + y coordinate : 12 + Width : 172 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 98 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : Initializing... + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text t0 + Attributes + ID : 2 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 27 + y coordinate : 75 + Width : 250 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 4 + Cropped Back. Picture ID: 98 + Horizontal Alignment : left + Vertical Alignment : center + Input Type : character + Text : Please wait... + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text t1 + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 27 + y coordinate : 109 + Width : 173 + Height : 36 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 1 + Cropped Back. Picture ID: 98 + Horizontal Alignment : left + Vertical Alignment : center + Input Type : character + Text : The process can take several seconds! + Max. Text Size : 50 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text tft_label + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 27 + y coordinate : 168 + Width : 40 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 2 + Cropped Back. Picture ID: 98 + Horizontal Alignment : left + Vertical Alignment : center + Input Type : character + Text : TFT: + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text esph_label + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 27 + y coordinate : 193 + Width : 95 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 2 + Cropped Back. Picture ID: 98 + Horizontal Alignment : left + Vertical Alignment : center + Input Type : character + Text : ESPHome: + Max. Text Size : 8 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text bluep_label + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 27 + y coordinate : 218 + Width : 92 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 2 + Cropped Back. Picture ID: 98 + Horizontal Alignment : left + Vertical Alignment : center + Input Type : character + Text : Blueprint: + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text tft_version + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 72 + y coordinate : 168 + Width : 95 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 2 + Cropped Back. Picture ID: 98 + Horizontal Alignment : left + Vertical Alignment : center + Input Type : character + Text : 3.2.3 + Max. Text Size : 8 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text esph_version + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 124 + y coordinate : 193 + Width : 95 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 2 + Cropped Back. Picture ID: 98 + Horizontal Alignment : left + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 8 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text bluep_version + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 124 + y coordinate : 218 + Width : 95 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 2 + Cropped Back. Picture ID: 98 + Horizontal Alignment : left + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 8 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Dual-state Button a01 + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID : on press and release + Opacity : 127 + x coordinate : 26 + y coordinate : 267 + Width : 80 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : 3D auto + Font ID : 0 + Back. Color (Unpressed) : 50712 + Back. Picture ID (Pressed): 65535 + Back. Color (Pressed) : 9375 + Font Color (Unpressed) : 0 + Font Color (Pressed) : 65535 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text : Reboot + Max. Text Size : 6 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + diff --git a/nspanel_eu_code/buttonpage01.txt b/nspanel_eu_code/buttonpage01.txt new file mode 100644 index 0000000..dc220d7 --- /dev/null +++ b/nspanel_eu_code/buttonpage01.txt @@ -0,0 +1,1254 @@ +Page buttonpage01 + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 480 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : picture + Back. Picture ID : 115 + + Events + Preinitialize Event + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"buttonpage01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + vis 255,0 + vis button_back,1 + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"buttonpage01\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"buttonpage01\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Variable (string) lastclick + Attributes + ID : 45 + Scope : local + Text : + Max. Text Size: 100 + +Text button01text + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 27 + y coordinate : 116 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button01bri + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 58 + y coordinate : 55 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button02text + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 134 + y coordinate : 116 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button02bri + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 165 + y coordinate : 55 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button03text + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 241 + y coordinate : 116 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button03bri + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 272 + y coordinate : 55 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button04text + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 348 + y coordinate : 116 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button04bri + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 379 + y coordinate : 55 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button05text + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 27 + y coordinate : 246 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button05bri + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 58 + y coordinate : 186 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button06text + Attributes + ID : 19 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 134 + y coordinate : 246 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button06bri + Attributes + ID : 20 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 165 + y coordinate : 186 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button07text + Attributes + ID : 22 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 241 + y coordinate : 246 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button07bri + Attributes + ID : 23 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 272 + y coordinate : 186 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button08text + Attributes + ID : 25 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 348 + y coordinate : 246 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button08bri + Attributes + ID : 26 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 379 + y coordinate : 186 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text bpage01_label + Attributes + ID : 28 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 10 + y coordinate : 0 + Width : 300 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 3 + Back. Color : 0 + Font Color : 50712 + Horizontal Alignment: left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 30 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button01icon + Attributes + ID : 29 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 23 + y coordinate : 55 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button02icon + Attributes + ID : 30 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 130 + y coordinate : 55 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button03icon + Attributes + ID : 31 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 237 + y coordinate : 55 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button04icon + Attributes + ID : 32 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 344 + y coordinate : 55 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button05icon + Attributes + ID : 33 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 23 + y coordinate : 186 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button06icon + Attributes + ID : 34 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 130 + y coordinate : 186 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button07icon + Attributes + ID : 35 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 237 + y coordinate : 186 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button08icon + Attributes + ID : 36 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 344 + y coordinate : 186 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Picture button01pic + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 17 + y coordinate : 45 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button02pic + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 124 + y coordinate : 45 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button03pic + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 231 + y coordinate : 45 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button04pic + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 338 + y coordinate : 45 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button05pic + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 17 + y coordinate : 176 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button06pic + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 124 + y coordinate : 176 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button07pic + Attributes + ID : 21 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 231 + y coordinate : 176 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button08pic + Attributes + ID : 24 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 338 + y coordinate : 176 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Hotspot button_back + Attributes + ID : 27 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 387 + y coordinate : 0 + Width : 60 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + page home + +Hotspot button01 + Attributes + ID : 37 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 17 + y coordinate : 45 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button01\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button01\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button02 + Attributes + ID : 38 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 124 + y coordinate : 45 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button02\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button02\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button03 + Attributes + ID : 39 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 231 + y coordinate : 45 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button03\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button03\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button04 + Attributes + ID : 40 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 338 + y coordinate : 45 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button04\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button04\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button05 + Attributes + ID : 41 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 17 + y coordinate : 176 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button05\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button05\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button06 + Attributes + ID : 42 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 124 + y coordinate : 176 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button06\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button06\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button07 + Attributes + ID : 43 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 231 + y coordinate : 176 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button07\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button07\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button08 + Attributes + ID : 44 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 338 + y coordinate : 176 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button08\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button08\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Timer swipestore + Attributes + ID : 2 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 1 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + page home + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_eu_code/buttonpage02.txt b/nspanel_eu_code/buttonpage02.txt new file mode 100644 index 0000000..d92a849 --- /dev/null +++ b/nspanel_eu_code/buttonpage02.txt @@ -0,0 +1,1254 @@ +Page buttonpage02 + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 480 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : picture + Back. Picture ID : 116 + + Events + Preinitialize Event + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"buttonpage02\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + vis 255,0 + vis button_back,1 + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"buttonpage02\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"buttonpage02\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Variable (string) lastclick + Attributes + ID : 45 + Scope : local + Text : + Max. Text Size: 100 + +Text button01text + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 27 + y coordinate : 116 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button01bri + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 58 + y coordinate : 55 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button02text + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 134 + y coordinate : 116 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button02bri + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 165 + y coordinate : 55 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button03text + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 241 + y coordinate : 116 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button03bri + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 272 + y coordinate : 55 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button04text + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 348 + y coordinate : 116 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button04bri + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 379 + y coordinate : 55 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button05text + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 27 + y coordinate : 246 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button05bri + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 58 + y coordinate : 186 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button06text + Attributes + ID : 19 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 134 + y coordinate : 246 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button06bri + Attributes + ID : 20 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 165 + y coordinate : 186 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button07text + Attributes + ID : 22 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 241 + y coordinate : 246 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button07bri + Attributes + ID : 23 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 272 + y coordinate : 186 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button08text + Attributes + ID : 25 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 348 + y coordinate : 246 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button08bri + Attributes + ID : 26 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 379 + y coordinate : 186 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text bpage02_label + Attributes + ID : 28 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 10 + y coordinate : 0 + Width : 300 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 3 + Back. Color : 0 + Font Color : 50712 + Horizontal Alignment: left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 30 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button01icon + Attributes + ID : 29 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 23 + y coordinate : 55 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button02icon + Attributes + ID : 30 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 130 + y coordinate : 55 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button03icon + Attributes + ID : 31 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 237 + y coordinate : 55 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button04icon + Attributes + ID : 32 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 344 + y coordinate : 55 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button05icon + Attributes + ID : 33 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 23 + y coordinate : 186 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button06icon + Attributes + ID : 34 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 130 + y coordinate : 186 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button07icon + Attributes + ID : 35 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 237 + y coordinate : 186 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button08icon + Attributes + ID : 36 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 344 + y coordinate : 186 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Picture button01pic + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 17 + y coordinate : 45 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button02pic + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 124 + y coordinate : 45 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button03pic + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 231 + y coordinate : 45 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button04pic + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 338 + y coordinate : 45 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button05pic + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 17 + y coordinate : 176 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button06pic + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 124 + y coordinate : 176 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button07pic + Attributes + ID : 21 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 231 + y coordinate : 176 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button08pic + Attributes + ID : 24 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 338 + y coordinate : 176 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Hotspot button_back + Attributes + ID : 27 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 387 + y coordinate : 0 + Width : 60 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + page home + +Hotspot button01 + Attributes + ID : 37 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 17 + y coordinate : 45 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button01\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button01\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button02 + Attributes + ID : 38 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 124 + y coordinate : 45 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button02\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button02\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button03 + Attributes + ID : 39 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 231 + y coordinate : 45 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button03\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button03\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button04 + Attributes + ID : 40 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 338 + y coordinate : 45 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button04\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button04\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button05 + Attributes + ID : 41 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 17 + y coordinate : 176 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button05\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button05\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button06 + Attributes + ID : 42 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 124 + y coordinate : 176 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button06\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button06\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button07 + Attributes + ID : 43 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 231 + y coordinate : 176 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button07\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button07\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button08 + Attributes + ID : 44 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 338 + y coordinate : 176 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button08\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button08\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Timer swipestore + Attributes + ID : 2 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 1 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + page buttonpage01 + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + page home + } + } + diff --git a/nspanel_eu_code/buttonpage03.txt b/nspanel_eu_code/buttonpage03.txt new file mode 100644 index 0000000..e09c8f7 --- /dev/null +++ b/nspanel_eu_code/buttonpage03.txt @@ -0,0 +1,1254 @@ +Page buttonpage03 + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 480 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : picture + Back. Picture ID : 117 + + Events + Preinitialize Event + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"buttonpage03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + vis 255,0 + vis button_back,1 + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"buttonpage03\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"buttonpage03\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Variable (string) lastclick + Attributes + ID : 45 + Scope : local + Text : + Max. Text Size: 100 + +Text button01text + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 27 + y coordinate : 116 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button01bri + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 58 + y coordinate : 55 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button02text + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 134 + y coordinate : 116 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button02bri + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 165 + y coordinate : 55 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button03text + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 241 + y coordinate : 116 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button03bri + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 272 + y coordinate : 55 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button04text + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 348 + y coordinate : 116 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button04bri + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 379 + y coordinate : 55 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button05text + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 27 + y coordinate : 246 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button05bri + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 58 + y coordinate : 186 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button06text + Attributes + ID : 19 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 134 + y coordinate : 246 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button06bri + Attributes + ID : 20 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 165 + y coordinate : 186 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button07text + Attributes + ID : 22 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 241 + y coordinate : 246 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button07bri + Attributes + ID : 23 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 272 + y coordinate : 186 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button08text + Attributes + ID : 25 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 348 + y coordinate : 246 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button08bri + Attributes + ID : 26 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 379 + y coordinate : 186 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text bpage03_label + Attributes + ID : 28 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 10 + y coordinate : 0 + Width : 300 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 3 + Back. Color : 0 + Font Color : 50712 + Horizontal Alignment: left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 30 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button01icon + Attributes + ID : 29 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 23 + y coordinate : 55 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button02icon + Attributes + ID : 30 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 130 + y coordinate : 55 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button03icon + Attributes + ID : 31 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 237 + y coordinate : 55 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button04icon + Attributes + ID : 32 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 344 + y coordinate : 55 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button05icon + Attributes + ID : 33 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 23 + y coordinate : 186 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button06icon + Attributes + ID : 34 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 130 + y coordinate : 186 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button07icon + Attributes + ID : 35 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 237 + y coordinate : 186 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button08icon + Attributes + ID : 36 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 344 + y coordinate : 186 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Picture button01pic + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 17 + y coordinate : 45 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button02pic + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 124 + y coordinate : 45 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button03pic + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 231 + y coordinate : 45 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button04pic + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 338 + y coordinate : 45 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button05pic + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 17 + y coordinate : 176 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button06pic + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 124 + y coordinate : 176 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button07pic + Attributes + ID : 21 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 231 + y coordinate : 176 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button08pic + Attributes + ID : 24 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 338 + y coordinate : 176 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Hotspot button_back + Attributes + ID : 27 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 387 + y coordinate : 0 + Width : 60 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + page home + +Hotspot button01 + Attributes + ID : 37 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 17 + y coordinate : 45 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button01\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button01\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button02 + Attributes + ID : 38 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 124 + y coordinate : 45 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button02\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button02\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button03 + Attributes + ID : 39 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 231 + y coordinate : 45 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button03\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button03\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button04 + Attributes + ID : 40 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 338 + y coordinate : 45 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button04\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button04\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button05 + Attributes + ID : 41 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 17 + y coordinate : 176 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button05\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button05\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button06 + Attributes + ID : 42 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 124 + y coordinate : 176 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button06\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button06\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button07 + Attributes + ID : 43 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 231 + y coordinate : 176 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button07\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button07\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button08 + Attributes + ID : 44 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 338 + y coordinate : 176 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button08\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button08\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Timer swipestore + Attributes + ID : 2 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 1 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + page buttonpage02 + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + page home + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_eu_code/buttonpage04.txt b/nspanel_eu_code/buttonpage04.txt new file mode 100644 index 0000000..170f4cb --- /dev/null +++ b/nspanel_eu_code/buttonpage04.txt @@ -0,0 +1,1254 @@ +Page buttonpage04 + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 480 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : picture + Back. Picture ID : 118 + + Events + Preinitialize Event + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"buttonpage04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + vis 255,0 + vis button_back,1 + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"buttonpage04\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"buttonpage04\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Variable (string) lastclick + Attributes + ID : 45 + Scope : local + Text : + Max. Text Size: 100 + +Text button01text + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 27 + y coordinate : 116 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button01bri + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 58 + y coordinate : 55 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button02text + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 134 + y coordinate : 116 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button02bri + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 165 + y coordinate : 55 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button03text + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 241 + y coordinate : 116 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button03bri + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 272 + y coordinate : 55 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button04text + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 348 + y coordinate : 116 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button04bri + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 379 + y coordinate : 55 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button05text + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 27 + y coordinate : 246 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button05bri + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 58 + y coordinate : 186 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button06text + Attributes + ID : 19 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 134 + y coordinate : 246 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button06bri + Attributes + ID : 20 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 165 + y coordinate : 186 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button07text + Attributes + ID : 22 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 241 + y coordinate : 246 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button07bri + Attributes + ID : 23 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 272 + y coordinate : 186 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button08text + Attributes + ID : 25 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 348 + y coordinate : 246 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button08bri + Attributes + ID : 26 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 379 + y coordinate : 186 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text bpage04_label + Attributes + ID : 28 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 10 + y coordinate : 0 + Width : 300 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 3 + Back. Color : 0 + Font Color : 50712 + Horizontal Alignment: left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 30 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button01icon + Attributes + ID : 29 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 23 + y coordinate : 55 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button02icon + Attributes + ID : 30 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 130 + y coordinate : 55 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button03icon + Attributes + ID : 31 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 237 + y coordinate : 55 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button04icon + Attributes + ID : 32 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 344 + y coordinate : 55 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button05icon + Attributes + ID : 33 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 23 + y coordinate : 186 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button06icon + Attributes + ID : 34 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 130 + y coordinate : 186 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button07icon + Attributes + ID : 35 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 237 + y coordinate : 186 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button08icon + Attributes + ID : 36 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 344 + y coordinate : 186 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Picture button01pic + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 17 + y coordinate : 45 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button02pic + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 124 + y coordinate : 45 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button03pic + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 231 + y coordinate : 45 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button04pic + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 338 + y coordinate : 45 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button05pic + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 17 + y coordinate : 176 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button06pic + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 124 + y coordinate : 176 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button07pic + Attributes + ID : 21 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 231 + y coordinate : 176 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button08pic + Attributes + ID : 24 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 338 + y coordinate : 176 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Hotspot button_back + Attributes + ID : 27 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 387 + y coordinate : 0 + Width : 60 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + page home + +Hotspot button01 + Attributes + ID : 37 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 17 + y coordinate : 45 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button01\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button01\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button02 + Attributes + ID : 38 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 124 + y coordinate : 45 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button02\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button02\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button03 + Attributes + ID : 39 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 231 + y coordinate : 45 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button03\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button03\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button04 + Attributes + ID : 40 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 338 + y coordinate : 45 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button04\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button04\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button05 + Attributes + ID : 41 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 17 + y coordinate : 176 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button05\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button05\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button06 + Attributes + ID : 42 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 124 + y coordinate : 176 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button06\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button06\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button07 + Attributes + ID : 43 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 231 + y coordinate : 176 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button07\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button07\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button08 + Attributes + ID : 44 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 338 + y coordinate : 176 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button08\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button08\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Timer swipestore + Attributes + ID : 2 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 1 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + page buttonpage03 + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_eu_code/climate.txt b/nspanel_eu_code/climate.txt new file mode 100644 index 0000000..ef5ac56 --- /dev/null +++ b/nspanel_eu_code/climate.txt @@ -0,0 +1,916 @@ +Page climate + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 480 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : picture + Back. Picture ID : 96 + + Events + Preinitialize Event + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"climate\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Variable (int32) climateslider + Attributes + ID : 7 + Scope: local + Value: 0 + +Variable (int32) va0 + Attributes + ID : 21 + Scope: local + Value: 0 + +Variable (string) climatesetting + Attributes + ID : 24 + Scope : local + Text : + Max. Text Size: 100 + +Number sliderval + Attributes + ID : 22 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 460 + y coordinate : 280 + Width : 20 + Height : 40 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 1 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment : right + Vertical Alignment : center + Value : 0 + Significant digits shown: all + Format : decimal + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text current_temp + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 171 + y coordinate : 87 + Width : 105 + Height : 55 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 5 + Cropped Back. Picture ID: 96 + Horizontal Alignment : right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 6 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text target_temp + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 171 + y coordinate : 145 + Width : 105 + Height : 40 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 4 + Cropped Back. Picture ID: 96 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 6 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text outdoor_temp + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 16 + y coordinate : 52 + Width : 60 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 96 + Horizontal Alignment : right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 6 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text hotwater_temp + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 368 + y coordinate : 52 + Width : 60 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 96 + Horizontal Alignment : left + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 6 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text heating_state + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 169 + y coordinate : 201 + Width : 115 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 3 + Back. Color : 0 + Font Color : 65535 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text climate_label + Attributes + ID : 23 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 10 + y coordinate : 0 + Width : 260 + Height : 22 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 50712 + Horizontal Alignment: left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 30 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Picture climate_left + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 111 + y coordinate : 20 + Width : 58 + Height : 230 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 16 + + Events + Touch Press Event + slider.en=1 + + Touch Release Event + slider.en=0 + +Picture climate_middle + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 169 + y coordinate : 20 + Width : 114 + Height : 65 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 17 + + Events + Touch Press Event + slider.en=1 + + Touch Release Event + slider.en=0 + +Picture climate_right + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 283 + y coordinate : 20 + Width : 58 + Height : 230 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 18 + + Events + Touch Press Event + slider.en=1 + + Touch Release Event + slider.en=0 + +Picture climate_exit + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 415 + y coordinate : 10 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 56 + +Picture hotw_bt_pic + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 374 + y coordinate : 237 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 79 + +Picture heating_bt_pic + Attributes + ID : 19 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 211 + y coordinate : 239 + Width : 30 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 82 + +Hotspot decrease_temp + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 133 + y coordinate : 252 + Width : 51 + Height : 40 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + climatesetting.txt="{\"page\": \"climate\", \"component\": \"decreasetemp\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + climatesetting.txt="{\"page\": \"climate\", \"component\": \"decreasetemp\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + +Hotspot increase_temp + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 268 + y coordinate : 252 + Width : 50 + Height : 40 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + climatesetting.txt="{\"page\": \"climate\", \"component\": \"increasetemp\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + climatesetting.txt="{\"page\": \"climate\", \"component\": \"increasetemp\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + +Hotspot climate_back + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 387 + y coordinate : 0 + Width : 60 + Height : 60 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + climatesetting.txt="{\"page\": \"climate\", \"component\": \"close\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + climatesetting.txt="{\"page\": \"climate\", \"component\": \"close\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + +Hotspot hotwater_bt + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 369 + y coordinate : 232 + Width : 60 + Height : 60 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + climatesetting.txt="{\"page\": \"climate\", \"component\": \"hotwater\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + climatesetting.txt="{\"page\": \"climate\", \"component\": \"hotwater\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + +Hotspot heating_bt + Attributes + ID : 20 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 206 + y coordinate : 232 + Width : 40 + Height : 40 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + climatesetting.txt="{\"page\": \"climate\", \"component\": \"heating\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + climatesetting.txt="{\"page\": \"climate\", \"component\": \"heating\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + +Timer swipestore + Attributes + ID : 2 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +Timer slider + Attributes + ID : 6 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + // Left hand images vertical + if(tch0>=111&&tch0<169) // Left Hand images L/R coords + { + if(tch1>221&&tch1<=235) // step 0 + { + // climatesetting.txt="climateslider0" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 0}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>206&&tch1<=221) // step 1 + { + // climatesetting.txt="climateslider1" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 1}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>192&&tch1<=206) // step 2 + { + // climatesetting.txt="climateslider2" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 2}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>177&&tch1<=192) // step 3 + { + // climatesetting.txt="climateslider3" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 3}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>162&&tch1<=177) // step 4 + { + // climatesetting.txt="climateslider4" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 4}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>148&&tch1<=162) // step 5 up + { + // climatesetting.txt="climateslider5" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 5}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>133&&tch1<=148) // step 6 up + { + // climatesetting.txt="climateslider6" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 6}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>119&&tch1<=133) // step 7 up + { + // climatesetting.txt="climateslider7" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 7}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>105&&tch1<=119) // step 8 up + { + // climatesetting.txt="climateslider8" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 8}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>90&&tch1<=105) // step 9 up + { + // climatesetting.txt="climateslider9" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 9}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>70&&tch1<=90) // step 10 up + { + // climatesetting.txt="climateslider10" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 10}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>60&&tch1<=70) // step 11 up + { + // climatesetting.txt="climateslider11" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 11}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + } + // middle images horizontal + }else if(tch1>=35&&tch1<=80) // middle image U/D coords + { + if(tch0>169&&tch0<=188) // step 12 across + { + // climatesetting.txt="climateslider12" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 12}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch0>188&&tch0<=207) // step 13 + { + // climatesetting.txt="climateslider13" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 13}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch0>207&&tch0<=226) // step 14 + { + // climatesetting.txt="climateslider14" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 14}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch0>226&&tch0<=245) // step 15 + { + // climatesetting.txt="climateslider15" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 15}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch0>245&&tch0<=264) // step 16 + { + // climatesetting.txt="climateslider16" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 16}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch0>264&&tch0<=283) // step 17 + { + // climatesetting.txt="climateslider17" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 17}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + } + // right hand images vertical + }else if(tch0>=283&&tch0<=341) // right image L/R coords + { + if(tch1>60&&tch1<=80) // step 18 across + { + // climatesetting.txt="climateslider18" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 18}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>80&&tch1<=94) // step 19 + { + // climatesetting.txt="climateslider19" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 19}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>94&&tch1<=109) // step 20 + { + // climatesetting.txt="climateslider20" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 20}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>109&&tch1<=123) // step 21 + { + // climatesetting.txt="climateslider21" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 21}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>123&&tch1<=138) // step 22 + { + // climatesetting.txt="climateslider22" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 22}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>138&&tch1<=152) // step 23 + { + // climatesetting.txt="climateslider23" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 23}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>152&&tch1<=167) // step 24 + { + // climatesetting.txt="climateslider24" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 24}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>167&&tch1<=181) // step 25 + { + // climatesetting.txt="climateslider25" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 25}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>181&&tch1<=197) // step 26 + { + // climatesetting.txt="climateslider26" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 26}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>197&&tch1<=215) // step 27 + { + // climatesetting.txt="climateslider27" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 27}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>215&&tch1<=235) // step 28 + { + // climatesetting.txt="climateslider28" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 28}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + } + } + // pass climateslider.val + +TouchCap swipe + Attributes + ID : 1 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + //page + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_eu_code/coversettings.txt b/nspanel_eu_code/coversettings.txt new file mode 100644 index 0000000..a2bac87 --- /dev/null +++ b/nspanel_eu_code/coversettings.txt @@ -0,0 +1,455 @@ +Page coversettings + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 480 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : solid color + Back. Color : 0 + + Events + Preinitialize Event + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"coversettings\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"coversettings\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"coversettings\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Variable (string) va1 + Attributes + ID : 9 + Scope : local + Text : newtxt + Max. Text Size: 10 + +Variable (string) coversetting + Attributes + ID : 15 + Scope : local + Text : + Max. Text Size: 100 + +Text battery_value + Attributes + ID : 1 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 326 + y coordinate : 69 + Width : 60 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 65535 + Horizontal Alignment: left + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text cover_value + Attributes + ID : 2 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 183 + y coordinate : 43 + Width : 83 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 65535 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text cover_name + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 48 + y coordinate : 8 + Width : 300 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 65535 + Horizontal Alignment: left + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 25 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text icon_state + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 12 + y coordinate : 8 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 65535 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text battery_icon + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 291 + y coordinate : 66 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 8 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Picture cover_exit + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 415 + y coordinate : 10 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 56 + +Slider coverslider + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 183 + y coordinate : 67 + Width : 83 + Height : 233 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Direction : vertical + Fill : image + Cursor width : auto + Cursor height : 255 + Back. Picture ID : 63 + Slided Back. Picture ID: 62 + 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\": \"coversettings\", \"component\": \"cover_position\", \"value\": "+va1.txt+"}" + printh 92 + prints "nspanelevent",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 + Opacity : 127 + x coordinate : 295 + y coordinate : 186 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : image + Font ID : 1 + Background Picture ID (Unpressed): 57 + Back. Picture ID (Pressed) : 58 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + + Events + Touch Press Event + coversetting.txt="{\"page\": \"coversettings\", \"component\": \"open_cover\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",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 + Opacity : 127 + x coordinate : 295 + y coordinate : 250 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : image + Font ID : 1 + Background Picture ID (Unpressed): 59 + Back. Picture ID (Pressed) : 60 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + + Events + Touch Press Event + coversetting.txt="{\"page\": \"coversettings\", \"component\": \"close_cover\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints coversetting.txt,0 + printh 00 + printh FF FF FF + +Button cover_stop + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 104 + y coordinate : 250 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : image + Font ID : 1 + Background Picture ID (Unpressed): 65 + Back. Picture ID (Pressed) : 66 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + + Events + Touch Press Event + coversetting.txt="{\"page\": \"coversettings\", \"component\": \"stop_cover\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints coversetting.txt,0 + printh 00 + printh FF FF FF + +Hotspot cover_back + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 387 + y coordinate : 0 + Width : 60 + Height : 60 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + coversetting.txt="{\"page\": \"coversettings\", \"component\": \"close\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints coversetting.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + coversetting.txt="{\"page\": \"coversettings\", \"component\": \"close\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints coversetting.txt,0 + printh 00 + printh FF FF FF + +Timer swipestore + Attributes + ID : 8 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 7 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + //page + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_eu_code/entitypage01.txt b/nspanel_eu_code/entitypage01.txt new file mode 100644 index 0000000..51a2560 --- /dev/null +++ b/nspanel_eu_code/entitypage01.txt @@ -0,0 +1,797 @@ +Page entitypage01 + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 480 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : picture + Back. Picture ID : 105 + + Events + Preinitialize Event + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"entitypage01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"entitypage01\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"entitypage01\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Text value01_label + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 50 + y coordinate : 55 + Width : 270 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05_label + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 50 + y coordinate : 178 + Width : 270 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04_label + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 50 + y coordinate : 148 + Width : 270 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02_label + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 50 + y coordinate : 87 + Width : 270 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03_label + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 50 + y coordinate : 118 + Width : 270 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text entity01_label + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 10 + y coordinate : 0 + Width : 300 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 3 + Back. Color : 0 + Font Color : 50712 + Horizontal Alignment: left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 30 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value06_label + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 50 + y coordinate : 208 + Width : 270 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value07_label + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 50 + y coordinate : 238 + Width : 270 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value08_label + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 50 + y coordinate : 268 + Width : 270 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value01_pic + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 15 + y coordinate : 53 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02_pic + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 15 + y coordinate : 86 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03_pic + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 15 + y coordinate : 116 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04_pic + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 15 + y coordinate : 146 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05_pic + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 15 + y coordinate : 176 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value06_pic + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 15 + y coordinate : 206 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value07_pic + Attributes + ID : 19 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 15 + y coordinate : 236 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value08_pic + Attributes + ID : 20 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 15 + y coordinate : 266 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value01 + Attributes + ID : 21 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 330 + y coordinate : 55 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02 + Attributes + ID : 22 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 330 + y coordinate : 88 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03 + Attributes + ID : 23 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 330 + y coordinate : 118 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04 + Attributes + ID : 24 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 330 + y coordinate : 148 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05 + Attributes + ID : 25 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 330 + y coordinate : 178 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value06 + Attributes + ID : 26 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 330 + y coordinate : 208 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value07 + Attributes + ID : 27 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 330 + y coordinate : 238 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value08 + Attributes + ID : 28 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 330 + y coordinate : 267 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Hotspot entity01_back + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 387 + y coordinate : 0 + Width : 60 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + page home + +Timer swipestore + Attributes + ID : 2 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 1 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + page entitypage04 + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + page entitypage03 + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + page entitypage04 + } + } + diff --git a/nspanel_eu_code/entitypage02.txt b/nspanel_eu_code/entitypage02.txt new file mode 100644 index 0000000..b65b823 --- /dev/null +++ b/nspanel_eu_code/entitypage02.txt @@ -0,0 +1,797 @@ +Page entitypage02 + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 480 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : picture + Back. Picture ID : 106 + + Events + Preinitialize Event + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"entitypage02\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"entitypage02\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"entitypage02\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Text value01_label + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 50 + y coordinate : 55 + Width : 270 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05_label + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 50 + y coordinate : 178 + Width : 270 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04_label + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 50 + y coordinate : 148 + Width : 270 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02_label + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 50 + y coordinate : 87 + Width : 270 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03_label + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 50 + y coordinate : 118 + Width : 270 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text entity02_label + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 10 + y coordinate : 0 + Width : 300 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 3 + Back. Color : 0 + Font Color : 50712 + Horizontal Alignment: left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 30 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value06_label + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 50 + y coordinate : 208 + Width : 270 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value07_label + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 50 + y coordinate : 238 + Width : 270 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value08_label + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 50 + y coordinate : 268 + Width : 270 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value01_pic + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 15 + y coordinate : 53 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02_pic + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 15 + y coordinate : 86 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03_pic + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 15 + y coordinate : 116 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04_pic + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 15 + y coordinate : 146 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05_pic + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 15 + y coordinate : 176 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value06_pic + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 15 + y coordinate : 206 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value07_pic + Attributes + ID : 19 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 15 + y coordinate : 236 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value08_pic + Attributes + ID : 20 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 15 + y coordinate : 266 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value01 + Attributes + ID : 21 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 330 + y coordinate : 55 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02 + Attributes + ID : 22 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 330 + y coordinate : 88 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03 + Attributes + ID : 23 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 330 + y coordinate : 118 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04 + Attributes + ID : 24 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 330 + y coordinate : 148 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05 + Attributes + ID : 25 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 330 + y coordinate : 178 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value06 + Attributes + ID : 26 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 330 + y coordinate : 208 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value07 + Attributes + ID : 27 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 330 + y coordinate : 238 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value08 + Attributes + ID : 28 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 330 + y coordinate : 267 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Hotspot entity02_back + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 387 + y coordinate : 0 + Width : 60 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + page home + +Timer swipestore + Attributes + ID : 2 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 1 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + page entitypage01 + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_eu_code/entitypage03.txt b/nspanel_eu_code/entitypage03.txt new file mode 100644 index 0000000..dc6f191 --- /dev/null +++ b/nspanel_eu_code/entitypage03.txt @@ -0,0 +1,797 @@ +Page entitypage03 + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 480 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : picture + Back. Picture ID : 107 + + Events + Preinitialize Event + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"entitypage03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"entitypage03\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"entitypage03\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Text value01_label + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 50 + y coordinate : 55 + Width : 270 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05_label + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 50 + y coordinate : 178 + Width : 270 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04_label + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 50 + y coordinate : 148 + Width : 270 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02_label + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 50 + y coordinate : 87 + Width : 270 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03_label + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 50 + y coordinate : 118 + Width : 270 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text entity03_label + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 10 + y coordinate : 0 + Width : 300 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 3 + Back. Color : 0 + Font Color : 50712 + Horizontal Alignment: left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 30 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value06_label + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 50 + y coordinate : 208 + Width : 270 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value07_label + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 50 + y coordinate : 238 + Width : 270 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value08_label + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 50 + y coordinate : 268 + Width : 270 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value01_pic + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 15 + y coordinate : 53 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02_pic + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 15 + y coordinate : 86 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03_pic + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 15 + y coordinate : 116 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04_pic + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 15 + y coordinate : 146 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05_pic + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 15 + y coordinate : 176 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value06_pic + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 15 + y coordinate : 206 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value07_pic + Attributes + ID : 19 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 15 + y coordinate : 236 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value08_pic + Attributes + ID : 20 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 15 + y coordinate : 266 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value01 + Attributes + ID : 21 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 330 + y coordinate : 55 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02 + Attributes + ID : 22 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 330 + y coordinate : 88 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03 + Attributes + ID : 23 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 330 + y coordinate : 118 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04 + Attributes + ID : 24 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 330 + y coordinate : 148 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05 + Attributes + ID : 25 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 330 + y coordinate : 178 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value06 + Attributes + ID : 26 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 330 + y coordinate : 208 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value07 + Attributes + ID : 27 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 330 + y coordinate : 238 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value08 + Attributes + ID : 28 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 330 + y coordinate : 267 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Hotspot entity03_back + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 387 + y coordinate : 0 + Width : 60 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + page home + +Timer swipestore + Attributes + ID : 2 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 1 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + page entitypage02 + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + page entitypage01 + } + } + diff --git a/nspanel_eu_code/entitypage04.txt b/nspanel_eu_code/entitypage04.txt new file mode 100644 index 0000000..012c549 --- /dev/null +++ b/nspanel_eu_code/entitypage04.txt @@ -0,0 +1,797 @@ +Page entitypage04 + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 480 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : picture + Back. Picture ID : 108 + + Events + Preinitialize Event + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"entitypage04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"entitypage04\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"entitypage04\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Text value01_label + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 50 + y coordinate : 55 + Width : 270 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05_label + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 50 + y coordinate : 178 + Width : 270 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04_label + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 50 + y coordinate : 148 + Width : 270 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02_label + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 50 + y coordinate : 87 + Width : 270 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03_label + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 50 + y coordinate : 118 + Width : 270 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text entity04_label + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 10 + y coordinate : 0 + Width : 300 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 3 + Back. Color : 0 + Font Color : 50712 + Horizontal Alignment: left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 30 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value06_label + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 50 + y coordinate : 208 + Width : 270 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value07_label + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 50 + y coordinate : 238 + Width : 270 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value08_label + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 50 + y coordinate : 268 + Width : 270 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value01_pic + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 15 + y coordinate : 53 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02_pic + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 15 + y coordinate : 86 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03_pic + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 15 + y coordinate : 116 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04_pic + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 15 + y coordinate : 146 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05_pic + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 15 + y coordinate : 176 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value06_pic + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 15 + y coordinate : 206 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value07_pic + Attributes + ID : 19 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 15 + y coordinate : 236 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value08_pic + Attributes + ID : 20 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 15 + y coordinate : 266 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value01 + Attributes + ID : 21 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 330 + y coordinate : 55 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02 + Attributes + ID : 22 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 330 + y coordinate : 88 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03 + Attributes + ID : 23 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 330 + y coordinate : 118 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04 + Attributes + ID : 24 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 330 + y coordinate : 148 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05 + Attributes + ID : 25 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 330 + y coordinate : 178 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value06 + Attributes + ID : 26 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 330 + y coordinate : 208 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value07 + Attributes + ID : 27 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 330 + y coordinate : 238 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value08 + Attributes + ID : 28 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 330 + y coordinate : 267 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Hotspot entity04_back + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 387 + y coordinate : 0 + Width : 60 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + page home + +Timer swipestore + Attributes + ID : 2 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 1 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + page entitypage03 + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + page entitypage01 + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_eu_code/home.txt b/nspanel_eu_code/home.txt new file mode 100644 index 0000000..ddbbc3d --- /dev/null +++ b/nspanel_eu_code/home.txt @@ -0,0 +1,1324 @@ +Page home + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 480 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : picture + Back. Picture ID : 103 + + Events + Preinitialize Event + dim=brightness.val + dimtimer.en=1 + sleeptimer.en=1 + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"home\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + vis 255,0 + vis settings_click,1 + +Variable (int32) brightness + Attributes + ID : 2 + Scope: global + Value: 100 + +Variable (int32) brightdd + Attributes + ID : 3 + Scope: global + Value: 40 + +Variable (int32) disdim + Attributes + ID : 4 + Scope: global + Value: 0 + +Variable (int32) sleepmodus + Attributes + ID : 16 + Scope: global + Value: 0 + +Variable (string) lastclick + Attributes + ID : 54 + Scope : local + Text : + Max. Text Size: 100 + +Text time + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 251 + y coordinate : 45 + Width : 160 + Height : 62 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 6 + Cropped Back. Picture ID: 103 + Horizontal Alignment : right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text current_temp + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 59 + y coordinate : 178 + Width : 100 + Height : 40 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 4 + Cropped Back. Picture ID: 103 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 8 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text outdoor_temp + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 133 + y coordinate : 124 + Width : 87 + Height : 37 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 4 + Cropped Back. Picture ID: 103 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : -28.7° + Max. Text Size : 8 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text date + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 221 + y coordinate : 110 + Width : 230 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 25 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value01_state + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 56 + y coordinate : 222 + Width : 120 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 103 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text left_bt_text + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 47 + y coordinate : 283 + Width : 120 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 1 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text right_bt_text + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 288 + y coordinate : 281 + Width : 120 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 1 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text icon_top_01 + Attributes + ID : 21 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 13 + y coordinate : 5 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text icon_top_02 + Attributes + ID : 22 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 42 + y coordinate : 5 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text icon_top_03 + Attributes + ID : 23 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 71 + y coordinate : 5 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text icon_top_04 + Attributes + ID : 24 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 100 + y coordinate : 5 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text icon_top_05 + Attributes + ID : 25 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 129 + y coordinate : 5 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text icon_top_06 + Attributes + ID : 26 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 158 + y coordinate : 5 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text icon_top_07 + Attributes + ID : 27 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 187 + y coordinate : 5 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text icon_top_08 + Attributes + ID : 28 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 216 + y coordinate : 5 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text icon_top_09 + Attributes + ID : 29 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 245 + y coordinate : 5 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text icon_top_10 + Attributes + ID : 30 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 274 + y coordinate : 5 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value01_icon + Attributes + ID : 31 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 29 + y coordinate : 220 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03_state + Attributes + ID : 32 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 314 + y coordinate : 5 + Width : 100 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 103 + Horizontal Alignment : right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03_icon + Attributes + ID : 33 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 416 + y coordinate : 5 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 8 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02_icon + Attributes + ID : 34 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 29 + y coordinate : 245 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02_state + Attributes + ID : 35 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 56 + y coordinate : 247 + Width : 120 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 103 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text wifi_icon + Attributes + ID : 36 + Scope : global + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 424 + y coordinate : 53 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text indoortempicon + Attributes + ID : 37 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 24 + y coordinate : 184 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 8 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button01_icon + Attributes + ID : 38 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 292 + y coordinate : 176 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 8 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button02_icon + Attributes + ID : 39 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 339 + y coordinate : 176 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 8 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button03_icon + Attributes + ID : 40 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 386 + y coordinate : 176 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 8 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button04_icon + Attributes + ID : 41 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 245 + y coordinate : 224 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 8 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button05_icon + Attributes + ID : 42 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 292 + y coordinate : 224 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 8 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button06_icon + Attributes + ID : 43 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 339 + y coordinate : 224 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 8 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button07_icon + Attributes + ID : 44 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 386 + y coordinate : 224 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 8 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text meridiem + Attributes + ID : 53 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 414 + y coordinate : 87 + Width : 35 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 2 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Picture weather + Attributes + ID : 11 + Scope : global + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 34 + y coordinate : 66 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 13 + +Picture left_bt_pic + Attributes + ID : 19 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 47 + y coordinate : 307 + Width : 120 + Height : 3 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 77 + +Picture right_bt_pic + Attributes + ID : 20 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 288 + y coordinate : 307 + Width : 120 + Height : 3 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 77 + +Hotspot fc_weather + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 34 + y coordinate : 66 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"home\", \"component\": \"weather\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"home\", \"component\": \"weather\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot jump_climate + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 31 + y coordinate : 169 + Width : 108 + Height : 51 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"home\", \"component\": \"climate\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"home\", \"component\": \"climate\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button01 + Attributes + ID : 45 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 292 + y coordinate : 176 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Release Event + lastclick.txt="{\"page\": \"home\", \"component\": \"button01\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button02 + Attributes + ID : 46 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 339 + y coordinate : 176 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Release Event + lastclick.txt="{\"page\": \"home\", \"component\": \"button02\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button03 + Attributes + ID : 47 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 386 + y coordinate : 176 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Release Event + lastclick.txt="{\"page\": \"home\", \"component\": \"button03\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button04 + Attributes + ID : 48 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 245 + y coordinate : 224 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Release Event + lastclick.txt="{\"page\": \"home\", \"component\": \"button04\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button05 + Attributes + ID : 49 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 292 + y coordinate : 224 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Release Event + lastclick.txt="{\"page\": \"home\", \"component\": \"button05\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button06 + Attributes + ID : 50 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 339 + y coordinate : 224 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Release Event + lastclick.txt="{\"page\": \"home\", \"component\": \"button06\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button07 + Attributes + ID : 51 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 386 + y coordinate : 224 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Release Event + lastclick.txt="{\"page\": \"home\", \"component\": \"button07\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot settings_click + Attributes + ID : 52 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 247 + y coordinate : 37 + Width : 167 + Height : 86 + Effect : load + Effect Priority : 0 + Effect Time : 300 + +Timer dimtimer + Attributes + ID : 1 + Scope : global + Period (ms): 50000 + Enabled : yes + + Events + Timer Event + if(disdim.val==0) + { + dim=brightdd.val // Dim down screen to val set from HA + } + +Timer swipestore + Attributes + ID : 6 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +Timer sleeptimer + Attributes + ID : 15 + Scope : local + Period (ms): 65000 + Enabled : no + + Events + Timer Event + if(sleepmodus.val==1) + { + screensaver.orign.val=0 + // Go to screensaver page + page screensaver + } + +TouchCap swipe + Attributes + ID : 5 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + dim=brightness.val // Set brightness to saved value (from HA) + dimtimer.en=1 // Enable timer to calc down for dimming screen + sleeptimer.en=1 + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + page buttonpage04 + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + page buttonpage02 + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + page buttonpage03 + } + } + diff --git a/nspanel_eu_code/lightsettings.txt b/nspanel_eu_code/lightsettings.txt new file mode 100644 index 0000000..d9ef5de --- /dev/null +++ b/nspanel_eu_code/lightsettings.txt @@ -0,0 +1,983 @@ +Page lightsettings + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 480 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : solid color + Back. Color : 0 + + Events + Preinitialize Event + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"lightsettings\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + vis light_b_press,1 + vis lightslider,1 + vis light_value,1 + vis temp_value_2,1 + // #### OFF Button ##### + vis temp_b_press,0 + vis color_b_pres,0 + // #### OFF Value ##### + vis temp_value,0 + vis light_value_2,0 + // #### OFF Slider ##### + vis tempslider,0 + vis colorwheel,0 + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"lightsettings\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"lightsettings\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Variable (int32) rgb565 + Attributes + ID : 22 + Scope: local + Value: 0 + +Variable (string) va1 + Attributes + ID : 23 + Scope : local + Text : newtxt + Max. Text Size: 20 + +Variable (string) va2 + Attributes + ID : 24 + Scope : local + Text : newtxt + Max. Text Size: 10 + +Variable (string) va3 + Attributes + ID : 25 + Scope : local + Text : newtxt + Max. Text Size: 10 + +Variable (int32) currenttab + Attributes + ID : 26 + Scope: local + Value: 0 + +Variable (string) lightsetting + Attributes + ID : 32 + Scope : local + Text : + Max. Text Size: 100 + +Number ring + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 459 + y coordinate : 188 + Width : 21 + Height : 40 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 1 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment : right + Vertical Alignment : center + Value : 0 + Significant digits shown: all + Format : decimal + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Number field + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 459 + y coordinate : 233 + Width : 21 + Height : 40 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 1 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment : right + Vertical Alignment : center + Value : 0 + Significant digits shown: all + Format : decimal + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text light_value + Attributes + ID : 1 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 183 + y coordinate : 43 + Width : 83 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 65535 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text light_name + Attributes + ID : 2 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 48 + y coordinate : 8 + Width : 300 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 65535 + Horizontal Alignment: left + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 25 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text temp_value + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 183 + y coordinate : 43 + Width : 83 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 65535 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text light_value_2 + Attributes + ID : 27 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 73 + y coordinate : 80 + Width : 50 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 65535 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text temp_value_2 + Attributes + ID : 28 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 331 + y coordinate : 80 + Width : 50 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 65535 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text icon_state + Attributes + ID : 31 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 12 + y coordinate : 8 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 65535 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Picture light_button + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 20 + y coordinate : 67 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 69 + +Picture color_button + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 389 + y coordinate : 130 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 73 + +Picture temp_button + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 389 + y coordinate : 67 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 71 + +Picture light_b_press + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 20 + y coordinate : 67 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 70 + +Picture temp_b_press + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 389 + y coordinate : 67 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 72 + +Picture color_b_pres + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 389 + y coordinate : 130 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 74 + +Picture colorwheel + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 125 + y coordinate : 68 + Width : 200 + Height : 200 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 50 + + Events + Touch Press Event + // Circular Color Picker for Nextion (c) Max Zuidberg 2022 + // This Source Code Form is subject to the terms of the Mozilla Public + // License, v. 2.0. If a copy of the MPL was not distributed with this + // file, You can obtain one at http://mozilla.org/MPL/2.0/. + // + // Put this code in the touch press or release + // event of the pic component with the color wheel. + // Requires the two variables field.val and ring.val + // + // sya0 = x, sya1 = sya1 + // Note the usage of the hidden sya0, sya1 variables + // within event code as local, temporary variable is fine. + sya0=tch0 + sya1=tch1 + // + // Convert absolute coordinates to coordinates relative to + // the color wheel center. + // sys0 = x_center, sys1 = y_center + sys0=colorwheel.w/2 + sys0+=colorwheel.x + sys1=colorwheel.h/2 + sys1+=colorwheel.y + sya0-=sys0 + sya1-=sys1 + // + // Determine ring + ring.val=0 + // sys0 = r^2 = x^2 + y^2 + sys0=sya0*sya0 + sys1=sya1*sya1 + sys0+=sys1 + // repeat for all rings + if(sys0>=156) + { + ring.val++ + } + if(sys0>=625) + { + ring.val++ + } + if(sys0>=1406) + { + ring.val++ + } + if(sys0>=2500) + { + ring.val++ + } + if(sys0>=3906) + { + ring.val++ + } + if(sys0>=5625) + { + ring.val++ + } + if(sys0>=7656) + { + ring.val++ + } + // + // Determine quadrant (0-3). Note: pixel y coords are inverted + // compared to mathematical y coords. But we want math. quadrants. + sya1*=-1 + sys2=0 + if(sya1<0) + { + sys2+=2 + } + sys0=sya0*sya1 + if(sys0<0) + { + sys2+=1 + // In this case we also want to swap x and y otherwise the + // atan(abs(x/y)) (calculated below) gives values running + // "the wrong way" (cw instead of ccw). + sys1=sya1 + sya1=sya0 + sya0=sys1 + } + // + field.val=sys2*6 + // + // x,y sign is not required anymore + if(sya0<0) + { + sya0*=-1 + } + if(sya1<0) + { + sya1*=-1 + } + // + // Determine field in ring quadrant + // Factor 100000 chosen more or less arbitrarily. + // sys0 = 100000 * tan_a = 100000 * y / x + sys0=100000*sya1 + sys0/=sya0 + // repeat for all fields + if(sys0>=26794) + { + field.val++ + } + if(sys0>=57735) + { + field.val++ + } + if(sys0>=99999) + { + field.val++ + } + if(sys0>=173205) + { + field.val++ + } + if(sys0>=373205) + { + field.val++ + } + covx r,va1.txt,0,0 + covx g,va2.txt,0,0 + covx b,va3.txt,0,0 + va1.txt="" + va2.txt="" + va3.txt="" + + Touch Release Event + // Adjust field.val "orientation" and offset to match the h value of the colors in the wheel + h=23-field.val// 0 <= field.val <= 23 + // h is expected to be 0-6*256 (see hsv2rgb) + h*=6*256 + h/=24// Number of fields + // + // s is expected to be 0-256 (see hsv2rgb) + s=ring.val*256 + s/=8// Number of rings + // no "value" selectable; fix it to the maximum (matching the colors in the wheels shown. + v=255 + click hsv2rgb,0 + click rgb888to565,0 + //colPreview.bco=rgb565.val + covx r,va1.txt,0,0 + covx g,va2.txt,0,0 + covx b,va3.txt,0,0 + lightsetting.txt="{\"page\": \"lightsettings\", \"component\": \"rgb_color\", \"value\": ["+va1.txt+","+va2.txt+","+va3.txt+"]}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lightsetting.txt,0 + printh 00 + printh FF FF FF + va1.txt="" + va2.txt="" + va3.txt="" + +Picture light_exit + Attributes + ID : 29 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 415 + y coordinate : 10 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 56 + +Slider lightslider + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 183 + y coordinate : 67 + Width : 85 + Height : 235 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Direction : vertical + Fill : image + Cursor width : auto + Cursor height : 255 + Back. Picture ID : 75 + Slided Back. Picture ID: 76 + Position : 0 + Upper range limit : 100 + Lower range limit : 0 + + Events + Touch Release Event + covx lightslider.val,va1.txt,0,0 + light_value.txt=va1.txt+"%" + light_value_2.txt=va1.txt+"%" + lightsetting.txt="{\"page\": \"lightsettings\", \"component\": \"brightness_pct\", \"value\": "+va1.txt+"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lightsetting.txt,0 + printh 00 + printh FF FF FF + +Slider tempslider + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 183 + y coordinate : 67 + Width : 85 + Height : 235 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Direction : vertical + Fill : image + Cursor width : auto + Cursor height : 255 + Back. Picture ID : 64 + Slided Back. Picture ID: 64 + Position : 0 + Upper range limit : 500 + Lower range limit : 153 + + Events + Touch Release Event + covx tempslider.val,va1.txt,0,0 + temp_value.txt=va1.txt + temp_value_2.txt=va1.txt + lightsetting.txt="{\"page\": \"lightsettings\", \"component\": \"color_temp\", \"value\": "+va1.txt+"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lightsetting.txt,0 + printh 00 + printh FF FF FF + +Hotspot hsv2rgb + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 440 + y coordinate : 278 + Width : 40 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Release Event + // https://de.wikipedia.org/wiki/HSV-Farbraum#Umrechnung_HSV_in_RGB + // The values range from 0..255 instead of 0..1 + // h ranges from 0..(6*256) + if(s>=256) + { + s=255 + }else if(s<0) + { + s=0 + } + if(v>=256) + { + v=255 + }else if(v<0) + { + v=0 + } + f=h&0xff + p=256-s + p*=v + p=p>>8// / 256 + q=s*f// 0-256*256 = 0-65536 + q=65536-q + q*=v + q=q>>16 + t=256-f + t*=s + t=65536-t + t*=v + t=t>>16 + // + f=h>>8 + if(f==1) + { + r=q + g=v + b=p + }else if(f==2) + { + r=p + g=v + b=t + }else if(f==3) + { + r=p + g=q + b=v + }else if(f==4) + { + r=t + g=p + b=v + }else if(f==5) + { + r=v + g=p + b=q + }else + { + r=v + g=t + b=p + } + +Hotspot rgb888to565 + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 440 + y coordinate : 300 + Width : 40 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Release Event + r=r&0xff + g=g&0xff + b=b&0xff + sys1=r>>3 + sys2=sys1<<6 + sys1=g>>2 + sys2+=sys1 + sys2=sys2<<5 + sys1=b>>3 + sys2+=sys1 + rgb565.val=sys2 + +Hotspot light_touch + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 20 + y coordinate : 67 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + vis light_b_press,1 + vis lightslider,1 + vis light_value,1 + vis temp_value_2,1 + // #### OFF Button ##### + vis temp_b_press,0 + vis color_b_pres,0 + // #### OFF Value ##### + vis temp_value,0 + vis light_value_2,0 + // #### OFF Slider ##### + vis tempslider,0 + vis colorwheel,0 + +Hotspot temp_touch + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 389 + y coordinate : 67 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + vis temp_b_press,1 + vis tempslider,1 + vis temp_value,1 + vis light_value_2,1 + // #### OFF Button ##### + vis light_b_press,0 + vis color_b_pres,0 + // #### OFF Value ##### + vis light_value,0 + vis temp_value_2,0 + // #### OFF Slider ##### + vis lightslider,0 + vis colorwheel,0 + +Hotspot color_touch + Attributes + ID : 19 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 389 + y coordinate : 130 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + vis color_b_pres,1 + vis colorwheel,1 + vis light_value_2,1 + // #### OFF Button ##### + vis light_b_press,0 + vis temp_b_press,0 + // #### OFF Value ##### + vis light_value,0 + vis temp_value,0 + vis temp_value_2,0 + // #### OFF Slider ##### + vis lightslider,0 + vis tempslider,0 + // #### OFF Color ##### + +Hotspot light_back + Attributes + ID : 30 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 387 + y coordinate : 0 + Width : 60 + Height : 60 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lightsetting.txt="{\"page\": \"lightsettings\", \"component\": \"close\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lightsetting.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lightsetting.txt="{\"page\": \"lightsettings\", \"component\": \"close\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lightsetting.txt,0 + printh 00 + printh FF FF FF + +Timer swipestore + Attributes + ID : 21 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 20 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + //page + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_eu_code/notification.txt b/nspanel_eu_code/notification.txt new file mode 100644 index 0000000..afe6a7a --- /dev/null +++ b/nspanel_eu_code/notification.txt @@ -0,0 +1,268 @@ +Page notification + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 480 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : picture + Back. Picture ID : 114 + + Events + Preinitialize Event + dim=home.brightness.val + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"notification\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"notification\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"notification\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Variable (string) lastclick + Attributes + ID : 10 + Scope : local + Text : + Max. Text Size: 100 + +Text notifi_text01 + Attributes + ID : 2 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 17 + y coordinate : 60 + Width : 398 + Height : 191 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 3 + Back. Color : 0 + Font Color : 65535 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 100 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text notifi_label + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 17 + y coordinate : 7 + Width : 300 + Height : 42 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 3 + Back. Color : 0 + Font Color : 50712 + Horizontal Alignment: left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 30 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Picture accept_pic + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 96 + y coordinate : 260 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 85 + +Picture clear_pic + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 270 + y coordinate : 260 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 86 + +Hotspot notifi_back + Attributes + ID : 1 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 387 + y coordinate : 0 + Width : 60 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + page home + +Hotspot accept + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 96 + y coordinate : 260 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Release Event + lastclick.txt="{\"page\": \"notification\", \"component\": \"accept\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot clear + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 270 + y coordinate : 260 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Release Event + lastclick.txt="{\"page\": \"notification\", \"component\": \"clear\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Timer swipestore + Attributes + ID : 9 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 8 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + //page + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_eu_code/nspanel_eu_Stats.txt b/nspanel_eu_code/nspanel_eu_Stats.txt new file mode 100644 index 0000000..c6a78b1 --- /dev/null +++ b/nspanel_eu_code/nspanel_eu_Stats.txt @@ -0,0 +1,98 @@ +Program.s + 0 Component(s) + 9 Line(s) of event code + 9 Unique line(s) of event code +screensaver + 3 Component(s) + 9 Line(s) of event code + 8 Unique line(s) of event code +qrcode + 6 Component(s) + 46 Line(s) of event code + 28 Unique line(s) of event code +notification + 11 Component(s) + 60 Line(s) of event code + 31 Unique line(s) of event code +boot + 11 Component(s) + 6 Line(s) of event code + 5 Unique line(s) of event code +weather03 + 19 Component(s) + 47 Line(s) of event code + 29 Unique line(s) of event code +weather04 + 19 Component(s) + 47 Line(s) of event code + 29 Unique line(s) of event code +weather05 + 19 Component(s) + 47 Line(s) of event code + 29 Unique line(s) of event code +settings + 15 Component(s) + 65 Line(s) of event code + 32 Unique line(s) of event code +entitypage02 + 29 Component(s) + 47 Line(s) of event code + 29 Unique line(s) of event code +entitypage04 + 29 Component(s) + 48 Line(s) of event code + 29 Unique line(s) of event code +coversettings + 16 Component(s) + 90 Line(s) of event code + 35 Unique line(s) of event code +weather01 + 19 Component(s) + 47 Line(s) of event code + 29 Unique line(s) of event code +weather02 + 19 Component(s) + 47 Line(s) of event code + 29 Unique line(s) of event code +lightsettings + 33 Component(s) + 306 Line(s) of event code + 164 Unique line(s) of event code +entitypage01 + 29 Component(s) + 49 Line(s) of event code + 30 Unique line(s) of event code +entitypage03 + 29 Component(s) + 48 Line(s) of event code + 30 Unique line(s) of event code +buttonpage01 + 46 Component(s) + 161 Line(s) of event code + 48 Unique line(s) of event code +climate + 25 Component(s) + 391 Line(s) of event code + 105 Unique line(s) of event code +buttonpage04 + 46 Component(s) + 161 Line(s) of event code + 48 Unique line(s) of event code +buttonpage02 + 46 Component(s) + 162 Line(s) of event code + 49 Unique line(s) of event code +buttonpage03 + 46 Component(s) + 162 Line(s) of event code + 49 Unique line(s) of event code +home + 55 Component(s) + 130 Line(s) of event code + 51 Unique line(s) of event code + +Total + 22 Page(s) + 570 Component(s) + 2185 Line(s) of event code + 432 Unique line(s) of event code diff --git a/nspanel_eu_code/qrcode.txt b/nspanel_eu_code/qrcode.txt new file mode 100644 index 0000000..faf3142 --- /dev/null +++ b/nspanel_eu_code/qrcode.txt @@ -0,0 +1,168 @@ +Page qrcode + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 480 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : picture + Back. Picture ID : 104 + + Events + Preinitialize Event + dim=home.brightness.val + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"qrcode\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"qrcode\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"qrcode\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Text qrcode_label + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 10 + y coordinate : 0 + Width : 300 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 3 + Back. Color : 0 + Font Color : 50712 + Horizontal Alignment: left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 30 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +QR Code qrcode_value + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 113 + y coordinate : 62 + Width : 222 + Height : 222 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Logo overlay : no + Text : + Max. Text Size : 50 + +Hotspot qrcode_back + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 387 + y coordinate : 0 + Width : 60 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + page home + +Timer swipestore + Attributes + ID : 2 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 1 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + //page + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_eu_code/screensaver.txt b/nspanel_eu_code/screensaver.txt new file mode 100644 index 0000000..4f9030d --- /dev/null +++ b/nspanel_eu_code/screensaver.txt @@ -0,0 +1,48 @@ +Page screensaver + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 480 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : solid color + Back. Color : 0 + + Events + Preinitialize Event + dim=0 + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"screensaver\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + page home + +Variable (int32) orign + Attributes + ID : 2 + Scope: global + Value: 0 + +TouchCap wakeup + Attributes + ID : 1 + Scope: local + Value: 0 + + Events + Touch Press Event + page orign.val + diff --git a/nspanel_eu_code/settings.txt b/nspanel_eu_code/settings.txt new file mode 100644 index 0000000..865b2ac --- /dev/null +++ b/nspanel_eu_code/settings.txt @@ -0,0 +1,418 @@ +Page settings + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 480 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : picture + Back. Picture ID : 99 + + Events + Preinitialize Event + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"settings\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"settings\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"settings\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Text a03 + Attributes + ID : 5 + Scope : global + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 328 + y coordinate : 46 + Width : 40 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 99 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 3 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text a04 + Attributes + ID : 6 + Scope : global + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 328 + y coordinate : 77 + Width : 40 + Height : 21 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 99 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 3 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text a06 + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 15 + y coordinate : 38 + Width : 120 + Height : 40 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 99 + Horizontal Alignment : left + Vertical Alignment : center + Input Type : character + Text : Reboot + Max. Text Size : 6 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text a07 + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 15 + y coordinate : 84 + Width : 120 + Height : 40 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 99 + Horizontal Alignment : left + Vertical Alignment : center + Input Type : character + Text : Sleep + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text a08 + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 24 + y coordinate : 183 + Width : 85 + Height : 40 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 1 + Cropped Back. Picture ID: 99 + Horizontal Alignment : left + Vertical Alignment : center + Input Type : character + Text : Brightness + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text a09 + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 24 + y coordinate : 243 + Width : 85 + Height : 40 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 1 + Cropped Back. Picture ID: 99 + Horizontal Alignment : left + Vertical Alignment : center + Input Type : character + Text : Dimming + Max. Text Size : 7 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Picture settings_exit + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 415 + y coordinate : 10 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 56 + +Slider brightslider + Attributes + ID : 3 + Scope : global + Dragging : 0 + Send Component ID : on press and release + Opacity : 127 + x coordinate : 140 + y coordinate : 183 + Width : 255 + Height : 41 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Direction : horizontal + Fill : crop image + Cursor width : auto + Cursor height : 255 + Cropped Back. Picture ID : 99 + Cropped Slided Back. Picture ID: 100 + Position : 80 + Upper range limit : 100 + Lower range limit : 0 + + Events + Touch Release Event + printh 91 + prints "brightslider",0 + printh 00 + prints brightslider.val,0 + printh FF FF FF + +Slider dimslider + Attributes + ID : 4 + Scope : global + Dragging : 0 + Send Component ID : on press and release + Opacity : 127 + x coordinate : 140 + y coordinate : 243 + Width : 255 + Height : 41 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Direction : horizontal + Fill : crop image + Cursor width : auto + Cursor height : 255 + Cropped Back. Picture ID : 99 + Cropped Slided Back. Picture ID: 100 + Position : 20 + Upper range limit : 100 + Lower range limit : 0 + + Events + Touch Release Event + printh 91 + prints "dimslider",0 + printh 00 + prints dimslider.val,0 + printh FF FF FF + +Dual-state Button bt0 + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : on press and release + Opacity : 127 + x coordinate : 136 + y coordinate : 36 + Width : 83 + Height : 40 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Font ID : 1 + Cropped Back. Picture ID (Unpressed): 99 + Back. Picture ID (Pressed) : 65535 + Cropped Back. Picture ID (Pressed) : 100 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text : + Max. Text Size : 0 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Dual-state Button bt1 + Attributes + ID : 14 + Scope : global + Dragging : 0 + Send Component ID : on press and release + Opacity : 127 + x coordinate : 138 + y coordinate : 88 + Width : 83 + Height : 40 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Font ID : 1 + Cropped Back. Picture ID (Unpressed): 99 + Back. Picture ID (Pressed) : 65535 + Cropped Back. Picture ID (Pressed) : 100 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text : + Max. Text Size : 0 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Hotspot setings_back + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 387 + y coordinate : 0 + Width : 60 + Height : 60 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + page home + +Timer swipestore + Attributes + ID : 2 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 1 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + //page + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_eu_code/weather01.txt b/nspanel_eu_code/weather01.txt new file mode 100644 index 0000000..db7ecd9 --- /dev/null +++ b/nspanel_eu_code/weather01.txt @@ -0,0 +1,516 @@ +Page weather01 + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 480 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : picture + Back. Picture ID : 109 + + Events + Preinitialize Event + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"weather01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"weather01\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"weather01\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Text day + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 218 + y coordinate : 55 + Width : 200 + Height : 40 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text date + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 188 + y coordinate : 97 + Width : 230 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 25 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text temperature + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 148 + Width : 120 + Height : 23 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text loading + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 45 + y coordinate : 5 + Width : 100 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 3 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 1 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value01 + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 170 + y coordinate : 162 + Width : 220 + Height : 22 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05 + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 170 + y coordinate : 278 + Width : 220 + Height : 22 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : right + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04 + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 170 + y coordinate : 249 + Width : 220 + Height : 21 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : right + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02 + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 170 + y coordinate : 191 + Width : 220 + Height : 22 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03 + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 170 + y coordinate : 219 + Width : 220 + Height : 24 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value01_icon + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 400 + y coordinate : 159 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02_icon + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 400 + y coordinate : 188 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03_icon + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 400 + y coordinate : 218 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04_icon + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 400 + y coordinate : 245 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05_icon + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 400 + y coordinate : 275 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Picture weather_icon + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 50 + y coordinate : 41 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Hotspot weather_back + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 387 + y coordinate : 0 + Width : 60 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + page home + +Timer swipestore + Attributes + ID : 2 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 1 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + page weather05 + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_eu_code/weather02.txt b/nspanel_eu_code/weather02.txt new file mode 100644 index 0000000..e4ae451 --- /dev/null +++ b/nspanel_eu_code/weather02.txt @@ -0,0 +1,516 @@ +Page weather02 + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 480 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : picture + Back. Picture ID : 110 + + Events + Preinitialize Event + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"weather02\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"weather02\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"weather02\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Text day + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 218 + y coordinate : 55 + Width : 200 + Height : 40 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text loading + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 45 + y coordinate : 5 + Width : 100 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 3 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 1 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text date + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 188 + y coordinate : 97 + Width : 230 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 25 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value01 + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 170 + y coordinate : 162 + Width : 220 + Height : 22 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05 + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 170 + y coordinate : 278 + Width : 220 + Height : 22 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : right + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04 + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 170 + y coordinate : 249 + Width : 220 + Height : 21 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : right + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02 + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 170 + y coordinate : 191 + Width : 220 + Height : 22 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03 + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 170 + y coordinate : 219 + Width : 220 + Height : 24 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value01_icon + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 400 + y coordinate : 159 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02_icon + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 400 + y coordinate : 188 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03_icon + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 400 + y coordinate : 218 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04_icon + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 400 + y coordinate : 245 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05_icon + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 400 + y coordinate : 275 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text temperature + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 148 + Width : 120 + Height : 23 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Picture weather_icon + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 50 + y coordinate : 41 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Hotspot weather_back + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 387 + y coordinate : 0 + Width : 60 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + page home + +Timer swipestore + Attributes + ID : 2 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 1 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + page weather01 + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_eu_code/weather03.txt b/nspanel_eu_code/weather03.txt new file mode 100644 index 0000000..5aa6844 --- /dev/null +++ b/nspanel_eu_code/weather03.txt @@ -0,0 +1,516 @@ +Page weather03 + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 480 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : picture + Back. Picture ID : 111 + + Events + Preinitialize Event + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"weather03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"weather03\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"weather03\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Text day + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 218 + y coordinate : 55 + Width : 200 + Height : 40 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text loading + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 45 + y coordinate : 5 + Width : 100 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 3 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 1 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text date + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 188 + y coordinate : 97 + Width : 230 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 25 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value01 + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 170 + y coordinate : 162 + Width : 220 + Height : 22 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05 + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 170 + y coordinate : 278 + Width : 220 + Height : 22 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : right + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04 + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 170 + y coordinate : 249 + Width : 220 + Height : 21 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : right + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02 + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 170 + y coordinate : 191 + Width : 220 + Height : 22 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03 + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 170 + y coordinate : 219 + Width : 220 + Height : 24 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value01_icon + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 400 + y coordinate : 159 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02_icon + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 400 + y coordinate : 188 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03_icon + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 400 + y coordinate : 218 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04_icon + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 400 + y coordinate : 245 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05_icon + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 400 + y coordinate : 275 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text temperature + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 148 + Width : 120 + Height : 23 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Picture weather_icon + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 50 + y coordinate : 41 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Hotspot weather_back + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 387 + y coordinate : 0 + Width : 60 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + page home + +Timer swipestore + Attributes + ID : 2 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 1 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + page weather02 + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_eu_code/weather04.txt b/nspanel_eu_code/weather04.txt new file mode 100644 index 0000000..391dd64 --- /dev/null +++ b/nspanel_eu_code/weather04.txt @@ -0,0 +1,516 @@ +Page weather04 + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 480 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : picture + Back. Picture ID : 112 + + Events + Preinitialize Event + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"weather04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"weather04\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"weather04\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Text day + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 218 + y coordinate : 55 + Width : 200 + Height : 40 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text loading + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 45 + y coordinate : 5 + Width : 100 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 3 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 1 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text date + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 188 + y coordinate : 97 + Width : 230 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 25 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value01 + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 170 + y coordinate : 162 + Width : 220 + Height : 22 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05 + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 170 + y coordinate : 278 + Width : 220 + Height : 22 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : right + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04 + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 170 + y coordinate : 249 + Width : 220 + Height : 21 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : right + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02 + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 170 + y coordinate : 191 + Width : 220 + Height : 22 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03 + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 170 + y coordinate : 219 + Width : 220 + Height : 24 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value01_icon + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 400 + y coordinate : 159 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02_icon + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 400 + y coordinate : 188 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03_icon + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 400 + y coordinate : 218 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04_icon + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 400 + y coordinate : 245 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05_icon + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 400 + y coordinate : 275 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text temperature + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 148 + Width : 120 + Height : 23 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Picture weather_icon + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 50 + y coordinate : 41 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Hotspot weather_back + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 387 + y coordinate : 0 + Width : 60 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + page home + +Timer swipestore + Attributes + ID : 2 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 1 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + page weather03 + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_eu_code/weather05.txt b/nspanel_eu_code/weather05.txt new file mode 100644 index 0000000..4e286ad --- /dev/null +++ b/nspanel_eu_code/weather05.txt @@ -0,0 +1,516 @@ +Page weather05 + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 480 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : picture + Back. Picture ID : 113 + + Events + Preinitialize Event + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"weather05\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"weather05\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"weather05\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Text day + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 218 + y coordinate : 55 + Width : 200 + Height : 40 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text loading + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 45 + y coordinate : 5 + Width : 100 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 3 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 1 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text date + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 188 + y coordinate : 97 + Width : 230 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 25 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value01 + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 170 + y coordinate : 162 + Width : 220 + Height : 22 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05 + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 170 + y coordinate : 278 + Width : 220 + Height : 22 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : right + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04 + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 170 + y coordinate : 249 + Width : 220 + Height : 21 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : right + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02 + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 170 + y coordinate : 191 + Width : 220 + Height : 22 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03 + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 170 + y coordinate : 219 + Width : 220 + Height : 24 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value01_icon + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 400 + y coordinate : 159 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02_icon + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 400 + y coordinate : 188 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03_icon + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 400 + y coordinate : 218 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04_icon + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 400 + y coordinate : 245 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05_icon + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 400 + y coordinate : 275 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text temperature + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 148 + Width : 120 + Height : 23 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Picture weather_icon + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 50 + y coordinate : 41 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Hotspot weather_back + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 387 + y coordinate : 0 + Width : 60 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + page home + +Timer swipestore + Attributes + ID : 2 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 1 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + page weather04 + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_us.HMI b/nspanel_us.HMI index 2c4e813..5b706c7 100644 Binary files a/nspanel_us.HMI and b/nspanel_us.HMI differ diff --git a/nspanel_us.tft b/nspanel_us.tft index 44525cb..eab306c 100644 Binary files a/nspanel_us.tft and b/nspanel_us.tft differ diff --git a/nspanel_us_code/Program.s.txt b/nspanel_us_code/Program.s.txt new file mode 100644 index 0000000..bc75bbc --- /dev/null +++ b/nspanel_us_code/Program.s.txt @@ -0,0 +1,10 @@ +Program.s + //The following code is only run once when power on, and is generally used for global variable definition and power on initialization data + int sys0=0,sys1=0,sys2=0,swipex=0,swipey=0,swipex2=0,swipey2=0,swipec=0,swipec2=0,swipedx=100,swipedy=100 //At present, the definition of global variable only supports 4-byte signed integer (int), and other types of global quantity declaration are not supported. If you want to use string type, you can use variable control in the page to implement + int r=0,g=0,b=0 + int h=0,s=0,v=0 + int p=0,q=0,t=0,f=0 + bauds=115200//Configure baudrat + recmod=0//Serial data parsing mode:0-Passive mode;1-Active mod + printh 00 00 00 ff ff ff 88 ff ff ff//Output power on information to serial pore + page 8//Power on start page boot diff --git a/nspanel_us_code/boot.txt b/nspanel_us_code/boot.txt new file mode 100644 index 0000000..b843a6c --- /dev/null +++ b/nspanel_us_code/boot.txt @@ -0,0 +1,302 @@ +Page boot + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 320 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : picture + Back. Picture ID : 98 + + Events + Preinitialize Event + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"boot\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + +Text ip_addr + Attributes + ID : 1 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 2 + y coordinate : 4 + Width : 172 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 98 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : Initializing... + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text t0 + Attributes + ID : 2 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 20 + y coordinate : 44 + Width : 250 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 4 + Cropped Back. Picture ID: 98 + Horizontal Alignment : left + Vertical Alignment : center + Input Type : character + Text : Please wait... + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text t1 + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 20 + y coordinate : 79 + Width : 173 + Height : 36 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 1 + Cropped Back. Picture ID: 98 + Horizontal Alignment : left + Vertical Alignment : center + Input Type : character + Text : The process can take several seconds! + Max. Text Size : 50 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text tft_label + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 12 + y coordinate : 393 + Width : 40 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 2 + Cropped Back. Picture ID: 98 + Horizontal Alignment : left + Vertical Alignment : center + Input Type : character + Text : TFT: + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text esph_label + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 12 + y coordinate : 418 + Width : 95 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 2 + Cropped Back. Picture ID: 98 + Horizontal Alignment : left + Vertical Alignment : center + Input Type : character + Text : ESPHome: + Max. Text Size : 8 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text bluep_label + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 12 + y coordinate : 443 + Width : 92 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 2 + Cropped Back. Picture ID: 98 + Horizontal Alignment : left + Vertical Alignment : center + Input Type : character + Text : Blueprint: + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text tft_version + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 58 + y coordinate : 393 + Width : 95 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 2 + Cropped Back. Picture ID: 98 + Horizontal Alignment : left + Vertical Alignment : center + Input Type : character + Text : 3.2.3 + Max. Text Size : 8 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text esph_version + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 110 + y coordinate : 418 + Width : 95 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 2 + Cropped Back. Picture ID: 98 + Horizontal Alignment : left + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 8 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text bluep_version + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 110 + y coordinate : 443 + Width : 95 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 2 + Cropped Back. Picture ID: 98 + Horizontal Alignment : left + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 8 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Dual-state Button a01 + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID : on press and release + Opacity : 127 + x coordinate : 225 + y coordinate : 433 + Width : 80 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : 3D auto + Font ID : 0 + Back. Color (Unpressed) : 50712 + Back. Picture ID (Pressed): 65535 + Back. Color (Pressed) : 9375 + Font Color (Unpressed) : 0 + Font Color (Pressed) : 65535 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text : Reboot + Max. Text Size : 6 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + diff --git a/nspanel_us_code/buttonpage01.txt b/nspanel_us_code/buttonpage01.txt new file mode 100644 index 0000000..cd5aeb9 --- /dev/null +++ b/nspanel_us_code/buttonpage01.txt @@ -0,0 +1,1254 @@ +Page buttonpage01 + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 320 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : picture + Back. Picture ID : 115 + + Events + Preinitialize Event + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"buttonpage01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + vis 255,0 + vis button_back,1 + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"buttonpage01\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"buttonpage01\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Variable (string) lastclick + Attributes + ID : 45 + Scope : local + Text : + Max. Text Size: 100 + +Text button01text + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 48 + y coordinate : 123 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button01bri + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 80 + y coordinate : 61 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button02text + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 191 + y coordinate : 122 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button02bri + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 222 + y coordinate : 61 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button03text + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 48 + y coordinate : 224 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button03bri + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 79 + y coordinate : 163 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button04text + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 191 + y coordinate : 224 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button04bri + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 222 + y coordinate : 163 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button05text + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 48 + y coordinate : 326 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button05bri + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 79 + y coordinate : 266 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button06text + Attributes + ID : 19 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 191 + y coordinate : 326 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button06bri + Attributes + ID : 20 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 221 + y coordinate : 266 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button07text + Attributes + ID : 22 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 48 + y coordinate : 427 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button07bri + Attributes + ID : 23 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 79 + y coordinate : 367 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button08text + Attributes + ID : 25 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 191 + y coordinate : 427 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button08bri + Attributes + ID : 26 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 222 + y coordinate : 367 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text bpage01_label + Attributes + ID : 28 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 10 + y coordinate : 8 + Width : 244 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 3 + Back. Color : 0 + Font Color : 50712 + Horizontal Alignment: left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 30 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button01icon + Attributes + ID : 29 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 44 + y coordinate : 61 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button02icon + Attributes + ID : 30 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 187 + y coordinate : 61 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button03icon + Attributes + ID : 31 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 44 + y coordinate : 163 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button04icon + Attributes + ID : 32 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 187 + y coordinate : 163 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button05icon + Attributes + ID : 33 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 44 + y coordinate : 266 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button06icon + Attributes + ID : 34 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 187 + y coordinate : 266 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button07icon + Attributes + ID : 35 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 44 + y coordinate : 367 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button08icon + Attributes + ID : 36 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 187 + y coordinate : 367 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Picture button01pic + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 38 + y coordinate : 51 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button02pic + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 181 + y coordinate : 51 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button03pic + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 38 + y coordinate : 153 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button04pic + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 181 + y coordinate : 153 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button05pic + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 38 + y coordinate : 256 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button06pic + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 181 + y coordinate : 256 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button07pic + Attributes + ID : 21 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 38 + y coordinate : 357 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button08pic + Attributes + ID : 24 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 181 + y coordinate : 357 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Hotspot button_back + Attributes + ID : 27 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 260 + y coordinate : 0 + Width : 60 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + page home + +Hotspot button01 + Attributes + ID : 37 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 38 + y coordinate : 51 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button01\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button01\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button02 + Attributes + ID : 38 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 181 + y coordinate : 51 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button02\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button02\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button03 + Attributes + ID : 39 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 38 + y coordinate : 153 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button03\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button03\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button04 + Attributes + ID : 40 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 181 + y coordinate : 153 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button04\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button04\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button05 + Attributes + ID : 41 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 38 + y coordinate : 256 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button05\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button05\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button06 + Attributes + ID : 42 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 181 + y coordinate : 256 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button06\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button06\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button07 + Attributes + ID : 43 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 38 + y coordinate : 357 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button07\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button07\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button08 + Attributes + ID : 44 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 181 + y coordinate : 357 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button08\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button08\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Timer swipestore + Attributes + ID : 2 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 1 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + page home + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_us_code/buttonpage02.txt b/nspanel_us_code/buttonpage02.txt new file mode 100644 index 0000000..240f41e --- /dev/null +++ b/nspanel_us_code/buttonpage02.txt @@ -0,0 +1,1254 @@ +Page buttonpage02 + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 320 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : picture + Back. Picture ID : 116 + + Events + Preinitialize Event + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"buttonpage02\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + vis 255,0 + vis button_back,1 + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"buttonpage02\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"buttonpage02\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Variable (string) lastclick + Attributes + ID : 45 + Scope : local + Text : + Max. Text Size: 100 + +Text button01text + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 48 + y coordinate : 123 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button01bri + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 80 + y coordinate : 61 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button02text + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 191 + y coordinate : 122 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button02bri + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 222 + y coordinate : 61 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button03text + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 48 + y coordinate : 224 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button03bri + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 79 + y coordinate : 163 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button04text + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 191 + y coordinate : 224 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button04bri + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 222 + y coordinate : 163 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button05text + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 48 + y coordinate : 326 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button05bri + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 79 + y coordinate : 266 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button06text + Attributes + ID : 19 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 191 + y coordinate : 326 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button06bri + Attributes + ID : 20 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 221 + y coordinate : 266 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button07text + Attributes + ID : 22 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 48 + y coordinate : 427 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button07bri + Attributes + ID : 23 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 79 + y coordinate : 367 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button08text + Attributes + ID : 25 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 191 + y coordinate : 427 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button08bri + Attributes + ID : 26 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 222 + y coordinate : 367 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text bpage02_label + Attributes + ID : 28 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 10 + y coordinate : 8 + Width : 244 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 3 + Back. Color : 0 + Font Color : 50712 + Horizontal Alignment: left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 30 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button01icon + Attributes + ID : 29 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 44 + y coordinate : 61 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button02icon + Attributes + ID : 30 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 187 + y coordinate : 61 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button03icon + Attributes + ID : 31 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 44 + y coordinate : 163 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button04icon + Attributes + ID : 32 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 187 + y coordinate : 163 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button05icon + Attributes + ID : 33 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 44 + y coordinate : 266 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button06icon + Attributes + ID : 34 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 187 + y coordinate : 266 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button07icon + Attributes + ID : 35 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 44 + y coordinate : 367 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button08icon + Attributes + ID : 36 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 187 + y coordinate : 367 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Picture button01pic + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 38 + y coordinate : 51 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button02pic + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 181 + y coordinate : 51 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button03pic + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 38 + y coordinate : 153 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button04pic + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 181 + y coordinate : 153 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button05pic + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 38 + y coordinate : 256 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button06pic + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 181 + y coordinate : 256 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button07pic + Attributes + ID : 21 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 38 + y coordinate : 357 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button08pic + Attributes + ID : 24 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 181 + y coordinate : 357 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Hotspot button_back + Attributes + ID : 27 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 260 + y coordinate : 0 + Width : 60 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + page home + +Hotspot button01 + Attributes + ID : 37 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 38 + y coordinate : 51 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button01\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button01\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button02 + Attributes + ID : 38 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 181 + y coordinate : 51 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button02\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button02\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button03 + Attributes + ID : 39 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 38 + y coordinate : 153 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button03\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button03\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button04 + Attributes + ID : 40 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 181 + y coordinate : 153 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button04\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button04\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button05 + Attributes + ID : 41 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 38 + y coordinate : 256 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button05\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button05\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button06 + Attributes + ID : 42 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 181 + y coordinate : 256 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button06\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button06\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button07 + Attributes + ID : 43 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 38 + y coordinate : 357 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button07\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button07\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button08 + Attributes + ID : 44 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 181 + y coordinate : 357 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button08\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button08\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Timer swipestore + Attributes + ID : 2 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 1 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + page buttonpage01 + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + page home + } + } + diff --git a/nspanel_us_code/buttonpage03.txt b/nspanel_us_code/buttonpage03.txt new file mode 100644 index 0000000..0e7c16b --- /dev/null +++ b/nspanel_us_code/buttonpage03.txt @@ -0,0 +1,1254 @@ +Page buttonpage03 + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 320 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : picture + Back. Picture ID : 117 + + Events + Preinitialize Event + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"buttonpage03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + vis 255,0 + vis button_back,1 + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"buttonpage03\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"buttonpage03\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Variable (string) lastclick + Attributes + ID : 45 + Scope : local + Text : + Max. Text Size: 100 + +Text button01text + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 48 + y coordinate : 123 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button01bri + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 80 + y coordinate : 61 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button02text + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 191 + y coordinate : 122 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button02bri + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 222 + y coordinate : 61 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button03text + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 48 + y coordinate : 224 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button03bri + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 79 + y coordinate : 163 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button04text + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 191 + y coordinate : 224 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button04bri + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 222 + y coordinate : 163 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button05text + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 48 + y coordinate : 326 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button05bri + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 79 + y coordinate : 266 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button06text + Attributes + ID : 19 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 191 + y coordinate : 326 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button06bri + Attributes + ID : 20 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 221 + y coordinate : 266 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button07text + Attributes + ID : 22 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 48 + y coordinate : 427 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button07bri + Attributes + ID : 23 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 79 + y coordinate : 367 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button08text + Attributes + ID : 25 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 191 + y coordinate : 427 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button08bri + Attributes + ID : 26 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 222 + y coordinate : 367 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text bpage03_label + Attributes + ID : 28 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 10 + y coordinate : 8 + Width : 244 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 3 + Back. Color : 0 + Font Color : 50712 + Horizontal Alignment: left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 30 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button01icon + Attributes + ID : 29 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 44 + y coordinate : 61 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button02icon + Attributes + ID : 30 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 187 + y coordinate : 61 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button03icon + Attributes + ID : 31 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 44 + y coordinate : 163 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button04icon + Attributes + ID : 32 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 187 + y coordinate : 163 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button05icon + Attributes + ID : 33 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 44 + y coordinate : 266 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button06icon + Attributes + ID : 34 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 187 + y coordinate : 266 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button07icon + Attributes + ID : 35 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 44 + y coordinate : 367 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button08icon + Attributes + ID : 36 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 187 + y coordinate : 367 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Picture button01pic + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 38 + y coordinate : 51 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button02pic + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 181 + y coordinate : 51 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button03pic + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 38 + y coordinate : 153 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button04pic + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 181 + y coordinate : 153 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button05pic + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 38 + y coordinate : 256 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button06pic + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 181 + y coordinate : 256 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button07pic + Attributes + ID : 21 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 38 + y coordinate : 357 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button08pic + Attributes + ID : 24 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 181 + y coordinate : 357 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Hotspot button_back + Attributes + ID : 27 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 260 + y coordinate : 1 + Width : 60 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + page home + +Hotspot button01 + Attributes + ID : 37 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 38 + y coordinate : 51 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button01\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button01\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button02 + Attributes + ID : 38 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 181 + y coordinate : 51 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button02\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button02\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button03 + Attributes + ID : 39 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 38 + y coordinate : 153 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button03\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button03\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button04 + Attributes + ID : 40 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 181 + y coordinate : 153 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button04\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button04\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button05 + Attributes + ID : 41 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 38 + y coordinate : 256 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button05\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button05\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button06 + Attributes + ID : 42 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 181 + y coordinate : 256 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button06\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button06\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button07 + Attributes + ID : 43 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 38 + y coordinate : 357 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button07\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button07\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button08 + Attributes + ID : 44 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 181 + y coordinate : 357 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button08\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button08\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Timer swipestore + Attributes + ID : 2 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 1 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + page buttonpage02 + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + page home + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_us_code/buttonpage04.txt b/nspanel_us_code/buttonpage04.txt new file mode 100644 index 0000000..79d62fa --- /dev/null +++ b/nspanel_us_code/buttonpage04.txt @@ -0,0 +1,1254 @@ +Page buttonpage04 + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 320 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : picture + Back. Picture ID : 118 + + Events + Preinitialize Event + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"buttonpage04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + vis 255,0 + vis button_back,1 + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"buttonpage04\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"buttonpage04\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Variable (string) lastclick + Attributes + ID : 45 + Scope : local + Text : + Max. Text Size: 100 + +Text button01text + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 48 + y coordinate : 123 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button01bri + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 80 + y coordinate : 61 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button02text + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 191 + y coordinate : 122 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button02bri + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 222 + y coordinate : 61 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button03text + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 48 + y coordinate : 224 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button03bri + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 79 + y coordinate : 163 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button04text + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 191 + y coordinate : 224 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button04bri + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 222 + y coordinate : 163 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button05text + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 48 + y coordinate : 326 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button05bri + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 79 + y coordinate : 266 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button06text + Attributes + ID : 19 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 191 + y coordinate : 326 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button06bri + Attributes + ID : 20 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 221 + y coordinate : 266 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button07text + Attributes + ID : 22 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 48 + y coordinate : 427 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button07bri + Attributes + ID : 23 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 79 + y coordinate : 367 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button08text + Attributes + ID : 25 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 191 + y coordinate : 427 + Width : 80 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button08bri + Attributes + ID : 26 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 222 + y coordinate : 367 + Width : 50 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 4 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text bpage04_label + Attributes + ID : 28 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 10 + y coordinate : 8 + Width : 244 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 3 + Back. Color : 0 + Font Color : 50712 + Horizontal Alignment: left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 30 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button01icon + Attributes + ID : 29 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 44 + y coordinate : 61 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button02icon + Attributes + ID : 30 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 187 + y coordinate : 61 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button03icon + Attributes + ID : 31 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 44 + y coordinate : 163 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button04icon + Attributes + ID : 32 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 187 + y coordinate : 163 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button05icon + Attributes + ID : 33 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 44 + y coordinate : 266 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button06icon + Attributes + ID : 34 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 187 + y coordinate : 266 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button07icon + Attributes + ID : 35 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 44 + y coordinate : 367 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button08icon + Attributes + ID : 36 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 187 + y coordinate : 367 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Picture button01pic + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 38 + y coordinate : 51 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button02pic + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 181 + y coordinate : 51 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button03pic + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 38 + y coordinate : 153 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button04pic + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 181 + y coordinate : 153 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button05pic + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 38 + y coordinate : 256 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button06pic + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 181 + y coordinate : 256 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button07pic + Attributes + ID : 21 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 38 + y coordinate : 357 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Picture button08pic + Attributes + ID : 24 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 181 + y coordinate : 357 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Hotspot button_back + Attributes + ID : 27 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 260 + y coordinate : 0 + Width : 60 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + page home + +Hotspot button01 + Attributes + ID : 37 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 38 + y coordinate : 51 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button01\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button01\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button02 + Attributes + ID : 38 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 181 + y coordinate : 51 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button02\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button02\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button03 + Attributes + ID : 39 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 38 + y coordinate : 153 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button03\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button03\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button04 + Attributes + ID : 40 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 181 + y coordinate : 153 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button04\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button04\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button05 + Attributes + ID : 41 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 38 + y coordinate : 256 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button05\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button05\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button06 + Attributes + ID : 42 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 181 + y coordinate : 256 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button06\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button06\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button07 + Attributes + ID : 43 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 38 + y coordinate : 357 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button07\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button07\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button08 + Attributes + ID : 44 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 181 + y coordinate : 357 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button08\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button08\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Timer swipestore + Attributes + ID : 2 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 1 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + page buttonpage03 + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_us_code/climate.txt b/nspanel_us_code/climate.txt new file mode 100644 index 0000000..109e141 --- /dev/null +++ b/nspanel_us_code/climate.txt @@ -0,0 +1,912 @@ +Page climate + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 320 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : picture + Back. Picture ID : 126 + + Events + Preinitialize Event + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"climate\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Variable (int32) climateslider + Attributes + ID : 7 + Scope: local + Value: 0 + +Variable (int32) va0 + Attributes + ID : 21 + Scope: local + Value: 0 + +Variable (string) climatesetting + Attributes + ID : 24 + Scope : local + Text : + Max. Text Size: 100 + +Number sliderval + Attributes + ID : 22 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 299 + y coordinate : 440 + Width : 20 + Height : 40 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 1 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment : right + Vertical Alignment : center + Value : 0 + Significant digits shown: all + Format : decimal + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text current_temp + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 108 + y coordinate : 161 + Width : 105 + Height : 55 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 5 + Cropped Back. Picture ID: 126 + Horizontal Alignment : right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 6 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text target_temp + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 112 + y coordinate : 220 + Width : 105 + Height : 40 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 4 + Cropped Back. Picture ID: 126 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 6 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text outdoor_temp + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 48 + y coordinate : 73 + Width : 60 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 126 + Horizontal Alignment : right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 6 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text hotwater_temp + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 220 + y coordinate : 73 + Width : 60 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 126 + Horizontal Alignment : left + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 6 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text heating_state + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 105 + y coordinate : 265 + Width : 115 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 126 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text climate_label + Attributes + ID : 23 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 10 + y coordinate : 11 + Width : 250 + Height : 22 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 2 + Cropped Back. Picture ID: 126 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 30 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Picture climate_left + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 50 + y coordinate : 134 + Width : 51 + Height : 173 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 16 + + Events + Touch Press Event + slider.en=1 + + Touch Release Event + slider.en=0 + +Picture climate_middle + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 100 + y coordinate : 118 + Width : 114 + Height : 40 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 17 + + Events + Touch Press Event + slider.en=1 + + Touch Release Event + slider.en=0 + +Picture climate_right + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 213 + y coordinate : 132 + Width : 58 + Height : 172 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 18 + + Events + Touch Press Event + slider.en=1 + + Touch Release Event + slider.en=0 + +Picture climate_exit + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 277 + y coordinate : 8 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 56 + +Picture hotw_bt_pic + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 134 + y coordinate : 387 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 79 + +Picture heating_bt_pic + Attributes + ID : 19 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 145 + y coordinate : 290 + Width : 30 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 82 + +Hotspot decrease_temp + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 52 + y coordinate : 350 + Width : 51 + Height : 40 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + climatesetting.txt="{\"page\": \"climate\", \"component\": \"decreasetemp\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + climatesetting.txt="{\"page\": \"climate\", \"component\": \"decreasetemp\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + +Hotspot increase_temp + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 214 + y coordinate : 350 + Width : 50 + Height : 40 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + climatesetting.txt="{\"page\": \"climate\", \"component\": \"increasetemp\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + climatesetting.txt="{\"page\": \"climate\", \"component\": \"increasetemp\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + +Hotspot climate_back + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 258 + y coordinate : 0 + Width : 60 + Height : 60 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + climatesetting.txt="{\"page\": \"climate\", \"component\": \"close\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + climatesetting.txt="{\"page\": \"climate\", \"component\": \"close\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + +Hotspot hotwater_bt + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 128 + y coordinate : 377 + Width : 60 + Height : 60 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + climatesetting.txt="{\"page\": \"climate\", \"component\": \"hotwater\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + climatesetting.txt="{\"page\": \"climate\", \"component\": \"hotwater\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + +Hotspot heating_bt + Attributes + ID : 20 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 139 + y coordinate : 286 + Width : 40 + Height : 40 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + climatesetting.txt="{\"page\": \"climate\", \"component\": \"heating\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + climatesetting.txt="{\"page\": \"climate\", \"component\": \"heating\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + +Timer swipestore + Attributes + ID : 2 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +Timer slider + Attributes + ID : 6 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + // Left hand images vertical + if(tch0>=111&&tch0<169) // Left Hand images L/R coords + { + if(tch1>221&&tch1<=235) // step 0 + { + // climatesetting.txt="climateslider0" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 0}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>206&&tch1<=221) // step 1 + { + // climatesetting.txt="climateslider1" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 1}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>192&&tch1<=206) // step 2 + { + // climatesetting.txt="climateslider2" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 2}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>177&&tch1<=192) // step 3 + { + // climatesetting.txt="climateslider3" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 3}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>162&&tch1<=177) // step 4 + { + // climatesetting.txt="climateslider4" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 4}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>148&&tch1<=162) // step 5 up + { + // climatesetting.txt="climateslider5" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 5}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>133&&tch1<=148) // step 6 up + { + // climatesetting.txt="climateslider6" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 6}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>119&&tch1<=133) // step 7 up + { + // climatesetting.txt="climateslider7" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 7}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>105&&tch1<=119) // step 8 up + { + // climatesetting.txt="climateslider8" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 8}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>90&&tch1<=105) // step 9 up + { + // climatesetting.txt="climateslider9" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 9}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>70&&tch1<=90) // step 10 up + { + // climatesetting.txt="climateslider10" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 10}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>60&&tch1<=70) // step 11 up + { + // climatesetting.txt="climateslider11" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 11}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + } + // middle images horizontal + }else if(tch1>=35&&tch1<=80) // middle image U/D coords + { + if(tch0>169&&tch0<=188) // step 12 across + { + // climatesetting.txt="climateslider12" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 12}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch0>188&&tch0<=207) // step 13 + { + // climatesetting.txt="climateslider13" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 13}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch0>207&&tch0<=226) // step 14 + { + // climatesetting.txt="climateslider14" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 14}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch0>226&&tch0<=245) // step 15 + { + // climatesetting.txt="climateslider15" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 15}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch0>245&&tch0<=264) // step 16 + { + // climatesetting.txt="climateslider16" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 16}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch0>264&&tch0<=283) // step 17 + { + // climatesetting.txt="climateslider17" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 17}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + } + // right hand images vertical + }else if(tch0>=283&&tch0<=341) // right image L/R coords + { + if(tch1>60&&tch1<=80) // step 18 across + { + // climatesetting.txt="climateslider18" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 18}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>80&&tch1<=94) // step 19 + { + // climatesetting.txt="climateslider19" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 19}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>94&&tch1<=109) // step 20 + { + // climatesetting.txt="climateslider20" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 20}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>109&&tch1<=123) // step 21 + { + // climatesetting.txt="climateslider21" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 21}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>123&&tch1<=138) // step 22 + { + // climatesetting.txt="climateslider22" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 22}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>138&&tch1<=152) // step 23 + { + // climatesetting.txt="climateslider23" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 23}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>152&&tch1<=167) // step 24 + { + // climatesetting.txt="climateslider24" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 24}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>167&&tch1<=181) // step 25 + { + // climatesetting.txt="climateslider25" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 25}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>181&&tch1<=197) // step 26 + { + // climatesetting.txt="climateslider26" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 26}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>197&&tch1<=215) // step 27 + { + // climatesetting.txt="climateslider27" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 27}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + }else if(tch1>215&&tch1<=235) // step 28 + { + // climatesetting.txt="climateslider28" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 28}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + } + } + // pass climateslider.val + +TouchCap swipe + Attributes + ID : 1 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + //page + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_us_code/coversettings.txt b/nspanel_us_code/coversettings.txt new file mode 100644 index 0000000..e6c4255 --- /dev/null +++ b/nspanel_us_code/coversettings.txt @@ -0,0 +1,457 @@ +Page coversettings + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 320 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : solid color + Back. Color : 0 + + Events + Preinitialize Event + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"coversettings\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"coversettings\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"coversettings\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Variable (string) va1 + Attributes + ID : 9 + Scope : local + Text : newtxt + Max. Text Size: 10 + +Variable (string) coversetting + Attributes + ID : 15 + Scope : local + Text : + Max. Text Size: 100 + +Text battery_value + Attributes + ID : 1 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 248 + y coordinate : 142 + Width : 60 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 65535 + Horizontal Alignment: left + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text cover_value + Attributes + ID : 2 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 119 + y coordinate : 120 + Width : 83 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 65535 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text cover_name + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 46 + y coordinate : 8 + Width : 204 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 65535 + Horizontal Alignment: left + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 25 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text icon_state + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 10 + y coordinate : 8 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 65535 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text battery_icon + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 213 + y coordinate : 142 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 52857 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Picture cover_exit + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 288 + y coordinate : 9 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 56 + +Slider coverslider + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 119 + y coordinate : 143 + Width : 83 + Height : 233 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Direction : vertical + Fill : image + Cursor width : auto + Cursor height : 255 + Back. Picture ID : 63 + Slided Back. Picture ID: 62 + 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\": \"coversettings\", \"component\": \"cover_position\", \"value\": "+va1.txt+"}" + printh 92 + prints "nspanelevent",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 + Opacity : 127 + x coordinate : 231 + y coordinate : 262 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : image + Font ID : 1 + Background Picture ID (Unpressed): 57 + Back. Picture ID (Pressed) : 58 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + + Events + Touch Press Event + coversetting.txt="{\"page\": \"coversettings\", \"component\": \"open_cover\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",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 + Opacity : 127 + x coordinate : 231 + y coordinate : 327 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : image + Font ID : 1 + Background Picture ID (Unpressed): 59 + Back. Picture ID (Pressed) : 60 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + + Events + Touch Press Event + coversetting.txt="{\"page\": \"coversettings\", \"component\": \"close_cover\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints coversetting.txt,0 + printh 00 + printh FF FF FF + +Button cover_stop + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 327 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : image + Font ID : 1 + Background Picture ID (Unpressed): 65 + Back. Picture ID (Pressed) : 66 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + + Events + Touch Press Event + coversetting.txt="{\"page\": \"coversettings\", \"component\": \"stop_cover\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints coversetting.txt,0 + printh 00 + printh FF FF FF + +Hotspot cover_back + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 258 + y coordinate : 0 + Width : 60 + Height : 60 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + coversetting.txt="{\"page\": \"coversettings\", \"component\": \"close\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints coversetting.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + coversetting.txt="{\"page\": \"coversettings\", \"component\": \"close\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints coversetting.txt,0 + printh 00 + printh FF FF FF + +Timer swipestore + Attributes + ID : 8 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 7 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + //page + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_us_code/entitypage01.txt b/nspanel_us_code/entitypage01.txt new file mode 100644 index 0000000..a851e8b --- /dev/null +++ b/nspanel_us_code/entitypage01.txt @@ -0,0 +1,797 @@ +Page entitypage01 + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 320 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : picture + Back. Picture ID : 105 + + Events + Preinitialize Event + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"entitypage01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"entitypage01\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"entitypage01\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Text value01_label + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 60 + Width : 150 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 105 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05_label + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 260 + Width : 150 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 105 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04_label + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 210 + Width : 150 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 105 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02_label + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 110 + Width : 150 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 105 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03_label + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 160 + Width : 150 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 105 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text entity01_label + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 10 + y coordinate : 0 + Width : 244 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 3 + Back. Color : 0 + Font Color : 50712 + Horizontal Alignment: left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 30 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value06_label + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 310 + Width : 150 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 105 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value07_label + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 360 + Width : 150 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 105 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value08_label + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 410 + Width : 150 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 105 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value01_pic + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 5 + y coordinate : 60 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 105 + Horizontal Alignment : center + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02_pic + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 5 + y coordinate : 110 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 105 + Horizontal Alignment : center + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03_pic + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 5 + y coordinate : 160 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 105 + Horizontal Alignment : center + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04_pic + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 5 + y coordinate : 210 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 105 + Horizontal Alignment : center + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05_pic + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 5 + y coordinate : 260 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 105 + Horizontal Alignment : center + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value06_pic + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 5 + y coordinate : 310 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 105 + Horizontal Alignment : center + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value07_pic + Attributes + ID : 19 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 5 + y coordinate : 360 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 105 + Horizontal Alignment : center + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value08_pic + Attributes + ID : 20 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 5 + y coordinate : 410 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 105 + Horizontal Alignment : center + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value01 + Attributes + ID : 21 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 199 + y coordinate : 60 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 105 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02 + Attributes + ID : 22 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 199 + y coordinate : 110 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 105 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03 + Attributes + ID : 23 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 199 + y coordinate : 160 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 105 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04 + Attributes + ID : 24 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 199 + y coordinate : 210 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 105 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05 + Attributes + ID : 25 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 199 + y coordinate : 260 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 105 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value06 + Attributes + ID : 26 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 199 + y coordinate : 310 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 105 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value07 + Attributes + ID : 27 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 199 + y coordinate : 360 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 105 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value08 + Attributes + ID : 28 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 199 + y coordinate : 410 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 105 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Hotspot entity01_back + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 257 + y coordinate : 2 + Width : 60 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + page home + +Timer swipestore + Attributes + ID : 2 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 1 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + page entitypage04 + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + page entitypage03 + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + page entitypage04 + } + } + diff --git a/nspanel_us_code/entitypage02.txt b/nspanel_us_code/entitypage02.txt new file mode 100644 index 0000000..8ef61df --- /dev/null +++ b/nspanel_us_code/entitypage02.txt @@ -0,0 +1,797 @@ +Page entitypage02 + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 320 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : picture + Back. Picture ID : 106 + + Events + Preinitialize Event + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"entitypage02\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"entitypage02\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"entitypage02\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Text value01_label + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 60 + Width : 150 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 106 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05_label + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 260 + Width : 150 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 106 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04_label + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 210 + Width : 150 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 106 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02_label + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 110 + Width : 150 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 106 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03_label + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 160 + Width : 150 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 106 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text entity02_label + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 10 + y coordinate : 0 + Width : 244 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 3 + Back. Color : 0 + Font Color : 50712 + Horizontal Alignment: left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 30 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value06_label + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 310 + Width : 150 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 106 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value07_label + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 360 + Width : 150 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 106 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value08_label + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 410 + Width : 150 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 106 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value01_pic + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 5 + y coordinate : 60 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 106 + Horizontal Alignment : center + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02_pic + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 5 + y coordinate : 110 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 106 + Horizontal Alignment : center + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03_pic + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 5 + y coordinate : 160 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 106 + Horizontal Alignment : center + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04_pic + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 5 + y coordinate : 210 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 106 + Horizontal Alignment : center + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05_pic + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 5 + y coordinate : 260 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 106 + Horizontal Alignment : center + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value06_pic + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 5 + y coordinate : 310 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 106 + Horizontal Alignment : center + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value07_pic + Attributes + ID : 19 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 5 + y coordinate : 360 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 106 + Horizontal Alignment : center + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value08_pic + Attributes + ID : 20 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 5 + y coordinate : 410 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 106 + Horizontal Alignment : center + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value01 + Attributes + ID : 21 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 199 + y coordinate : 60 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 106 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02 + Attributes + ID : 22 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 199 + y coordinate : 110 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 106 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03 + Attributes + ID : 23 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 199 + y coordinate : 160 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 106 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04 + Attributes + ID : 24 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 199 + y coordinate : 210 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 106 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05 + Attributes + ID : 25 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 199 + y coordinate : 260 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 106 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value06 + Attributes + ID : 26 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 199 + y coordinate : 310 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 106 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value07 + Attributes + ID : 27 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 199 + y coordinate : 360 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 106 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value08 + Attributes + ID : 28 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 199 + y coordinate : 410 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 106 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Hotspot entity02_back + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 257 + y coordinate : 2 + Width : 60 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + page home + +Timer swipestore + Attributes + ID : 2 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 1 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + page entitypage01 + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_us_code/entitypage03.txt b/nspanel_us_code/entitypage03.txt new file mode 100644 index 0000000..89eb7bc --- /dev/null +++ b/nspanel_us_code/entitypage03.txt @@ -0,0 +1,797 @@ +Page entitypage03 + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 320 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : picture + Back. Picture ID : 107 + + Events + Preinitialize Event + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"entitypage03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"entitypage03\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"entitypage03\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Text value01_label + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 60 + Width : 150 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 107 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05_label + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 260 + Width : 150 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 107 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04_label + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 210 + Width : 150 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 107 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02_label + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 110 + Width : 150 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 107 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03_label + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 160 + Width : 150 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 107 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text entity03_label + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 10 + y coordinate : 0 + Width : 244 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 3 + Back. Color : 0 + Font Color : 50712 + Horizontal Alignment: left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 30 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value06_label + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 310 + Width : 150 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 107 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value07_label + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 360 + Width : 150 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 107 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value08_label + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 410 + Width : 150 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 107 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value01_pic + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 5 + y coordinate : 60 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 107 + Horizontal Alignment : center + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02_pic + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 5 + y coordinate : 110 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 107 + Horizontal Alignment : center + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03_pic + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 5 + y coordinate : 160 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 107 + Horizontal Alignment : center + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04_pic + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 5 + y coordinate : 210 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 107 + Horizontal Alignment : center + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05_pic + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 5 + y coordinate : 260 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 107 + Horizontal Alignment : center + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value06_pic + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 5 + y coordinate : 310 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 107 + Horizontal Alignment : center + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value07_pic + Attributes + ID : 19 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 5 + y coordinate : 360 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 107 + Horizontal Alignment : center + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value08_pic + Attributes + ID : 20 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 5 + y coordinate : 410 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 107 + Horizontal Alignment : center + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value01 + Attributes + ID : 21 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 199 + y coordinate : 60 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 107 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02 + Attributes + ID : 22 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 199 + y coordinate : 110 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 107 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03 + Attributes + ID : 23 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 199 + y coordinate : 160 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 107 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04 + Attributes + ID : 24 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 199 + y coordinate : 210 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 107 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05 + Attributes + ID : 25 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 199 + y coordinate : 260 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 107 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value06 + Attributes + ID : 26 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 199 + y coordinate : 310 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 107 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value07 + Attributes + ID : 27 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 199 + y coordinate : 360 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 107 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value08 + Attributes + ID : 28 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 199 + y coordinate : 410 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 107 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Hotspot entity03_back + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 257 + y coordinate : 2 + Width : 60 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + page home + +Timer swipestore + Attributes + ID : 2 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 1 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + page entitypage02 + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + page entitypage01 + } + } + diff --git a/nspanel_us_code/entitypage04.txt b/nspanel_us_code/entitypage04.txt new file mode 100644 index 0000000..4d74634 --- /dev/null +++ b/nspanel_us_code/entitypage04.txt @@ -0,0 +1,797 @@ +Page entitypage04 + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 320 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : picture + Back. Picture ID : 108 + + Events + Preinitialize Event + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"entitypage04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"entitypage04\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"entitypage04\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Text value01_label + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 60 + Width : 150 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 108 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05_label + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 260 + Width : 150 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 108 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04_label + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 210 + Width : 150 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 108 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02_label + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 110 + Width : 150 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 108 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03_label + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 160 + Width : 150 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 108 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text entity04_label + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 10 + y coordinate : 0 + Width : 244 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 3 + Back. Color : 0 + Font Color : 50712 + Horizontal Alignment: left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 30 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value06_label + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 310 + Width : 150 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 108 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value07_label + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 360 + Width : 150 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 108 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value08_label + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 410 + Width : 150 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 108 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value01_pic + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 5 + y coordinate : 60 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 108 + Horizontal Alignment : center + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02_pic + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 5 + y coordinate : 110 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 108 + Horizontal Alignment : center + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03_pic + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 5 + y coordinate : 160 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 108 + Horizontal Alignment : center + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04_pic + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 5 + y coordinate : 210 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 108 + Horizontal Alignment : center + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05_pic + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 5 + y coordinate : 260 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 108 + Horizontal Alignment : center + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value06_pic + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 5 + y coordinate : 310 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 108 + Horizontal Alignment : center + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value07_pic + Attributes + ID : 19 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 5 + y coordinate : 360 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 108 + Horizontal Alignment : center + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value08_pic + Attributes + ID : 20 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 5 + y coordinate : 410 + Width : 28 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 108 + Horizontal Alignment : center + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value01 + Attributes + ID : 21 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 199 + y coordinate : 60 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 108 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02 + Attributes + ID : 22 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 199 + y coordinate : 110 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 108 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03 + Attributes + ID : 23 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 199 + y coordinate : 160 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 108 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04 + Attributes + ID : 24 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 199 + y coordinate : 210 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 108 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05 + Attributes + ID : 25 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 199 + y coordinate : 260 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 108 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value06 + Attributes + ID : 26 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 199 + y coordinate : 310 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 108 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value07 + Attributes + ID : 27 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 199 + y coordinate : 360 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 108 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value08 + Attributes + ID : 28 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 199 + y coordinate : 410 + Width : 120 + Height : 28 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 108 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Hotspot entity04_back + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 257 + y coordinate : 2 + Width : 60 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + page home + +Timer swipestore + Attributes + ID : 2 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 1 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + page entitypage03 + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + page entitypage01 + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_us_code/home.txt b/nspanel_us_code/home.txt new file mode 100644 index 0000000..f7044e5 --- /dev/null +++ b/nspanel_us_code/home.txt @@ -0,0 +1,1324 @@ +Page home + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 320 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : picture + Back. Picture ID : 103 + + Events + Preinitialize Event + dim=brightness.val + dimtimer.en=1 + sleeptimer.en=1 + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"home\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + vis 255,0 + vis settings_click,1 + +Variable (int32) brightness + Attributes + ID : 2 + Scope: global + Value: 100 + +Variable (int32) brightdd + Attributes + ID : 3 + Scope: global + Value: 40 + +Variable (int32) disdim + Attributes + ID : 4 + Scope: global + Value: 0 + +Variable (int32) sleepmodus + Attributes + ID : 16 + Scope: global + Value: 0 + +Variable (string) lastclick + Attributes + ID : 54 + Scope : local + Text : + Max. Text Size: 100 + +Text time + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 111 + y coordinate : 50 + Width : 160 + Height : 62 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 6 + Cropped Back. Picture ID: 103 + Horizontal Alignment : right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text current_temp + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 191 + y coordinate : 169 + Width : 100 + Height : 40 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 4 + Cropped Back. Picture ID: 103 + Horizontal Alignment : left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 8 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text outdoor_temp + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 30 + y coordinate : 264 + Width : 87 + Height : 37 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 4 + Cropped Back. Picture ID: 103 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 8 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text date + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 41 + y coordinate : 117 + Width : 230 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 103 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 25 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value01_state + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 188 + y coordinate : 213 + Width : 120 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 103 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text left_bt_text + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 16 + y coordinate : 444 + Width : 120 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 1 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text right_bt_text + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 184 + y coordinate : 441 + Width : 120 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 1 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text icon_top_01 + Attributes + ID : 21 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 16 + y coordinate : 5 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text icon_top_02 + Attributes + ID : 22 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 45 + y coordinate : 5 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text icon_top_03 + Attributes + ID : 23 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 74 + y coordinate : 5 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text icon_top_04 + Attributes + ID : 24 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 103 + y coordinate : 5 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text icon_top_05 + Attributes + ID : 25 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 132 + y coordinate : 5 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text icon_top_06 + Attributes + ID : 26 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 161 + y coordinate : 5 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text icon_top_07 + Attributes + ID : 27 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 190 + y coordinate : 5 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text icon_top_08 + Attributes + ID : 28 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 219 + y coordinate : 5 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text icon_top_09 + Attributes + ID : 29 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 248 + y coordinate : 5 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text icon_top_10 + Attributes + ID : 30 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 277 + y coordinate : 5 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value01_icon + Attributes + ID : 31 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 161 + y coordinate : 211 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03_state + Attributes + ID : 32 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 188 + y coordinate : 264 + Width : 120 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 103 + Horizontal Alignment : left + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03_icon + Attributes + ID : 33 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 161 + y coordinate : 262 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 8 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02_icon + Attributes + ID : 34 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 161 + y coordinate : 236 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02_state + Attributes + ID : 35 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 188 + y coordinate : 238 + Width : 120 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 103 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text wifi_icon + Attributes + ID : 36 + Scope : global + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 284 + y coordinate : 58 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text indoortempicon + Attributes + ID : 37 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 156 + y coordinate : 175 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 8 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button01_icon + Attributes + ID : 38 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 156 + y coordinate : 325 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 8 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button02_icon + Attributes + ID : 39 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 203 + y coordinate : 325 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 8 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button03_icon + Attributes + ID : 40 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 250 + y coordinate : 325 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 8 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button04_icon + Attributes + ID : 41 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 109 + y coordinate : 373 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 8 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button05_icon + Attributes + ID : 42 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 156 + y coordinate : 373 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 8 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button06_icon + Attributes + ID : 43 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 203 + y coordinate : 373 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 8 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text button07_icon + Attributes + ID : 44 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 250 + y coordinate : 373 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 8 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text meridiem + Attributes + ID : 53 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 274 + y coordinate : 92 + Width : 35 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 2 + Cropped Back. Picture ID: 103 + Horizontal Alignment : center + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 2 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Picture weather + Attributes + ID : 11 + Scope : global + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 20 + y coordinate : 163 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 13 + +Picture left_bt_pic + Attributes + ID : 19 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 16 + y coordinate : 466 + Width : 120 + Height : 3 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 77 + +Picture right_bt_pic + Attributes + ID : 20 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 183 + y coordinate : 466 + Width : 120 + Height : 3 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 77 + +Hotspot fc_weather + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 20 + y coordinate : 163 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"home\", \"component\": \"weather\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"home\", \"component\": \"weather\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot jump_climate + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 187 + y coordinate : 157 + Width : 108 + Height : 51 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lastclick.txt="{\"page\": \"home\", \"component\": \"climate\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"home\", \"component\": \"climate\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button01 + Attributes + ID : 45 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 156 + y coordinate : 325 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Release Event + lastclick.txt="{\"page\": \"home\", \"component\": \"button01\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button02 + Attributes + ID : 46 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 203 + y coordinate : 325 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Release Event + lastclick.txt="{\"page\": \"home\", \"component\": \"button02\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button03 + Attributes + ID : 47 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 250 + y coordinate : 325 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Release Event + lastclick.txt="{\"page\": \"home\", \"component\": \"button03\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button04 + Attributes + ID : 48 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 109 + y coordinate : 373 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Release Event + lastclick.txt="{\"page\": \"home\", \"component\": \"button04\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button05 + Attributes + ID : 49 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 156 + y coordinate : 373 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Release Event + lastclick.txt="{\"page\": \"home\", \"component\": \"button05\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button06 + Attributes + ID : 50 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 203 + y coordinate : 373 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Release Event + lastclick.txt="{\"page\": \"home\", \"component\": \"button06\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button07 + Attributes + ID : 51 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 250 + y coordinate : 373 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Release Event + lastclick.txt="{\"page\": \"home\", \"component\": \"button07\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot settings_click + Attributes + ID : 52 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Opacity : 127 + x coordinate : 103 + y coordinate : 39 + Width : 167 + Height : 86 + Effect : load + Effect Priority : 0 + Effect Time : 300 + +Timer dimtimer + Attributes + ID : 1 + Scope : global + Period (ms): 50000 + Enabled : yes + + Events + Timer Event + if(disdim.val==0) + { + dim=brightdd.val // Dim down screen to val set from HA + } + +Timer swipestore + Attributes + ID : 6 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +Timer sleeptimer + Attributes + ID : 15 + Scope : local + Period (ms): 65000 + Enabled : no + + Events + Timer Event + if(sleepmodus.val==1) + { + screensaver.orign.val=0 + // Go to screensaver page + page screensaver + } + +TouchCap swipe + Attributes + ID : 5 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + dim=brightness.val // Set brightness to saved value (from HA) + dimtimer.en=1 // Enable timer to calc down for dimming screen + sleeptimer.en=1 + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + page buttonpage04 + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + page buttonpage02 + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + page buttonpage03 + } + } + diff --git a/nspanel_us_code/lightsettings.txt b/nspanel_us_code/lightsettings.txt new file mode 100644 index 0000000..c7635a8 --- /dev/null +++ b/nspanel_us_code/lightsettings.txt @@ -0,0 +1,983 @@ +Page lightsettings + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 320 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : solid color + Back. Color : 0 + + Events + Preinitialize Event + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"lightsettings\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + vis light_b_press,1 + vis lightslider,1 + vis light_value,1 + vis temp_value_2,1 + // #### OFF Button ##### + vis temp_b_press,0 + vis color_b_pres,0 + // #### OFF Value ##### + vis temp_value,0 + vis light_value_2,0 + // #### OFF Slider ##### + vis tempslider,0 + vis colorwheel,0 + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"lightsettings\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"lightsettings\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Variable (int32) rgb565 + Attributes + ID : 22 + Scope: local + Value: 0 + +Variable (string) va1 + Attributes + ID : 23 + Scope : local + Text : newtxt + Max. Text Size: 20 + +Variable (string) va2 + Attributes + ID : 24 + Scope : local + Text : newtxt + Max. Text Size: 10 + +Variable (string) va3 + Attributes + ID : 25 + Scope : local + Text : newtxt + Max. Text Size: 10 + +Variable (int32) currenttab + Attributes + ID : 26 + Scope: local + Value: 0 + +Variable (string) lightsetting + Attributes + ID : 32 + Scope : local + Text : + Max. Text Size: 100 + +Number ring + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 312 + y coordinate : 440 + Width : 8 + Height : 40 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 1 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment : right + Vertical Alignment : center + Value : 0 + Significant digits shown: all + Format : decimal + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Number field + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 305 + y coordinate : 440 + Width : 9 + Height : 40 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 1 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment : right + Vertical Alignment : center + Value : 0 + Significant digits shown: all + Format : decimal + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text light_value + Attributes + ID : 1 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 117 + y coordinate : 180 + Width : 83 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 65535 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text light_name + Attributes + ID : 2 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 46 + y coordinate : 8 + Width : 204 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 65535 + Horizontal Alignment: left + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 25 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text temp_value + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 117 + y coordinate : 180 + Width : 83 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 65535 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text light_value_2 + Attributes + ID : 27 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 25 + y coordinate : 123 + Width : 50 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 65535 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text temp_value_2 + Attributes + ID : 28 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 134 + y coordinate : 123 + Width : 50 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 0 + Font Color : 65535 + Horizontal Alignment: right + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text icon_state + Attributes + ID : 31 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 10 + y coordinate : 8 + Width : 35 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 8 + Back. Color : 0 + Font Color : 65535 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Picture light_button + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 25 + y coordinate : 71 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 69 + +Picture color_button + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 243 + y coordinate : 71 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 73 + +Picture temp_button + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 134 + y coordinate : 71 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 71 + +Picture light_b_press + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 25 + y coordinate : 71 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 70 + +Picture temp_b_press + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 134 + y coordinate : 71 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 72 + +Picture color_b_pres + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 243 + y coordinate : 71 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 74 + +Picture colorwheel + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 61 + y coordinate : 222 + Width : 200 + Height : 200 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 50 + + Events + Touch Press Event + // Circular Color Picker for Nextion (c) Max Zuidberg 2022 + // This Source Code Form is subject to the terms of the Mozilla Public + // License, v. 2.0. If a copy of the MPL was not distributed with this + // file, You can obtain one at http://mozilla.org/MPL/2.0/. + // + // Put this code in the touch press or release + // event of the pic component with the color wheel. + // Requires the two variables field.val and ring.val + // + // sya0 = x, sya1 = sya1 + // Note the usage of the hidden sya0, sya1 variables + // within event code as local, temporary variable is fine. + sya0=tch0 + sya1=tch1 + // + // Convert absolute coordinates to coordinates relative to + // the color wheel center. + // sys0 = x_center, sys1 = y_center + sys0=colorwheel.w/2 + sys0+=colorwheel.x + sys1=colorwheel.h/2 + sys1+=colorwheel.y + sya0-=sys0 + sya1-=sys1 + // + // Determine ring + ring.val=0 + // sys0 = r^2 = x^2 + y^2 + sys0=sya0*sya0 + sys1=sya1*sya1 + sys0+=sys1 + // repeat for all rings + if(sys0>=156) + { + ring.val++ + } + if(sys0>=625) + { + ring.val++ + } + if(sys0>=1406) + { + ring.val++ + } + if(sys0>=2500) + { + ring.val++ + } + if(sys0>=3906) + { + ring.val++ + } + if(sys0>=5625) + { + ring.val++ + } + if(sys0>=7656) + { + ring.val++ + } + // + // Determine quadrant (0-3). Note: pixel y coords are inverted + // compared to mathematical y coords. But we want math. quadrants. + sya1*=-1 + sys2=0 + if(sya1<0) + { + sys2+=2 + } + sys0=sya0*sya1 + if(sys0<0) + { + sys2+=1 + // In this case we also want to swap x and y otherwise the + // atan(abs(x/y)) (calculated below) gives values running + // "the wrong way" (cw instead of ccw). + sys1=sya1 + sya1=sya0 + sya0=sys1 + } + // + field.val=sys2*6 + // + // x,y sign is not required anymore + if(sya0<0) + { + sya0*=-1 + } + if(sya1<0) + { + sya1*=-1 + } + // + // Determine field in ring quadrant + // Factor 100000 chosen more or less arbitrarily. + // sys0 = 100000 * tan_a = 100000 * y / x + sys0=100000*sya1 + sys0/=sya0 + // repeat for all fields + if(sys0>=26794) + { + field.val++ + } + if(sys0>=57735) + { + field.val++ + } + if(sys0>=99999) + { + field.val++ + } + if(sys0>=173205) + { + field.val++ + } + if(sys0>=373205) + { + field.val++ + } + covx r,va1.txt,0,0 + covx g,va2.txt,0,0 + covx b,va3.txt,0,0 + va1.txt="" + va2.txt="" + va3.txt="" + + Touch Release Event + // Adjust field.val "orientation" and offset to match the h value of the colors in the wheel + h=23-field.val// 0 <= field.val <= 23 + // h is expected to be 0-6*256 (see hsv2rgb) + h*=6*256 + h/=24// Number of fields + // + // s is expected to be 0-256 (see hsv2rgb) + s=ring.val*256 + s/=8// Number of rings + // no "value" selectable; fix it to the maximum (matching the colors in the wheels shown. + v=255 + click hsv2rgb,0 + click rgb888to565,0 + //colPreview.bco=rgb565.val + covx r,va1.txt,0,0 + covx g,va2.txt,0,0 + covx b,va3.txt,0,0 + lightsetting.txt="{\"page\": \"lightsettings\", \"component\": \"rgb_color\", \"value\": ["+va1.txt+","+va2.txt+","+va3.txt+"]}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lightsetting.txt,0 + printh 00 + printh FF FF FF + va1.txt="" + va2.txt="" + va3.txt="" + +Picture light_exit + Attributes + ID : 29 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 287 + y coordinate : 8 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 56 + +Slider lightslider + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 117 + y coordinate : 205 + Width : 85 + Height : 235 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Direction : vertical + Fill : image + Cursor width : auto + Cursor height : 255 + Back. Picture ID : 75 + Slided Back. Picture ID: 76 + Position : 0 + Upper range limit : 100 + Lower range limit : 0 + + Events + Touch Release Event + covx lightslider.val,va1.txt,0,0 + light_value.txt=va1.txt+"%" + light_value_2.txt=va1.txt+"%" + lightsetting.txt="{\"page\": \"lightsettings\", \"component\": \"brightness_pct\", \"value\": "+va1.txt+"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lightsetting.txt,0 + printh 00 + printh FF FF FF + +Slider tempslider + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 117 + y coordinate : 205 + Width : 85 + Height : 235 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Direction : vertical + Fill : image + Cursor width : auto + Cursor height : 255 + Back. Picture ID : 64 + Slided Back. Picture ID: 64 + Position : 0 + Upper range limit : 500 + Lower range limit : 153 + + Events + Touch Release Event + covx tempslider.val,va1.txt,0,0 + temp_value.txt=va1.txt + temp_value_2.txt=va1.txt + lightsetting.txt="{\"page\": \"lightsettings\", \"component\": \"color_temp\", \"value\": "+va1.txt+"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lightsetting.txt,0 + printh 00 + printh FF FF FF + +Hotspot hsv2rgb + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 51 + y coordinate : 459 + Width : 40 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Release Event + // https://de.wikipedia.org/wiki/HSV-Farbraum#Umrechnung_HSV_in_RGB + // The values range from 0..255 instead of 0..1 + // h ranges from 0..(6*256) + if(s>=256) + { + s=255 + }else if(s<0) + { + s=0 + } + if(v>=256) + { + v=255 + }else if(v<0) + { + v=0 + } + f=h&0xff + p=256-s + p*=v + p=p>>8// / 256 + q=s*f// 0-256*256 = 0-65536 + q=65536-q + q*=v + q=q>>16 + t=256-f + t*=s + t=65536-t + t*=v + t=t>>16 + // + f=h>>8 + if(f==1) + { + r=q + g=v + b=p + }else if(f==2) + { + r=p + g=v + b=t + }else if(f==3) + { + r=p + g=q + b=v + }else if(f==4) + { + r=t + g=p + b=v + }else if(f==5) + { + r=v + g=p + b=q + }else + { + r=v + g=t + b=p + } + +Hotspot rgb888to565 + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 8 + y coordinate : 458 + Width : 40 + Height : 20 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Release Event + r=r&0xff + g=g&0xff + b=b&0xff + sys1=r>>3 + sys2=sys1<<6 + sys1=g>>2 + sys2+=sys1 + sys2=sys2<<5 + sys1=b>>3 + sys2+=sys1 + rgb565.val=sys2 + +Hotspot light_touch + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 25 + y coordinate : 71 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + vis light_b_press,1 + vis lightslider,1 + vis light_value,1 + vis temp_value_2,1 + // #### OFF Button ##### + vis temp_b_press,0 + vis color_b_pres,0 + // #### OFF Value ##### + vis temp_value,0 + vis light_value_2,0 + // #### OFF Slider ##### + vis tempslider,0 + vis colorwheel,0 + +Hotspot temp_touch + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 134 + y coordinate : 71 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + vis temp_b_press,1 + vis tempslider,1 + vis temp_value,1 + vis light_value_2,1 + // #### OFF Button ##### + vis light_b_press,0 + vis color_b_pres,0 + // #### OFF Value ##### + vis light_value,0 + vis temp_value_2,0 + // #### OFF Slider ##### + vis lightslider,0 + vis colorwheel,0 + +Hotspot color_touch + Attributes + ID : 19 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 243 + y coordinate : 71 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + vis color_b_pres,1 + vis colorwheel,1 + vis light_value_2,1 + // #### OFF Button ##### + vis light_b_press,0 + vis temp_b_press,0 + // #### OFF Value ##### + vis light_value,0 + vis temp_value,0 + vis temp_value_2,0 + // #### OFF Slider ##### + vis lightslider,0 + vis tempslider,0 + // #### OFF Color ##### + +Hotspot light_back + Attributes + ID : 30 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 259 + y coordinate : 0 + Width : 60 + Height : 60 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + lightsetting.txt="{\"page\": \"lightsettings\", \"component\": \"close\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lightsetting.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lightsetting.txt="{\"page\": \"lightsettings\", \"component\": \"close\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lightsetting.txt,0 + printh 00 + printh FF FF FF + +Timer swipestore + Attributes + ID : 21 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 20 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + //page + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_us_code/notification.txt b/nspanel_us_code/notification.txt new file mode 100644 index 0000000..2a95ef0 --- /dev/null +++ b/nspanel_us_code/notification.txt @@ -0,0 +1,297 @@ +Page notification + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 320 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : picture + Back. Picture ID : 114 + + Events + Preinitialize Event + dim=home.brightness.val + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"notification\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"notification\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"notification\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Variable (string) lastclick + Attributes + ID : 11 + Scope : local + Text : + Max. Text Size: 100 + +Text notifi_text01 + Attributes + ID : 2 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 15 + y coordinate : 108 + Width : 291 + Height : 292 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 3 + Back. Color : 0 + Font Color : 65535 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 100 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text notifi_label + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 10 + y coordinate : 56 + Width : 300 + Height : 42 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 3 + Back. Color : 0 + Font Color : 50712 + Horizontal Alignment: left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 30 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text loading + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 45 + y coordinate : 5 + Width : 100 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 3 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 1 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Picture accept_pic + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 35 + y coordinate : 403 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 85 + +Picture clear_pic + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 230 + y coordinate : 403 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 86 + +Hotspot notifi_back + Attributes + ID : 1 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 260 + y coordinate : 0 + Width : 60 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + page home + +Hotspot accept + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 35 + y coordinate : 403 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Release Event + lastclick.txt="{\"page\": \"notification\", \"component\": \"accept\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot clear + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 230 + y coordinate : 403 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Release Event + lastclick.txt="{\"page\": \"notification\", \"component\": \"clear\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Timer swipestore + Attributes + ID : 9 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 8 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + //page + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_us_code/nspanel_us_Stats.txt b/nspanel_us_code/nspanel_us_Stats.txt new file mode 100644 index 0000000..6e74753 --- /dev/null +++ b/nspanel_us_code/nspanel_us_Stats.txt @@ -0,0 +1,98 @@ +Program.s + 0 Component(s) + 8 Line(s) of event code + 8 Unique line(s) of event code +screensaver + 3 Component(s) + 8 Line(s) of event code + 7 Unique line(s) of event code +qrcode + 6 Component(s) + 46 Line(s) of event code + 28 Unique line(s) of event code +settings + 15 Component(s) + 65 Line(s) of event code + 32 Unique line(s) of event code +boot + 11 Component(s) + 6 Line(s) of event code + 5 Unique line(s) of event code +weather05 + 19 Component(s) + 47 Line(s) of event code + 29 Unique line(s) of event code +coversettings + 16 Component(s) + 90 Line(s) of event code + 35 Unique line(s) of event code +weather01 + 19 Component(s) + 47 Line(s) of event code + 29 Unique line(s) of event code +notification + 12 Component(s) + 60 Line(s) of event code + 31 Unique line(s) of event code +weather02 + 19 Component(s) + 47 Line(s) of event code + 29 Unique line(s) of event code +weather04 + 19 Component(s) + 47 Line(s) of event code + 29 Unique line(s) of event code +entitypage03 + 29 Component(s) + 48 Line(s) of event code + 30 Unique line(s) of event code +entitypage04 + 29 Component(s) + 48 Line(s) of event code + 29 Unique line(s) of event code +entitypage01 + 29 Component(s) + 49 Line(s) of event code + 30 Unique line(s) of event code +weather03 + 19 Component(s) + 47 Line(s) of event code + 29 Unique line(s) of event code +climate + 25 Component(s) + 391 Line(s) of event code + 105 Unique line(s) of event code +entitypage02 + 29 Component(s) + 47 Line(s) of event code + 29 Unique line(s) of event code +lightsettings + 33 Component(s) + 306 Line(s) of event code + 164 Unique line(s) of event code +buttonpage03 + 46 Component(s) + 162 Line(s) of event code + 49 Unique line(s) of event code +home + 55 Component(s) + 130 Line(s) of event code + 51 Unique line(s) of event code +buttonpage01 + 46 Component(s) + 161 Line(s) of event code + 48 Unique line(s) of event code +buttonpage02 + 46 Component(s) + 162 Line(s) of event code + 49 Unique line(s) of event code +buttonpage04 + 46 Component(s) + 161 Line(s) of event code + 48 Unique line(s) of event code + +Total + 22 Page(s) + 571 Component(s) + 2183 Line(s) of event code + 431 Unique line(s) of event code diff --git a/nspanel_us_code/qrcode.txt b/nspanel_us_code/qrcode.txt new file mode 100644 index 0000000..0fcb693 --- /dev/null +++ b/nspanel_us_code/qrcode.txt @@ -0,0 +1,168 @@ +Page qrcode + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 320 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : picture + Back. Picture ID : 104 + + Events + Preinitialize Event + dim=home.brightness.val + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"qrcode\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"qrcode\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"qrcode\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Text qrcode_label + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 10 + y coordinate : 7 + Width : 244 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 3 + Back. Color : 0 + Font Color : 50712 + Horizontal Alignment: left + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 30 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +QR Code qrcode_value + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 51 + y coordinate : 127 + Width : 222 + Height : 222 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Logo overlay : no + Text : + Max. Text Size : 50 + +Hotspot qrcode_back + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 258 + y coordinate : 2 + Width : 60 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + page home + +Timer swipestore + Attributes + ID : 2 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 1 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + //page + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_us_code/screensaver.txt b/nspanel_us_code/screensaver.txt new file mode 100644 index 0000000..53f4345 --- /dev/null +++ b/nspanel_us_code/screensaver.txt @@ -0,0 +1,45 @@ +Page screensaver + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 320 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : solid color + Back. Color : 0 + + Events + Preinitialize Event + dim=0 + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"screensaver\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + +Variable (int32) orign + Attributes + ID : 2 + Scope: global + Value: 0 + +TouchCap wakeup + Attributes + ID : 1 + Scope: local + Value: 0 + + Events + Touch Press Event + page orign.val + diff --git a/nspanel_us_code/settings.txt b/nspanel_us_code/settings.txt new file mode 100644 index 0000000..9fc45f7 --- /dev/null +++ b/nspanel_us_code/settings.txt @@ -0,0 +1,430 @@ +Page settings + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 320 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : picture + Back. Picture ID : 124 + + Events + Preinitialize Event + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"settings\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"settings\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"settings\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Text a03 + Attributes + ID : 3 + Scope : global + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 237 + y coordinate : 232 + Width : 40 + Height : 21 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 10 + Back. Color : 0 + Font Color : 65535 + Horizontal Alignment: right + Vertical Alignment : bottom + Input Type : character + Text : 80 + Max. Text Size : 3 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text a04 + Attributes + ID : 4 + Scope : global + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 236 + y coordinate : 333 + Width : 40 + Height : 21 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 10 + Back. Color : 0 + Font Color : 65535 + Horizontal Alignment: right + Vertical Alignment : bottom + Input Type : character + Text : 10 + Max. Text Size : 3 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text a06 + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 20 + y coordinate : 58 + Width : 80 + Height : 40 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 10 + Back. Color : 0 + Font Color : 65535 + Horizontal Alignment: left + Vertical Alignment : center + Input Type : character + Text : Reboot + Max. Text Size : 6 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text a07 + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 20 + y coordinate : 106 + Width : 80 + Height : 40 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 10 + Back. Color : 0 + Font Color : 65535 + Horizontal Alignment: left + Vertical Alignment : center + Input Type : character + Text : Sleep + Max. Text Size : 5 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text a08 + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 18 + y coordinate : 225 + Width : 85 + Height : 40 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 9 + Back. Color : 0 + Font Color : 65535 + Horizontal Alignment: left + Vertical Alignment : center + Input Type : character + Text : Brightness + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text a09 + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 18 + y coordinate : 325 + Width : 85 + Height : 40 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 9 + Back. Color : 0 + Font Color : 65535 + Horizontal Alignment: left + Vertical Alignment : center + Input Type : character + Text : Dimming + Max. Text Size : 7 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Picture settings_exit + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 289 + y coordinate : 8 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 56 + +Slider brightslider + Attributes + ID : 1 + Scope : global + Dragging : 0 + Send Component ID : on press and release + Opacity : 127 + x coordinate : 46 + y coordinate : 273 + Width : 227 + Height : 32 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Direction : horizontal + Fill : crop image + Cursor width : auto + Cursor height : 255 + Cropped Back. Picture ID : 124 + Cropped Slided Back. Picture ID: 125 + Position : 80 + Upper range limit : 100 + Lower range limit : 0 + + Events + Touch Release Event + printh 91 + prints "brightslider",0 + printh 00 + prints brightslider.val,0 + printh FF FF FF + +Slider dimslider + Attributes + ID : 2 + Scope : global + Dragging : 0 + Send Component ID : on press and release + Opacity : 127 + x coordinate : 46 + y coordinate : 374 + Width : 227 + Height : 32 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Direction : horizontal + Fill : crop image + Cursor width : auto + Cursor height : 255 + Cropped Back. Picture ID : 124 + Cropped Slided Back. Picture ID: 125 + Position : 20 + Upper range limit : 100 + Lower range limit : 0 + + Events + Touch Release Event + printh 91 + prints "dimslider",0 + printh 00 + prints dimslider.val,0 + printh FF FF FF + +Dual-state Button bt0 + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : on press and release + Opacity : 127 + x coordinate : 117 + y coordinate : 59 + Width : 80 + Height : 40 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Font ID : 9 + Cropped Back. Picture ID (Unpressed): 124 + Back. Picture ID (Pressed) : 65535 + Cropped Back. Picture ID (Pressed) : 125 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text : + Max. Text Size : 0 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Dual-state Button bt1 + Attributes + ID : 14 + Scope : global + Dragging : 0 + Send Component ID : on press and release + Opacity : 127 + x coordinate : 113 + y coordinate : 105 + Width : 80 + Height : 40 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Font ID : 9 + Cropped Back. Picture ID (Unpressed): 124 + Back. Picture ID (Pressed) : 65535 + Cropped Back. Picture ID (Pressed) : 125 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text : + Max. Text Size : 0 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Hotspot setings_back + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 260 + y coordinate : 1 + Width : 60 + Height : 60 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + page home + +Timer swipestore + Attributes + ID : 11 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 12 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + //page + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_us_code/weather01.txt b/nspanel_us_code/weather01.txt new file mode 100644 index 0000000..7440bca --- /dev/null +++ b/nspanel_us_code/weather01.txt @@ -0,0 +1,516 @@ +Page weather01 + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 320 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : picture + Back. Picture ID : 109 + + Events + Preinitialize Event + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"weather01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"weather01\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"weather01\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Text day + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 97 + y coordinate : 59 + Width : 200 + Height : 40 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 109 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text date + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 67 + y coordinate : 102 + Width : 230 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 109 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 25 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text temperature + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 21 + y coordinate : 249 + Width : 120 + Height : 23 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 109 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value01 + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 17 + y coordinate : 308 + Width : 220 + Height : 22 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 109 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05 + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 17 + y coordinate : 428 + Width : 220 + Height : 22 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 109 + Horizontal Alignment : right + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04 + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 17 + y coordinate : 398 + Width : 220 + Height : 21 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 109 + Horizontal Alignment : right + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02 + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 17 + y coordinate : 338 + Width : 220 + Height : 22 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 109 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03 + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 17 + y coordinate : 368 + Width : 220 + Height : 24 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 109 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value01_icon + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 246 + y coordinate : 305 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 109 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02_icon + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 246 + y coordinate : 335 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 109 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03_icon + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 246 + y coordinate : 365 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 109 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04_icon + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 246 + y coordinate : 395 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 109 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05_icon + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 246 + y coordinate : 425 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 109 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text loading + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 45 + y coordinate : 5 + Width : 100 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 3 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 1 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Picture weather_icon + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 20 + y coordinate : 143 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Hotspot weather_back + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 260 + y coordinate : 0 + Width : 60 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + page home + +Timer swipestore + Attributes + ID : 2 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 1 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + page weather05 + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_us_code/weather02.txt b/nspanel_us_code/weather02.txt new file mode 100644 index 0000000..95784d4 --- /dev/null +++ b/nspanel_us_code/weather02.txt @@ -0,0 +1,516 @@ +Page weather02 + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 320 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : picture + Back. Picture ID : 110 + + Events + Preinitialize Event + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"weather02\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"weather02\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"weather02\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Text day + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 97 + y coordinate : 59 + Width : 200 + Height : 40 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 110 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value01 + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 17 + y coordinate : 308 + Width : 220 + Height : 22 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 110 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05 + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 17 + y coordinate : 428 + Width : 220 + Height : 22 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 110 + Horizontal Alignment : right + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04 + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 17 + y coordinate : 398 + Width : 220 + Height : 21 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 110 + Horizontal Alignment : right + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02 + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 17 + y coordinate : 338 + Width : 220 + Height : 22 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 110 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03 + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 17 + y coordinate : 368 + Width : 220 + Height : 24 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 110 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value01_icon + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 246 + y coordinate : 305 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 110 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02_icon + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 246 + y coordinate : 335 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 110 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03_icon + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 246 + y coordinate : 365 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 110 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04_icon + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 246 + y coordinate : 395 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 110 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05_icon + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 246 + y coordinate : 425 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 110 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text loading + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 45 + y coordinate : 5 + Width : 100 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 3 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 1 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text date + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 67 + y coordinate : 102 + Width : 230 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 109 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 25 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text temperature + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 21 + y coordinate : 249 + Width : 120 + Height : 23 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 109 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Picture weather_icon + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 20 + y coordinate : 143 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Hotspot weather_back + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 260 + y coordinate : 0 + Width : 60 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + page home + +Timer swipestore + Attributes + ID : 2 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 1 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + page weather01 + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_us_code/weather03.txt b/nspanel_us_code/weather03.txt new file mode 100644 index 0000000..adca771 --- /dev/null +++ b/nspanel_us_code/weather03.txt @@ -0,0 +1,516 @@ +Page weather03 + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 320 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : picture + Back. Picture ID : 111 + + Events + Preinitialize Event + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"weather03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"weather03\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"weather03\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Text day + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 97 + y coordinate : 59 + Width : 200 + Height : 40 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 111 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value01 + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 17 + y coordinate : 308 + Width : 220 + Height : 22 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 111 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05 + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 17 + y coordinate : 428 + Width : 220 + Height : 22 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 111 + Horizontal Alignment : right + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04 + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 17 + y coordinate : 398 + Width : 220 + Height : 21 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 111 + Horizontal Alignment : right + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02 + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 17 + y coordinate : 338 + Width : 220 + Height : 22 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 111 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03 + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 17 + y coordinate : 368 + Width : 220 + Height : 24 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 111 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value01_icon + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 246 + y coordinate : 305 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 111 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02_icon + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 246 + y coordinate : 335 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 111 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03_icon + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 246 + y coordinate : 365 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 111 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04_icon + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 246 + y coordinate : 395 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 111 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05_icon + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 246 + y coordinate : 425 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 111 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text loading + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 45 + y coordinate : 5 + Width : 100 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 3 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 1 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text date + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 67 + y coordinate : 102 + Width : 230 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 109 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 25 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text temperature + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 21 + y coordinate : 249 + Width : 120 + Height : 23 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 109 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Picture weather_icon + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 20 + y coordinate : 143 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Hotspot weather_back + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 260 + y coordinate : 0 + Width : 60 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + page home + +Timer swipestore + Attributes + ID : 2 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 1 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + page weather02 + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_us_code/weather04.txt b/nspanel_us_code/weather04.txt new file mode 100644 index 0000000..5563d1a --- /dev/null +++ b/nspanel_us_code/weather04.txt @@ -0,0 +1,516 @@ +Page weather04 + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 320 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : picture + Back. Picture ID : 112 + + Events + Preinitialize Event + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"weather04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"weather04\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"weather04\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Text day + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 97 + y coordinate : 59 + Width : 200 + Height : 40 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 112 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value01 + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 17 + y coordinate : 308 + Width : 220 + Height : 22 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 112 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05 + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 17 + y coordinate : 428 + Width : 220 + Height : 22 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 112 + Horizontal Alignment : right + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04 + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 17 + y coordinate : 398 + Width : 220 + Height : 21 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 112 + Horizontal Alignment : right + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02 + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 17 + y coordinate : 338 + Width : 220 + Height : 22 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 112 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03 + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 17 + y coordinate : 368 + Width : 220 + Height : 24 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 112 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value01_icon + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 246 + y coordinate : 305 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 112 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02_icon + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 246 + y coordinate : 335 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 112 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03_icon + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 246 + y coordinate : 365 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 112 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04_icon + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 246 + y coordinate : 395 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 112 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05_icon + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 246 + y coordinate : 425 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 112 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text loading + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 45 + y coordinate : 5 + Width : 100 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 3 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 1 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text date + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 67 + y coordinate : 102 + Width : 230 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 109 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 25 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text temperature + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 21 + y coordinate : 249 + Width : 120 + Height : 23 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 109 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Picture weather_icon + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 20 + y coordinate : 143 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Hotspot weather_back + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 260 + y coordinate : 0 + Width : 60 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + page home + +Timer swipestore + Attributes + ID : 2 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 1 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + page weather03 + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_us_code/weather05.txt b/nspanel_us_code/weather05.txt new file mode 100644 index 0000000..e3d40f2 --- /dev/null +++ b/nspanel_us_code/weather05.txt @@ -0,0 +1,516 @@ +Page weather05 + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + Width : 320 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + Fill : picture + Back. Picture ID : 113 + + Events + Preinitialize Event + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"weather05\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"weather05\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"weather05\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Text day + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 97 + y coordinate : 59 + Width : 200 + Height : 40 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 113 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value01 + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 17 + y coordinate : 308 + Width : 220 + Height : 22 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 113 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05 + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 17 + y coordinate : 428 + Width : 220 + Height : 22 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 113 + Horizontal Alignment : right + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04 + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 17 + y coordinate : 398 + Width : 220 + Height : 21 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 113 + Horizontal Alignment : right + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02 + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 17 + y coordinate : 338 + Width : 220 + Height : 22 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 113 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03 + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 17 + y coordinate : 368 + Width : 220 + Height : 24 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 113 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value01_icon + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 246 + y coordinate : 305 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 113 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value02_icon + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 246 + y coordinate : 335 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 113 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value03_icon + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 246 + y coordinate : 365 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 113 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value04_icon + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 246 + y coordinate : 395 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 113 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text value05_icon + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 246 + y coordinate : 425 + Width : 25 + Height : 25 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 7 + Cropped Back. Picture ID: 113 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text loading + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 45 + y coordinate : 5 + Width : 100 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 3 + Back. Color : 0 + Font Color : 0 + Horizontal Alignment: center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 1 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text date + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 67 + y coordinate : 102 + Width : 230 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 109 + Horizontal Alignment : right + Vertical Alignment : bottom + Input Type : character + Text : + Max. Text Size : 25 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text temperature + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 21 + y coordinate : 249 + Width : 120 + Height : 23 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : crop image + Associated Keyboard : none + Font ID : 3 + Cropped Back. Picture ID: 109 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 15 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Picture weather_icon + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 20 + y coordinate : 143 + Width : 100 + Height : 100 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 1 + +Hotspot weather_back + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID: disabled + Opacity : 127 + x coordinate : 260 + y coordinate : 0 + Width : 60 + Height : 35 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + page home + +Timer swipestore + Attributes + ID : 2 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 1 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + page weather04 + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } +