annotate src/menu_processor.asm @ 641:1212d39c9f6f

3.14 beta work
author heinrichsweikamp
date Sat, 21 Nov 2020 17:46:29 +0100
parents 8c1f1f334275
children 7d8a4c60ec1a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
heinrichsweikamp
parents:
diff changeset
1 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
2 ;
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
3 ; File menu_processor.asm * combined next generation V3.12.1
0
heinrichsweikamp
parents:
diff changeset
4 ;
275
653a3ab08062 rename into hwOS
heinrichsweikamp
parents: 229
diff changeset
5 ; Routines to handle all hwOS graphic/text menus.
0
heinrichsweikamp
parents:
diff changeset
6 ;
heinrichsweikamp
parents:
diff changeset
7 ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved.
heinrichsweikamp
parents:
diff changeset
8 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
9 ; HISTORY
275
653a3ab08062 rename into hwOS
heinrichsweikamp
parents: 229
diff changeset
10 ; 2012-11-02 : [jDG] Cleanup for hwOS: removed icons. Added scrolling.
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 560
diff changeset
11 ; But need a font with lower/upper alpha chars...
0
heinrichsweikamp
parents:
diff changeset
12
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
13 #include "hwos.inc"
0
heinrichsweikamp
parents:
diff changeset
14 #include "convert.inc"
heinrichsweikamp
parents:
diff changeset
15 #include "strings.inc"
heinrichsweikamp
parents:
diff changeset
16 #include "tft.inc"
heinrichsweikamp
parents:
diff changeset
17 #include "varargs.inc"
heinrichsweikamp
parents:
diff changeset
18 #include "start.inc"
heinrichsweikamp
parents:
diff changeset
19 #include "surfmode.inc"
heinrichsweikamp
parents:
diff changeset
20 #include "divemode.inc"
heinrichsweikamp
parents:
diff changeset
21 #include "tft_outputs.inc"
heinrichsweikamp
parents:
diff changeset
22 #include "eeprom_rs232.inc"
62
e7c7c7eeea58 show battery voltage in info menu
heinrichsweikamp
parents: 50
diff changeset
23 #include "adc_lightsensor.inc"
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
24 #include "i2c.inc"
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 619
diff changeset
25 #include "rtc.inc"
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 619
diff changeset
26 #include "wait.inc"
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
27 #include "colorschemes.inc"
229
e1e5876bd777 minor cleanup
mh@mh-THINK
parents: 189
diff changeset
28
0
heinrichsweikamp
parents:
diff changeset
29
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
30 ; NOTE: needs to be identical in .inc and .asm !
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
31 ;
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 619
diff changeset
32 #define MENU_LINES_MAX .7 ; maximum number of lines per screen
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
33 #define MENU_LEFT .20 ; position of first menu item
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
34 #define MENU_HEIGHT_SURF .27 ; spacing between menu item in surface mode (pixel)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
35 #define MENU_HEIGHT_DIVE .24 ; spacing between menu item in surface mode (pixel)
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
36 #define MENU_VCENTER .125 ; position on screen
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
37 #define MAX_LINE_LENGTH_TITLE .17 ; max menu title length (characters)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
38 #define MAX_LINE_LENGTH_SURF .20 ; max menu item length in surface menu (characters)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
39 #define MAX_LINE_LENGTH_DIVE .10 ; max menu item length in dive mode menu (characters)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
40 #define MENU_ITEM_DATA_SIZE .4 ; size of a menu item data block
0
heinrichsweikamp
parents:
diff changeset
41
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
42 ; Alias for easier code reading
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
43 #define option_addr item_funct_addr
0
heinrichsweikamp
parents:
diff changeset
44
heinrichsweikamp
parents:
diff changeset
45
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
46 extern option_adjust_group_member
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
47 extern option_inc
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
48 extern option_dec
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
49 extern option_draw
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 619
diff changeset
50
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
51 extern rtc_set_rtc
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
52 extern divemode_option_divemenu_return
0
heinrichsweikamp
parents:
diff changeset
53
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
54
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
55 ;=============================================================================
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
56 menu_proc CODE
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
57 ;=============================================================================
0
heinrichsweikamp
parents:
diff changeset
58
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
59
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
60 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
61 ; Entry Point for Menu Processor, called by MENU_BEGIN Macros
0
heinrichsweikamp
parents:
diff changeset
62 ;
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
63 global menu_processor
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
64 menu_processor:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
65 ; read menu header
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
66 VARARGS_BEGIN ; load TBLPTR with start address of the menu header data
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
67 clrf STKPTR ; never return from here
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
68
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
69 VARARGS_GET8 menu_item_count ; get number of items
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
70 VARARGS_GET8 menu_vertical_start ; get vertical start position of 1st menu item
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
71
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
72 movf menu_vertical_start,W ; excite flags, vertical start = 0, i.e. no menu title text?
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
73 bz menu_processor_no_title ; YES - skip reading menu title text address
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
74
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
75 VARARGS_GET16 menu_title_addr ; get address of menu title text
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
76
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
77 menu_processor_no_title:
0
heinrichsweikamp
parents:
diff changeset
78
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
79 movff TBLPTRL, menu_item_data_start+0 ; store base address of menu items for menu_read_menu_item_data
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
80 movff TBLPTRH, menu_item_data_start+1 ; ...
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
81 movff TBLPTRU, menu_item_data_start+2 ; ...
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
82
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
83 btfss divemode ; in dive mode?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
84 bra menu_processor_menu_title ; NO - no frame in surface mode menu
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
85
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
86 ; required for menus with less entries than the calling menu but not so nice when setting up gas 6.... mH
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
87 movlw .1 ; menu_pos_cur = 1 ?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
88 cpfsgt menu_pos_cur ; ...
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
89 call TFT_clear_divemode_menu ; YES - clear the menu
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
90
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
91 ; draw a frame around the dive mode menu
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
92 movf pallet_color_mask,W ; get mask color into WREG
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
93 WIN_FRAME_COLOR dm_menu_row, dm_menu_lower, dm_menu_left ,dm_menu_right ; top, bottom, left, right
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
94 bra menu_processor_menu_body ; the dive mode menu has no menu title and footer
0
heinrichsweikamp
parents:
diff changeset
95
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
96 menu_processor_menu_title:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
97 ; prepare screen
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
98 btfsc screen_type3 ; screen type 3 ?
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
99 bra menu_processor_menu_title1 ; YES - screen type 3 has no backlight
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
100 clrf CCP1CON ; stop PWM
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
101 bcf PORTC,2 ; fade out backlight
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
102 menu_processor_menu_title1:
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
103 call TFT_ClearScreen ; clear screen
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
104
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
105 ; draw menu title
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
106 WIN_BOX_BLACK .2,.23,.0,.159 ; clear menu title area
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
107 WIN_STD .0, .2 ; set menu title font and position
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
108 FONT_COLOR color_greenish ; set menu title font color
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
109 movff menu_title_addr+0,FSR1L ; point to multi-lingual menu title text
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
110 movff menu_title_addr+1,FSR1H ; ...
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
111 call strcpy_text_FSR ; copy translated text into the buffer
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
112 movf FSR2L,W ; get title text length
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
113 mullw .9 ; compute title length in pixels_x2
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
114 bcf STATUS,C ; divide by 2
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
115 rrcf PRODL ; ...
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
116 movf PRODL,W ; get result into WREG
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
117 sublw .80 ; compute 80 (screen center position) - half title width in pixel_x2
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
118 movwf win_leftx2 ; set result as horizontal start position
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
119 movlw MAX_LINE_LENGTH_TITLE ; load max allowed length of a menu title
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
120 movwf FSR2L ; set buffer pointer to end of max length
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
121 clrf INDF2 ; terminate string at max length
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
122 PRINT ; output menu title
0
heinrichsweikamp
parents:
diff changeset
123
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
124 ; draw footer line
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
125 FONT_COLOR_MEMO ; select default color
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
126 WIN_TINY .5, .224 ; tiny font, left position
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
127 STRCPY_TEXT_PRINT tNext ; print "Next"
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
128 WIN_TINY .124, .224 ; tiny font, righ position
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
129 STRCPY_TEXT_PRINT tEnter ; print "Enter"
0
heinrichsweikamp
parents:
diff changeset
130
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
131 menu_processor_menu_body:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
132 FONT_SIZE FT_SMALL ; select font size
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
133 bra menu_vertical ; draw the menu items
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
134
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
135
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
136 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
137 ; Helper Function - call Callback-Function to draw the Menu Item Title
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
138 ;
0
heinrichsweikamp
parents:
diff changeset
139 menu_processor_call_title:
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
140 movff menu_title_addr+2,PCLATU ; execute computed goto
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
141 movff menu_title_addr+1,PCLATH ; ...
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
142 movf menu_title_addr+0,W ; ...
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
143 movwf PCL ; ...
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 560
diff changeset
144
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
145
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
146 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
147 ; Clear all memorized Menu Item Selections and restart with Cursor on first Item
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
148 ;
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 560
diff changeset
149 global menu_processor_reset
0
heinrichsweikamp
parents:
diff changeset
150 menu_processor_reset:
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
151 clrf menustack ; clear first stack position
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
152 clrf menustack_pointer ; set stack pointer to first stack position
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
153 clrf selected_item ; set cursor position to first menu item
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
154 return ; done
0
heinrichsweikamp
parents:
diff changeset
155
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 560
diff changeset
156
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
157 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
158 ; Pull / Double-Pull Cursor Position from Stack
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
159 ;
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 560
diff changeset
160 global menu_processor_double_pop
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 619
diff changeset
161 global menu_processor_pop
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 560
diff changeset
162 menu_processor_double_pop:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 619
diff changeset
163 decf menustack_pointer,F ; decrement stack pointer
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 619
diff changeset
164 menu_processor_pop:
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 619
diff changeset
165 decf menustack_pointer,F ; decrement stack pointer
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 619
diff changeset
166 btfsc menustack_pointer,7 ; did the stack pointer under-run?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 619
diff changeset
167 clrf menustack_pointer ; YES - reset stack pointer to first stack position
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 619
diff changeset
168 movf menustack_pointer,W ; load stack pointer into WREG
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 619
diff changeset
169 lfsr FSR2,menustack ; load base address of menu stack
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
170 movff PLUSW2,selected_item ; retrieve cursor position from stack
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 619
diff changeset
171 return ; done
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 619
diff changeset
172
0
heinrichsweikamp
parents:
diff changeset
173
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
174 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
175 ; Push Cursor Position onto Stack
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
176 ;
0
heinrichsweikamp
parents:
diff changeset
177 menu_processor_push:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 619
diff changeset
178 lfsr FSR2,menustack ; load base address of menu stack
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 619
diff changeset
179 movf menustack_pointer,W ; load stack pointer into WREG
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
180 movff selected_item,PLUSW2 ; save cursor position to stack
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 619
diff changeset
181 incf menustack_pointer,W ; increment stack pointer, park result in WREG
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 619
diff changeset
182 btfss WREG,3 ; result < 8 ?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 619
diff changeset
183 movwf menustack_pointer ; YES - update stack pointer
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
184 clrf selected_item ; set cursor to first item in new menu
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 619
diff changeset
185 return ; done
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 619
diff changeset
186
0
heinrichsweikamp
parents:
diff changeset
187
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
188 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
189 ; Helper Function - call Menu Item Function
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
190 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
191 menu_call_item_function:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
192 bcf switch_right ; clear button event
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
193 movf selected_item,W ; copy current cursor position to WREG
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
194 rcall menu_read_menu_item_data ; read item function address
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
195 movff selected_item,PRODL ; pass cursor position (menu item number) to call function
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
196 rcall menu_processor_push ; push current cursor position onto stack
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
197 clrf PCLATU ; execute computed goto
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
198 movff item_funct_addr+1,PCLATH ; ...
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
199 movf item_funct_addr+0,W ; ...
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
200 movwf PCL ; ...
0
heinrichsweikamp
parents:
diff changeset
201
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
202
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
203 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
204 ; Read Menu Item Data
0
heinrichsweikamp
parents:
diff changeset
205 ;
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
206 menu_read_menu_item_data:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
207 cpfsgt menu_item_count ; selected menu item valid? || * Safety Check * to prevent any computed
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
208 clrf WREG ; NO - change selection to first item || goto to an illegal random target address
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
209
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
210 mullw MENU_ITEM_DATA_SIZE ; compute menu item data offset
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
211 movf PRODL,W ; add offset to base address of menu data block and set up TBLPTR
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
212 addwf menu_item_data_start+0,W ; ...
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
213 movwf TBLPTRL ; ...
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
214 movf PRODH,W ; ...
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
215 addwfc menu_item_data_start+1,W ; ...
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
216 movwf TBLPTRH ; ...
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
217 movlw 0 ; ...
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
218 addwfc menu_item_data_start+2,W ; ...
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
219 movwf TBLPTRU ; ...
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
220
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
221 VARARGS_GET16 item_title_addr ; read address of item title function or title text | with embedded
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
222 VARARGS_GET16 item_funct_addr ; read address of item call function or option definition data | menu item type
0
heinrichsweikamp
parents:
diff changeset
223
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
224 movlw .2 ; probe for menu item type = OPTION
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
225 btfsc item_funct_addr,0 ; is type OPTION?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
226 bra menu_read_menu_item_data_1 ; YES
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
227
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
228 movlw .1 ; probe for menu item type = MENU_CALL
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
229 btfsc item_title_addr,0 ; is type MENU_CALL?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
230 bra menu_read_menu_item_data_1 ; YES
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
231
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
232 movlw .0 ; must be MENU_DYNAMIC
0
heinrichsweikamp
parents:
diff changeset
233
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
234 menu_read_menu_item_data_1:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
235 movwf item_type ; store menu item type
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
236 bcf item_title_addr+0,0 ; strip menu item type encoding from addresses (reset to even addresses)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
237 bcf item_funct_addr+0,0 ; ...
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
238
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
239 return ; done
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
240
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
241
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
242 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
243 ; Menu HMI Operation
0
heinrichsweikamp
parents:
diff changeset
244 ;
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 560
diff changeset
245 global menu_vertical
0
heinrichsweikamp
parents:
diff changeset
246 menu_vertical:
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
247 rcall menu_draw_menu_items ; draw all menu items
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
248 movlw CCP1CON_VALUE ; load PWM setting
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 619
diff changeset
249 btfss divemode ; in dive mode?
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
250 movwf CCP1CON ; NO - power-on backlight
0
heinrichsweikamp
parents:
diff changeset
251
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
252 menu_vertical_loop:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
253 movf selected_item,W ; get cursor position into WREG
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
254 rcall menu_read_menu_item_data ; read menu item data
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
255 movf item_funct_addr+0,W ; check if execute function call address is NULL
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
256 iorwf item_funct_addr+1,W ; ...
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
257 bz next_line_menu ; YES - not selectable, step cursor to next menu item
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
258 btfsc divemode ; NO - in dive mode?
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
259 bra menu_line_loop_pre1 ; YES - skip next
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
260 rcall menu_draw_cursor_surf ; NO - draw the cursor (main menu style)
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
261 btfss imprint_time_date ; - currently imprinting the current time & date?
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
262 bra menu_line_loop_pre1 ; NO - skip
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
263 btfss switch_right ; YES - right button pressed, i.e. time or date changed?
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
264 bra menu_line_loop_pre1 ; NO - skip
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
265 call TFT_imprint_time_date_fast ; YES - show a fast response on the screen (may momentarily show an illegal day/month combination)
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
266 call rtc_set_rtc ; - update time and date on RTC module (corrects illegal day/month combinations)
0
heinrichsweikamp
parents:
diff changeset
267
heinrichsweikamp
parents:
diff changeset
268 menu_line_loop_pre1:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 619
diff changeset
269 bcf switch_right ; clear left-over right button event
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 619
diff changeset
270 bcf switch_left ; clear left-over left button event
0
heinrichsweikamp
parents:
diff changeset
271
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
272 menu_line_loop_pre2:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 619
diff changeset
273 btfsc divemode ; in dive mode?
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 623
diff changeset
274 goto divemode_option_divemenu_return ; YES - return to it
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
275 call reset_timeout_surfmode ; NO - reset timeout
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
276 ;bra menu_line_loop ; - operate menu HMI
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
277
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 619
diff changeset
278 menu_line_loop:
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
279 call housekeeping ; handle data imprinting, screen dump request, timeout and entering dive mode
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
280 btfsc switch_right ; right button pressed?
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
281 bra do_line_menu ; YES - execute menu item function
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
282 btfss switch_left ; NO - left button pressed?
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
283 bra menu_line_loop ; NO - loop
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
284 next_line_menu: ; YES - step cursor to next menu item
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
285 bcf switch_left ; - clear button event
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
286 incf selected_item,F ; - increment cursor position to next item
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
287 movf selected_item,W ; - copy new item number to WREG
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
288 cpfseq menu_item_count ; - new item number beyond number of menu items?
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
289 bra menu_vertical_loop ; NO - redraw cursor
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
290 clrf selected_item ; YES - reset cursor position to first item
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
291 bra menu_vertical_loop ; - redraw cursor
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
292
0
heinrichsweikamp
parents:
diff changeset
293
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
294 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
295 ; Execute Menu Item Function
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
296 ;
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 560
diff changeset
297 global do_line_menu
0
heinrichsweikamp
parents:
diff changeset
298 do_line_menu:
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
299 decf menu_pos_cur,W ; get selected menu item (0-5) into WREG
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 619
diff changeset
300 btfsc divemode ; in dive mode?
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
301 movwf selected_item ; YES - take selected menu item from dive mode
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
302 movf selected_item,W ; copy selected menu item to WREG
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
303 rcall menu_read_menu_item_data ; read menu item data
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
304 movf item_type,W ; switch on menu item type
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
305 bz menu_do_line_call ; -> 0: call (with dynamic title)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
306 dcfsnz WREG ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
307 bra menu_do_line_call ; -> 1: call (with fixed title)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
308 dcfsnz WREG ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
309 bra menu_do_line_option ; -> 2: option
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
310 bra menu_line_loop_pre2 ; else do nothing
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
311
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
312 menu_do_line_call:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
313 rcall menu_call_item_function ; push current cursor position onto stack and call menu item function
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
314 rcall menu_processor_pop ; get back cursor position
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
315 bra menu_vertical ; re-draw the menu
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
316
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
317 menu_do_line_option:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
318 movff option_addr+0,FSR0L ; get address of option definition data
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
319 movff option_addr+1,FSR0H ; ...
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
320 btfsc option_addr+1,4 ; shall stop at max value?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
321 bsf option_stop_at_max ; YES - set flag
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
322 btfsc option_addr+1,6 ; is the selected option an option group member?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
323 call option_adjust_group_member ; YES - adjust address to selected group member
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
324 btfss option_addr+1,5 ; shall increment?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
325 call option_inc ; YES - increment option value
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
326 btfsc option_addr+1,5 ; shall decrement?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
327 call option_dec ; YES - decrement option value
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
328 bcf option_stop_at_max ; revert to default (= wrap-around after max value)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
329 bra menu_vertical ; re-draw the menu
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
330
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
331
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
332 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
333 ; Draw all Menu Items
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
334 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
335 menu_draw_menu_items:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
336 btfss divemode ; in dive mode?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
337 bra menu_draw_lines_surfmode ; NO
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
338 ;bra menu_draw_lines_divemode ; YES
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
339
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
340 global menu_draw_lines_divemode
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
341 menu_draw_lines_divemode:
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
342 movff menu_item_count,menu_pos_max ; copy number of item in menu block to menu_pos_max (used by divemode instead of menu_item_count for no reason)
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
343
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
344 IFDEF _big_divemenu
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
345
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
346 btfss alt_layout_active ; big menu selected?
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
347 bra menu_draw_lines_divemode_small ; NO
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
348 ;bra menu_draw_lines_divemode_big ; YES
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
349
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
350 menu_draw_lines_divemode_big:
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
351 WIN_STD dm_menu_item1_column+.16,dm_menu_item1_row+.22
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
352 decf menu_pos_cur,W ; get selected item as 0..5 into WREG
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
353 movwf menu_item_start ; set first item to draw = selected item
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
354 bra menu_draw_menu_items_common ; continue with common part
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
355
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
356 ENDIF ; _big_divemenu
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
357
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
358 menu_draw_lines_divemode_small:
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
359 WIN_SMALL dm_menu_item1_column,dm_menu_item1_row
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
360 clrf menu_item_start ; set first item in menu block as first item to draw
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
361 bra menu_draw_menu_items_common ; continue with common part
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
362
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
363 menu_draw_lines_surfmode:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
364 WIN_SMALL MENU_LEFT, 0 ; initialize start position and font
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
365 movff menu_vertical_start,win_top ; set vertical output position
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
366 clrf menu_item_start ; set first item in menu block as first item to draw
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
367
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
368 IFDEF scrolling_menu_enabled
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
369 ; does the menu have more than 7 item ?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
370 movf menu_item_count,W ; get number of menu items
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
371 addlw -(MENU_LINES_MAX+1) ; more than 7 item?
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
372 bn menu_draw_menu_items_common ; NO - continue with common part
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
373 movf selected_item,W ; YES - compute first item to be drawn as current cursor position - 6
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
374 addlw -(MENU_LINES_MAX-1) ; - ...
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
375 btfsc STATUS,N ; - is this < 0 ?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
376 clrf WREG ; YES - revert to starting from first item
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
377 movwf menu_item_start ; - set first item to be drawn
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
378 ENDIF ; scrolling_menu_enabled
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
379
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
380 menu_draw_menu_items_common:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
381 movff menu_item_start,menu_item_curr ; initialize menu item counter
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
382
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
383 menu_draw_menu_items_loop:
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
384 FONT_COLOR_MEMO ; set default font color (may had been changed by a dynamic title)
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
385 REINIT_BUFFER ; initialize output buffer again
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
386 movf menu_item_curr,W ; get menu item to draw
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
387 rcall menu_read_menu_item_data ; read menu item data
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
388 movf item_type,W ; switch on menu item type:
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
389 bz menu_draw_menu_item_dynamic ; -> 0: call with dynamic title
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
390 dcfsnz WREG ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
391 bra menu_draw_menu_item_call ; -> 1: call with fixed title
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
392 dcfsnz WREG ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
393 bra menu_draw_menu_item_option ; -> 2: option increment
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
394 bra menu_draw_menu_item_print ; no output in case of illegal type
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
395
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
396 menu_draw_menu_item_dynamic:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
397 movf item_title_addr+0,W ; check if call address is NULL
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
398 iorwf item_title_addr+1,W ; ...
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
399 btfsc STATUS,Z ; is null?
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
400 bra menu_draw_menu_item_after_print ; YES - no printing on this menu line
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
401 movff menu_item_curr,PRODL ; NO - pass menu item position to call function
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
402 rcall menu_text_call ; - call dynamic title function
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
403 bra menu_draw_menu_item_print ; - print menu item
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
404
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
405 menu_draw_menu_item_call:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
406 movff item_title_addr+0,FSR1L ; point to multi-lingual text
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
407 movff item_title_addr+1,FSR1H ; ...
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
408 call strcat_text_FSR ; copy translated text to buffer
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
409 bra menu_draw_menu_item_print ; print menu item
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
410
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
411 menu_draw_menu_item_option:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
412 movff item_title_addr+0,FSR1L ; point to multi-lingual text
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
413 movff item_title_addr+1,FSR1H ; ...
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
414 call strcat_text_FSR ; copy translated text to buffer
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
415 movff option_addr+0,FSR0L ; hand over address of option definition data
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
416 movff option_addr+1,FSR0H ; ...
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
417 btfsc option_addr+1,6 ; is the selected option an option group member?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
418 call option_adjust_group_member ; YES - adjust address to selected group member
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
419 btfss block_option_value ; displaying of option value suspended?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
420 call option_draw ; NO - draw option value
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
421 ;bra menu_draw_menu_item_print ; print menu item
0
heinrichsweikamp
parents:
diff changeset
422
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
423 menu_draw_menu_item_print:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
424 movlw MAX_LINE_LENGTH_SURF ; load maximum length for a surface menu item
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
425 btfsc divemode ; in dive mode?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
426 movlw MAX_LINE_LENGTH_DIVE ; YES - replace with maximum length for a dive mode menu item
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
427 call TFT_buffer_trim_length ; fill up or cut buffer to max length
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
428 PRINT ; print menu item to screen
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
429 ;bra menu_draw_menu_item_after_print ; continue with after-print actions
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
430
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
431 menu_draw_menu_item_after_print:
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
432 btfss divemode ; in dive mode?
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
433 bra menu_draw_menu_item_common ; NO
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
434 ;bra menu_draw_menu_item_divemode ; YES
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
435
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
436 menu_draw_menu_item_divemode:
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
437 IFDEF _big_divemenu
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
438 btfsc alt_layout_active ; big menu selected?
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
439 return ; YES - done
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
440 ENDIF
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
441
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
442 movlw .2 ; load a 2
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
443 cpfseq menu_item_curr ; just done menu item 2 (last item in left column) ?
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
444 bra menu_draw_menu_item_common ; NO - continue with common part
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
445 movlw dm_menu_item4_row ; YES - set vertical position for 2nd column
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
446 movff WREG,win_top ; - ...
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
447 movlw dm_menu_item4_column ; - set horizontal position for 2nd column
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
448 movff WREG,win_leftx2 ; - ...
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
449 bra menu_draw_menu_item_common_1 ; - continue in common part
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
450
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
451 menu_draw_menu_item_common:
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
452 movlw MENU_HEIGHT_SURF ; get menu items vertical spacing for surface mode
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
453 btfsc divemode ; in dive mode?
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
454 movlw MENU_HEIGHT_DIVE ; YES - replace with vertical spacing for dive mode
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
455 addwf win_top,F ; adjust vertical output position
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
456
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
457 menu_draw_menu_item_common_1:
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
458 incf menu_item_curr,F ; increment menu item number
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
459
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
460 IFDEF scrolling_menu_enabled
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
461 btfsc divemode ; in dive mode?
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
462 bra menu_draw_menu_item_common_2 ; YES - skip
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
463 movf menu_item_start,W ; NO - get the number of the menu item that menu drawing started with
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
464 subwf menu_item_curr,W ; - compute how many item have been drawn already
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
465 xorlw MENU_LINES_MAX ; - compare with how max item fit the screen
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
466 btfsc STATUS,Z ; - screen full?
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
467 return ; - YES - done
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
468 ;bra menu_draw_menu_item_common_2 ; NO - continue
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
469 ENDIF ; scrolling_menu_enabled
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
470
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
471 menu_draw_menu_item_common_2:
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
472 movf menu_item_curr,W ; get current menu item
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
473 xorwf menu_item_count,W ; compare with total number of menu items, more item to do?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
474 bnz menu_draw_menu_items_loop ; YES - loop
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
475 return ; NO - done
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
476
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
477
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
478 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
479 ; Helper Function - call Function for dynamic Title
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
480 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
481 menu_text_call:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
482 clrf PCLATU ; execute a computed goto
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
483 movff item_title_addr+1,PCLATH ; ...
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
484 movf item_title_addr+0,W ; ...
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
485 movwf PCL ; ...
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
486
0
heinrichsweikamp
parents:
diff changeset
487
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
488 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
489 ; Draw the Cursor (Main Menu Style)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
490 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
491 menu_draw_cursor_surf:
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
492 WIN_LEFT MENU_LEFT-8 ; set horizontal start of cursor column
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
493 WIN_WIDTH .6 ; set width of cursor column
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
494 WIN_HEIGHT .223 ; set preliminary hight of cursor column
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
495
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
496 movf menu_vertical_start,W ; get vertical start of menu items
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
497 movwf win_top ; set vertical start of cursor column
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
498 subwf win_height,F ; final hight = prelim.height - vertical start
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
499
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
500 clrf WREG ; set color to black
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
501 BOX_COLOR ; clear cursor area
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
502
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
503 FONT_SIZE FT_SMALL ; set font size
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
504
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
505 movf menu_item_start,W ; get number of menu item that is on the first line
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
506 subwf selected_item,W ; compute line number of current menu item
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
507
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
508 mullw MENU_HEIGHT_SURF ; multiply line number with vertical menu items spacing
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
509 movf PRODL,W ; get computed vertical offset
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
510 addwf menu_vertical_start,W ; add offset to vertical start position
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
511 movwf win_top ; set final vertical position
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
512 bra menu_draw_cursor_common ; print cursor
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
513
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
514
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
515 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
516 ; Draw the Cursor (Dive Mode Style)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
517 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
518 global menu_draw_cursor_dive
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
519 menu_draw_cursor_dive:
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
520 IFDEF _big_divemenu
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
521 btfss alt_layout_active ; big menu selected?
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
522 bra menu_draw_cursor_dive_small ; NO
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
523 ;bra menu_draw_cursor_dive_big ; YES
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
524
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
525 menu_draw_cursor_dive_big:
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
526 WIN_STD dm_menu_item1_column,dm_menu_item1_row+.20
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
527 bra menu_draw_cursor_common ; print cursor
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
528 ENDIF ; _big_divemenu
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
529
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
530 menu_draw_cursor_dive_small:
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
531 ; clear cursor areas
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
532 WIN_BOX_BLACK dm_menu_row+.1, dm_menu_lower-.1, dm_menu_item1_column-.8, dm_menu_item1_column-.1
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
533 WIN_BOX_BLACK dm_menu_row+.1, dm_menu_lower-.1, dm_menu_item4_column-.8, dm_menu_item4_column-.1
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
534
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
535 FONT_SIZE FT_SMALL ; set font size
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
536
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
537 movlw dm_menu_item1_column-.8 ; load position of left column
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
538 btfsc menu_pos_cur,2 ; cursor at menu item 4..6 ?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
539 movlw dm_menu_item4_column-.8 ; YES - replace with position of right column
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
540 movwf win_leftx2 ; set horizontal position
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
541
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
542 decf menu_pos_cur,W ; get cursor position as 0..5 into WREG
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
543 btfsc menu_pos_cur,2 ; cursor at menu item 4..6 ?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
544 addlw -.3 ; YES - subtract 3 to get line number in right column
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
545
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
546 mullw MENU_HEIGHT_DIVE ; multiply line number (0..2) with vertical menu items spacing
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
547 movf PRODL,W ; get computed vertical offset
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
548 addlw dm_menu_item1_row ; add offset to vertical start position
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
549 movwf win_top ; set final vertical position
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
550 ;bra menu_draw_cursor_common ; print cursor
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
551
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
552
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
553 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
554 ; Helper Function - common Part of drawing the Cursor
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
555 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
556 menu_draw_cursor_common:
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
557 FONT_COLOR_MEMO ; set font color (may have changed in-between)
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
558 STRCPY_PRINT "\xb7" ; print cursor
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
559 return ; done
0
heinrichsweikamp
parents:
diff changeset
560
heinrichsweikamp
parents:
diff changeset
561 ;-----------------------------------------------------------------------------
heinrichsweikamp
parents:
diff changeset
562
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
563 END