@@ -55,6 +55,12 @@ def __getattr__(self, attr):
55
55
dotdict ({ 'x' :1 , 'y' :2 , 'width' :1 , 'height' :1 , 'text' :"Info" , 'code' :"RM-ED050-12 KEY_INFO" }),
56
56
dotdict ({ 'x' :0 , 'y' :3 , 'width' :1 , 'height' :1 , 'text' :"Enter" , 'code' :"RM-ED050-12 KEY_SELECT" }),
57
57
dotdict ({ 'x' :1 , 'y' :3 , 'width' :1 , 'height' :1 , 'text' :"Back" , 'code' :"RM-ED050-15 KEY_BACK" }),
58
+
59
+ dotdict ({ 'x' :0 , 'y' :4 , 'width' :0.5 , 'height' :0.5 , 'text' :"" , 'code' :"RM-ED050-15 KEY_RED" , 'style' : { Style .BACKGROUND_COLOUR :(192 , 0 , 0 ), Style .HIGHLIGHT_COLOUR :(255 , 255 , 255 )} }),
60
+ dotdict ({ 'x' :0.5 , 'y' :4 , 'width' :0.5 , 'height' :0.5 , 'text' :"" , 'code' :"RM-ED050-15 KEY_GREEN" , 'style' : { Style .BACKGROUND_COLOUR :(0 , 192 , 0 ), Style .HIGHLIGHT_COLOUR :(255 ,255 ,255 )} }),
61
+ dotdict ({ 'x' :1 , 'y' :4 , 'width' :0.5 , 'height' :0.5 , 'text' :"" , 'code' :"RM-ED050-15 KEY_YELLOW" , 'style' : { Style .BACKGROUND_COLOUR :(192 , 192 , 0 ), Style .HIGHLIGHT_COLOUR :(255 ,255 ,255 )} }),
62
+ dotdict ({ 'x' :1.5 , 'y' :4 , 'width' :0.5 , 'height' :0.5 , 'text' :"" , 'code' :"RM-ED050-15 KEY_BLUE" , 'style' : { Style .BACKGROUND_COLOUR :(0 , 0 , 192 ), Style .HIGHLIGHT_COLOUR :(255 ,255 ,255 )} }),
63
+
58
64
dotdict ({ 'x' :0 , 'y' :5 , 'width' :2 , 'height' :1 , 'text' :"Mute" , 'code' :"Phillips-HTS KEY_MUTE" }),
59
65
]
60
66
@@ -123,6 +129,9 @@ def layout_buttons(self, layout):
123
129
style = self .button_style_large
124
130
else :
125
131
style = self .button_style
132
+
133
+ if button_def .has_key ('style' ):
134
+ style = Style .Style (style , button_def .style )
126
135
127
136
self .buttons .append (TouchScreenButton (x , y , w , h , button_def .text , button_def .code , style ))
128
137
@@ -297,6 +306,7 @@ def run(self):
297
306
time .sleep (0.1 )
298
307
pygame .event .set_allowed ([pygame .MOUSEBUTTONDOWN , pygame .MOUSEBUTTONUP , pygame .MOUSEMOTION ])
299
308
309
+ self .backlight .set (False )
300
310
I2C .deinit ()
301
311
IR .deinit ()
302
312
@@ -307,7 +317,7 @@ def send_ir(self, code):
307
317
for part in parts :
308
318
IR .send_once (part )
309
319
RPIO .output (8 , False )
310
- self .disable_screen_saver ()
320
+ self .disable_screen_saver ()
311
321
312
322
def enable_screen_saver (self ):
313
323
self .screen_saver = True
0 commit comments