comparison src/menu_processor.asm @ 50:ec4d8503ec45

NEW: user-selectable color schemes
author heinrichsweikamp
date Fri, 27 Sep 2013 23:45:57 +0200
parents 11d4fc797f74
children e7c7c7eeea58
comparison
equal deleted inserted replaced
49:fe01bbaf6014 50:ec4d8503ec45
133 movf PRODL,W ; Back to WREG 133 movf PRODL,W ; Back to WREG
134 sublw .80 ; 80 - width 134 sublw .80 ; 80 - width
135 movwf win_leftx2 ; Aligned to center. 135 movwf win_leftx2 ; Aligned to center.
136 136
137 call aa_wordprocessor 137 call aa_wordprocessor
138 TFT_STD_COLOR 138 call TFT_standard_color
139 return 139 return
140 140
141 ;============================================================================= 141 ;=============================================================================
142 ; Call dynamic proc for menu title: 142 ; Call dynamic proc for menu title:
143 143
247 iorwf proc_item+1,W 247 iorwf proc_item+1,W
248 bz next_line_menu ; YES: not selectable ! 248 bz next_line_menu ; YES: not selectable !
249 249
250 btfss divemode ; Not in divemode 250 btfss divemode ; Not in divemode
251 rcall menu_draw_selected_line 251 rcall menu_draw_selected_line
252
253 btfsc in_color_menu ; =1: In the color scheme menu
254 call TFT_show_color_schemes ; Yes, update the color schemes
252 255
253 extern rtc_set_rtc 256 extern rtc_set_rtc
254 btfss settime_setdate ; In the Set Time or Set Date menu? 257 btfss settime_setdate ; In the Set Time or Set Date menu?
255 bra menu_line_loop_pre2 ; no, skip all following 258 bra menu_line_loop_pre2 ; no, skip all following
256 259
435 438
436 menu_draw_lines_2: 439 menu_draw_lines_2:
437 movff start_item, menu_item 440 movff start_item, menu_item
438 441
439 menu_draw_lines_1: 442 menu_draw_lines_1:
440 TFT_STD_COLOR ; Restore color after disabled lines. 443 call TFT_standard_color ; Restore color after disabled lines.
441 444
442 movf menu_item,W 445 movf menu_item,W
443 rcall menu_read_item 446 rcall menu_read_item
444 447
445 movf value_type,W ; Switch on data type 448 movf value_type,W ; Switch on data type
550 ; Put a mark in front of the current line 553 ; Put a mark in front of the current line
551 menu_draw_selected_line: 554 menu_draw_selected_line:
552 clrf timeout_counter2 ; Reset timeout 555 clrf timeout_counter2 ; Reset timeout
553 WIN_BOX_BLACK .34,.221,MENU_LEFT-8,MENU_LEFT-2 ; Clear left column 556 WIN_BOX_BLACK .34,.221,MENU_LEFT-8,MENU_LEFT-2 ; Clear left column
554 557
555 TFT_STD_COLOR 558 call TFT_standard_color
556 WIN_SMALL MENU_LEFT-8, 0 ; Arrow symbol only in small font 559 WIN_SMALL MENU_LEFT-8, 0 ; Arrow symbol only in small font
557 movf start_item,W ; First line (scrolled) 560 movf start_item,W ; First line (scrolled)
558 subwf selected_item,W ; selected - first 561 subwf selected_item,W ; selected - first
559 mullw MENU_HEIGHT ; 30 pixel by line 562 mullw MENU_HEIGHT ; 30 pixel by line
560 movf PRODL,W ; result 563 movf PRODL,W ; result