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");
|
if (supported_features & 32 and state != "off") id(disp1).show_component("bt_next"); else id(disp1).hide_component("bt_next");
|
||||||
|
|
||||||
// Stop button - STOP
|
// 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
|
// mute/unmute button - VOLUME_MUTE
|
||||||
id(disp1).set_component_value("is_muted", (is_volume_muted) ? 1 : 0);
|
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_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_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_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_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_down", "%s", "\uE75D"); //mdi:volume-minus
|
||||||
id(disp1).set_component_text_printf("bt_vol_up", "%s", "\uE75C"); //mdi:volume-plus
|
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
|
Variable (string) lastclick
|
||||||
Attributes
|
Attributes
|
||||||
ID : 20
|
ID : 19
|
||||||
Scope : local
|
Scope : local
|
||||||
Text :
|
Text :
|
||||||
Max. Text Size: 255
|
Max. Text Size: 255
|
||||||
|
|
||||||
Variable (string) va0
|
Variable (string) va0
|
||||||
Attributes
|
Attributes
|
||||||
ID : 23
|
ID : 22
|
||||||
Scope : local
|
Scope : local
|
||||||
Text :
|
Text :
|
||||||
Max. Text Size: 10
|
Max. Text Size: 10
|
||||||
|
|
||||||
Variable (int32) is_muted
|
Variable (int32) is_muted
|
||||||
Attributes
|
Attributes
|
||||||
ID : 24
|
ID : 23
|
||||||
Scope: local
|
Scope: local
|
||||||
Value: 0
|
Value: 0
|
||||||
|
|
||||||
Variable (int32) prg_current
|
Variable (int32) prg_current
|
||||||
Attributes
|
Attributes
|
||||||
ID : 26
|
ID : 25
|
||||||
Scope: local
|
Scope: local
|
||||||
Value: 0
|
Value: 0
|
||||||
|
|
||||||
Variable (int32) prg_total
|
Variable (int32) prg_total
|
||||||
Attributes
|
Attributes
|
||||||
ID : 27
|
ID : 26
|
||||||
Scope: local
|
Scope: local
|
||||||
Value: 0
|
Value: 0
|
||||||
|
|
||||||
@@ -391,35 +391,9 @@ Text bt_play_pause
|
|||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
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
|
Text bt_next
|
||||||
Attributes
|
Attributes
|
||||||
ID : 18
|
ID : 17
|
||||||
Scope : local
|
Scope : local
|
||||||
Dragging : 0
|
Dragging : 0
|
||||||
Send Component ID : disabled
|
Send Component ID : disabled
|
||||||
@@ -445,7 +419,7 @@ Text bt_next
|
|||||||
|
|
||||||
Text bt_on_off
|
Text bt_on_off
|
||||||
Attributes
|
Attributes
|
||||||
ID : 19
|
ID : 18
|
||||||
Scope : local
|
Scope : local
|
||||||
Dragging : 0
|
Dragging : 0
|
||||||
Send Component ID : disabled
|
Send Component ID : disabled
|
||||||
@@ -551,7 +525,7 @@ Button button_back
|
|||||||
|
|
||||||
Timer wakeup_timer
|
Timer wakeup_timer
|
||||||
Attributes
|
Attributes
|
||||||
ID : 21
|
ID : 20
|
||||||
Scope : local
|
Scope : local
|
||||||
Period (ms): 100
|
Period (ms): 100
|
||||||
Enabled : yes
|
Enabled : yes
|
||||||
@@ -574,7 +548,7 @@ Timer wakeup_timer
|
|||||||
|
|
||||||
Timer timer0
|
Timer timer0
|
||||||
Attributes
|
Attributes
|
||||||
ID : 22
|
ID : 21
|
||||||
Scope : local
|
Scope : local
|
||||||
Period (ms): 1000
|
Period (ms): 1000
|
||||||
Enabled : no
|
Enabled : no
|
||||||
@@ -594,7 +568,7 @@ Timer timer0
|
|||||||
|
|
||||||
Timer prg_timer
|
Timer prg_timer
|
||||||
Attributes
|
Attributes
|
||||||
ID : 25
|
ID : 24
|
||||||
Scope : local
|
Scope : local
|
||||||
Period (ms): 1000
|
Period (ms): 1000
|
||||||
Enabled : no
|
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
|
Variable (string) lastclick
|
||||||
Attributes
|
Attributes
|
||||||
ID : 20
|
ID : 19
|
||||||
Scope : local
|
Scope : local
|
||||||
Text :
|
Text :
|
||||||
Max. Text Size: 255
|
Max. Text Size: 255
|
||||||
|
|
||||||
Variable (string) va0
|
Variable (string) va0
|
||||||
Attributes
|
Attributes
|
||||||
ID : 23
|
ID : 22
|
||||||
Scope : local
|
Scope : local
|
||||||
Text :
|
Text :
|
||||||
Max. Text Size: 10
|
Max. Text Size: 10
|
||||||
|
|
||||||
Variable (int32) is_muted
|
Variable (int32) is_muted
|
||||||
Attributes
|
Attributes
|
||||||
ID : 24
|
ID : 23
|
||||||
Scope: local
|
Scope: local
|
||||||
Value: 0
|
Value: 0
|
||||||
|
|
||||||
Variable (int32) prg_current
|
Variable (int32) prg_current
|
||||||
Attributes
|
Attributes
|
||||||
ID : 26
|
ID : 25
|
||||||
Scope: local
|
Scope: local
|
||||||
Value: 0
|
Value: 0
|
||||||
|
|
||||||
Variable (int32) prg_total
|
Variable (int32) prg_total
|
||||||
Attributes
|
Attributes
|
||||||
ID : 27
|
ID : 26
|
||||||
Scope: local
|
Scope: local
|
||||||
Value: 0
|
Value: 0
|
||||||
|
|
||||||
@@ -390,35 +390,9 @@ Text bt_play_pause
|
|||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
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
|
Text bt_next
|
||||||
Attributes
|
Attributes
|
||||||
ID : 18
|
ID : 17
|
||||||
Scope : local
|
Scope : local
|
||||||
Dragging : 0
|
Dragging : 0
|
||||||
Send Component ID : disabled
|
Send Component ID : disabled
|
||||||
@@ -444,7 +418,7 @@ Text bt_next
|
|||||||
|
|
||||||
Text bt_on_off
|
Text bt_on_off
|
||||||
Attributes
|
Attributes
|
||||||
ID : 19
|
ID : 18
|
||||||
Scope : local
|
Scope : local
|
||||||
Dragging : 0
|
Dragging : 0
|
||||||
Send Component ID : disabled
|
Send Component ID : disabled
|
||||||
@@ -550,7 +524,7 @@ Button button_back
|
|||||||
|
|
||||||
Timer wakeup_timer
|
Timer wakeup_timer
|
||||||
Attributes
|
Attributes
|
||||||
ID : 21
|
ID : 20
|
||||||
Scope : local
|
Scope : local
|
||||||
Period (ms): 100
|
Period (ms): 100
|
||||||
Enabled : yes
|
Enabled : yes
|
||||||
@@ -573,7 +547,7 @@ Timer wakeup_timer
|
|||||||
|
|
||||||
Timer timer0
|
Timer timer0
|
||||||
Attributes
|
Attributes
|
||||||
ID : 22
|
ID : 21
|
||||||
Scope : local
|
Scope : local
|
||||||
Period (ms): 1000
|
Period (ms): 1000
|
||||||
Enabled : no
|
Enabled : no
|
||||||
@@ -593,7 +567,7 @@ Timer timer0
|
|||||||
|
|
||||||
Timer prg_timer
|
Timer prg_timer
|
||||||
Attributes
|
Attributes
|
||||||
ID : 25
|
ID : 24
|
||||||
Scope : local
|
Scope : local
|
||||||
Period (ms): 1000
|
Period (ms): 1000
|
||||||
Enabled : no
|
Enabled : no
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -48,33 +48,33 @@ Variable (string) back_page
|
|||||||
|
|
||||||
Variable (string) lastclick
|
Variable (string) lastclick
|
||||||
Attributes
|
Attributes
|
||||||
ID : 20
|
ID : 19
|
||||||
Scope : local
|
Scope : local
|
||||||
Text :
|
Text :
|
||||||
Max. Text Size: 255
|
Max. Text Size: 255
|
||||||
|
|
||||||
Variable (string) va0
|
Variable (string) va0
|
||||||
Attributes
|
Attributes
|
||||||
ID : 23
|
ID : 22
|
||||||
Scope : local
|
Scope : local
|
||||||
Text :
|
Text :
|
||||||
Max. Text Size: 10
|
Max. Text Size: 10
|
||||||
|
|
||||||
Variable (int32) is_muted
|
Variable (int32) is_muted
|
||||||
Attributes
|
Attributes
|
||||||
ID : 24
|
ID : 23
|
||||||
Scope: local
|
Scope: local
|
||||||
Value: 0
|
Value: 0
|
||||||
|
|
||||||
Variable (int32) prg_current
|
Variable (int32) prg_current
|
||||||
Attributes
|
Attributes
|
||||||
ID : 26
|
ID : 25
|
||||||
Scope: local
|
Scope: local
|
||||||
Value: 0
|
Value: 0
|
||||||
|
|
||||||
Variable (int32) prg_total
|
Variable (int32) prg_total
|
||||||
Attributes
|
Attributes
|
||||||
ID : 27
|
ID : 26
|
||||||
Scope: local
|
Scope: local
|
||||||
Value: 0
|
Value: 0
|
||||||
|
|
||||||
@@ -98,6 +98,21 @@ Text icon_state
|
|||||||
Text :
|
Text :
|
||||||
Max. Text Size : 10
|
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
|
Text vol_text
|
||||||
Attributes
|
Attributes
|
||||||
ID : 6
|
ID : 6
|
||||||
@@ -376,35 +391,9 @@ Text bt_play_pause
|
|||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
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
|
Text bt_next
|
||||||
Attributes
|
Attributes
|
||||||
ID : 18
|
ID : 17
|
||||||
Scope : local
|
Scope : local
|
||||||
Dragging : 0
|
Dragging : 0
|
||||||
Send Component ID : disabled
|
Send Component ID : disabled
|
||||||
@@ -430,7 +419,7 @@ Text bt_next
|
|||||||
|
|
||||||
Text bt_on_off
|
Text bt_on_off
|
||||||
Attributes
|
Attributes
|
||||||
ID : 19
|
ID : 18
|
||||||
Scope : local
|
Scope : local
|
||||||
Dragging : 0
|
Dragging : 0
|
||||||
Send Component ID : disabled
|
Send Component ID : disabled
|
||||||
@@ -496,14 +485,14 @@ Slider vol_slider
|
|||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
|
|
||||||
Touch Release Event
|
Touch Release Event
|
||||||
|
covx vol_slider.val,va0.txt,0,0
|
||||||
|
vol_text.txt=va0.txt+"%"
|
||||||
|
timer0.en=1
|
||||||
printh 91
|
printh 91
|
||||||
prints "touchevent",0
|
prints "touchevent",0
|
||||||
printh 00
|
printh 00
|
||||||
prints rand,0
|
prints rand,0
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
covx vol_slider.val,va0.txt,0,0
|
|
||||||
vol_text.txt=va0.txt+"%"
|
|
||||||
timer0.en=1
|
|
||||||
|
|
||||||
Button button_back
|
Button button_back
|
||||||
Attributes
|
Attributes
|
||||||
@@ -517,11 +506,6 @@ Button button_back
|
|||||||
|
|
||||||
Events
|
Events
|
||||||
Touch Press Event
|
Touch Press Event
|
||||||
printh 91
|
|
||||||
prints "touchevent",0
|
|
||||||
printh 00
|
|
||||||
prints rand,0
|
|
||||||
printh FF FF FF
|
|
||||||
if(back_page.txt=="buttonpage01")
|
if(back_page.txt=="buttonpage01")
|
||||||
{
|
{
|
||||||
page buttonpage01
|
page buttonpage01
|
||||||
@@ -541,7 +525,7 @@ Button button_back
|
|||||||
|
|
||||||
Timer wakeup_timer
|
Timer wakeup_timer
|
||||||
Attributes
|
Attributes
|
||||||
ID : 21
|
ID : 20
|
||||||
Scope : local
|
Scope : local
|
||||||
Period (ms): 100
|
Period (ms): 100
|
||||||
Enabled : yes
|
Enabled : yes
|
||||||
@@ -564,7 +548,7 @@ Timer wakeup_timer
|
|||||||
|
|
||||||
Timer timer0
|
Timer timer0
|
||||||
Attributes
|
Attributes
|
||||||
ID : 22
|
ID : 21
|
||||||
Scope : local
|
Scope : local
|
||||||
Period (ms): 1000
|
Period (ms): 1000
|
||||||
Enabled : no
|
Enabled : no
|
||||||
@@ -584,7 +568,7 @@ Timer timer0
|
|||||||
|
|
||||||
Timer prg_timer
|
Timer prg_timer
|
||||||
Attributes
|
Attributes
|
||||||
ID : 25
|
ID : 24
|
||||||
Scope : local
|
Scope : local
|
||||||
Period (ms): 1000
|
Period (ms): 1000
|
||||||
Enabled : no
|
Enabled : no
|
||||||
|
|||||||
Reference in New Issue
Block a user