Media player - Layout improvement
- Removed button "Stop" - Increase touch area for buttons - Redistributed buttons on page
This commit is contained in:
@@ -805,7 +805,7 @@ api:
|
||||
if (supported_features & 32 and state != "off") id(disp1).show_component("bt_next"); else id(disp1).hide_component("bt_next");
|
||||
|
||||
// Stop button - STOP
|
||||
if (supported_features & 4096 and (state == "playing" or state == "paused")) id(disp1).show_component("bt_stop"); else id(disp1).hide_component("bt_stop");
|
||||
//if (supported_features & 4096 and (state == "playing" or state == "paused")) id(disp1).show_component("bt_stop"); else id(disp1).hide_component("bt_stop");
|
||||
|
||||
// mute/unmute button - VOLUME_MUTE
|
||||
id(disp1).set_component_value("is_muted", (is_volume_muted) ? 1 : 0);
|
||||
@@ -1411,7 +1411,7 @@ text_sensor:
|
||||
id(disp1).set_component_text_printf("bt_prev", "%s", "\uE4AD"); //mdi:skip-previous
|
||||
id(disp1).set_component_text_printf("bt_next", "%s", "\uE4AC"); //mdi:skip-next
|
||||
id(disp1).set_component_text_printf("bt_play_pause", "%s", "\uE40D"); //mdi:play-pause
|
||||
id(disp1).set_component_text_printf("bt_stop", "%s", "\uE4DA"); //mdi:stop
|
||||
//id(disp1).set_component_text_printf("bt_stop", "%s", "\uE4DA"); //mdi:stop
|
||||
id(disp1).set_component_text_printf("bt_mute", "%s", "\uE75E"); //mdi:volume-mute
|
||||
id(disp1).set_component_text_printf("bt_vol_down", "%s", "\uE75D"); //mdi:volume-minus
|
||||
id(disp1).set_component_text_printf("bt_vol_up", "%s", "\uE75C"); //mdi:volume-plus
|
||||
|
||||
BIN
nspanel_eu.HMI
BIN
nspanel_eu.HMI
Binary file not shown.
BIN
nspanel_eu.tft
BIN
nspanel_eu.tft
Binary file not shown.
@@ -48,33 +48,33 @@ Variable (string) back_page
|
||||
|
||||
Variable (string) lastclick
|
||||
Attributes
|
||||
ID : 20
|
||||
ID : 19
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 255
|
||||
|
||||
Variable (string) va0
|
||||
Attributes
|
||||
ID : 23
|
||||
ID : 22
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Variable (int32) is_muted
|
||||
Attributes
|
||||
ID : 24
|
||||
ID : 23
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (int32) prg_current
|
||||
Attributes
|
||||
ID : 26
|
||||
ID : 25
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (int32) prg_total
|
||||
Attributes
|
||||
ID : 27
|
||||
ID : 26
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
@@ -391,35 +391,9 @@ Text bt_play_pause
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text bt_stop
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"media_player\", \"key\": \"media_stop\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text bt_next
|
||||
Attributes
|
||||
ID : 18
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -445,7 +419,7 @@ Text bt_next
|
||||
|
||||
Text bt_on_off
|
||||
Attributes
|
||||
ID : 19
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -551,7 +525,7 @@ Button button_back
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 21
|
||||
ID : 20
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
@@ -574,7 +548,7 @@ Timer wakeup_timer
|
||||
|
||||
Timer timer0
|
||||
Attributes
|
||||
ID : 22
|
||||
ID : 21
|
||||
Scope : local
|
||||
Period (ms): 1000
|
||||
Enabled : no
|
||||
@@ -594,7 +568,7 @@ Timer timer0
|
||||
|
||||
Timer prg_timer
|
||||
Attributes
|
||||
ID : 25
|
||||
ID : 24
|
||||
Scope : local
|
||||
Period (ms): 1000
|
||||
Enabled : no
|
||||
|
||||
BIN
nspanel_us.HMI
BIN
nspanel_us.HMI
Binary file not shown.
BIN
nspanel_us.tft
BIN
nspanel_us.tft
Binary file not shown.
@@ -48,33 +48,33 @@ Variable (string) back_page
|
||||
|
||||
Variable (string) lastclick
|
||||
Attributes
|
||||
ID : 20
|
||||
ID : 19
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 255
|
||||
|
||||
Variable (string) va0
|
||||
Attributes
|
||||
ID : 23
|
||||
ID : 22
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Variable (int32) is_muted
|
||||
Attributes
|
||||
ID : 24
|
||||
ID : 23
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (int32) prg_current
|
||||
Attributes
|
||||
ID : 26
|
||||
ID : 25
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (int32) prg_total
|
||||
Attributes
|
||||
ID : 27
|
||||
ID : 26
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
@@ -390,35 +390,9 @@ Text bt_play_pause
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text bt_stop
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"media_player\", \"key\": \"media_stop\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text bt_next
|
||||
Attributes
|
||||
ID : 18
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -444,7 +418,7 @@ Text bt_next
|
||||
|
||||
Text bt_on_off
|
||||
Attributes
|
||||
ID : 19
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -550,7 +524,7 @@ Button button_back
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 21
|
||||
ID : 20
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
@@ -573,7 +547,7 @@ Timer wakeup_timer
|
||||
|
||||
Timer timer0
|
||||
Attributes
|
||||
ID : 22
|
||||
ID : 21
|
||||
Scope : local
|
||||
Period (ms): 1000
|
||||
Enabled : no
|
||||
@@ -593,7 +567,7 @@ Timer timer0
|
||||
|
||||
Timer prg_timer
|
||||
Attributes
|
||||
ID : 25
|
||||
ID : 24
|
||||
Scope : local
|
||||
Period (ms): 1000
|
||||
Enabled : no
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -48,33 +48,33 @@ Variable (string) back_page
|
||||
|
||||
Variable (string) lastclick
|
||||
Attributes
|
||||
ID : 20
|
||||
ID : 19
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 255
|
||||
|
||||
Variable (string) va0
|
||||
Attributes
|
||||
ID : 23
|
||||
ID : 22
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Variable (int32) is_muted
|
||||
Attributes
|
||||
ID : 24
|
||||
ID : 23
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (int32) prg_current
|
||||
Attributes
|
||||
ID : 26
|
||||
ID : 25
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (int32) prg_total
|
||||
Attributes
|
||||
ID : 27
|
||||
ID : 26
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
@@ -98,6 +98,21 @@ Text icon_state
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text vol_text
|
||||
Attributes
|
||||
ID : 6
|
||||
@@ -376,35 +391,9 @@ Text bt_play_pause
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text bt_stop
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"media_player\", \"key\": \"media_stop\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text bt_next
|
||||
Attributes
|
||||
ID : 18
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -430,7 +419,7 @@ Text bt_next
|
||||
|
||||
Text bt_on_off
|
||||
Attributes
|
||||
ID : 19
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -496,14 +485,14 @@ Slider vol_slider
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
covx vol_slider.val,va0.txt,0,0
|
||||
vol_text.txt=va0.txt+"%"
|
||||
timer0.en=1
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
covx vol_slider.val,va0.txt,0,0
|
||||
vol_text.txt=va0.txt+"%"
|
||||
timer0.en=1
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
@@ -517,11 +506,6 @@ Button button_back
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
if(back_page.txt=="buttonpage01")
|
||||
{
|
||||
page buttonpage01
|
||||
@@ -541,7 +525,7 @@ Button button_back
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 21
|
||||
ID : 20
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
@@ -564,7 +548,7 @@ Timer wakeup_timer
|
||||
|
||||
Timer timer0
|
||||
Attributes
|
||||
ID : 22
|
||||
ID : 21
|
||||
Scope : local
|
||||
Period (ms): 1000
|
||||
Enabled : no
|
||||
@@ -584,7 +568,7 @@ Timer timer0
|
||||
|
||||
Timer prg_timer
|
||||
Attributes
|
||||
ID : 25
|
||||
ID : 24
|
||||
Scope : local
|
||||
Period (ms): 1000
|
||||
Enabled : no
|
||||
|
||||
Reference in New Issue
Block a user