Rev 6359 | Rev 6371 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6359 | Rev 6362 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | KMENUITEM_NORMAL equ 0 |
1 | KMENUITEM_NORMAL equ 0 |
2 | KMENUITEM_SUBMENU equ 1 |
2 | KMENUITEM_SUBMENU equ 1 |
3 | KMENUITEM_SEPARATOR equ 2 |
3 | KMENUITEM_SEPARATOR equ 2 |
Line -... | Line 4... | ||
- | 4 | ||
- | 5 | macro menu_set code, m_group, m_number |
|
- | 6 | { |
|
- | 7 | local no_set |
|
- | 8 | ||
- | 9 | cmp eax, code |
|
- | 10 | jne no_set |
|
- | 11 | mov [number_panel], m_group |
|
- | 12 | mov [number_menu], m_number |
|
- | 13 | jmp TakeInstruments |
|
- | 14 | no_set: |
|
- | 15 | } |
|
4 | 16 | ||
5 | init_main_menu: |
17 | init_main_menu: |
Line 6... | Line 18... | ||
6 | stdcall [kmenu_init], syscolors |
18 | stdcall [kmenu_init], syscolors |
7 | 19 | ||
Line 56... | Line 68... | ||
56 | stdcall [ksubmenu_add], [main_menu], eax |
68 | stdcall [ksubmenu_add], [main_menu], eax |
Line 57... | Line 69... | ||
57 | 69 | ||
58 | ; init 'Edit' menu |
70 | ; init 'Edit' menu |
59 | stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_main_menu_Instr_Pencil, 0x51 |
71 | stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_main_menu_Instr_Pencil, 0x51 |
- | 72 | stdcall [ksubmenu_add], [main_menu_instr], eax |
|
- | 73 | stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_main_menu_Instr_Brush, 0x52 |
|
- | 74 | stdcall [ksubmenu_add], [main_menu_instr], eax |
|
- | 75 | stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_main_menu_Instr_Spray, 0x53 |
|
- | 76 | stdcall [ksubmenu_add], [main_menu_instr], eax |
|
- | 77 | stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_main_menu_Instr_Lastik, 0x54 |
|
- | 78 | stdcall [ksubmenu_add], [main_menu_instr], eax |
|
- | 79 | stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_main_menu_Instr_Flood_fill, 0x55 |
|
- | 80 | stdcall [ksubmenu_add], [main_menu_instr], eax |
|
- | 81 | stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_main_menu_Instr_Pipetka, 0x56 |
|
- | 82 | stdcall [ksubmenu_add], [main_menu_instr], eax |
|
- | 83 | stdcall [kmenuitem_new], KMENUITEM_SEPARATOR, 0, 0 |
|
- | 84 | stdcall [ksubmenu_add], [main_menu_instr], eax |
|
- | 85 | stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_main_menu_Instr_Line, 0x57 |
|
- | 86 | stdcall [ksubmenu_add], [main_menu_instr], eax |
|
- | 87 | stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_main_menu_Instr_Rectangle, 0x58 |
|
- | 88 | stdcall [ksubmenu_add], [main_menu_instr], eax |
|
- | 89 | stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_main_menu_Instr_Circle, 0x59 |
|
- | 90 | stdcall [ksubmenu_add], [main_menu_instr], eax |
|
- | 91 | stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_main_menu_Instr_Ellips, 0x5a |
|
- | 92 | stdcall [ksubmenu_add], [main_menu_instr], eax |
|
- | 93 | stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_main_menu_Instr_Hard_contour, 0x5b |
|
Line 60... | Line 94... | ||
60 | stdcall [ksubmenu_add], [main_menu_instr], eax |
94 | stdcall [ksubmenu_add], [main_menu_instr], eax |
61 | 95 | ||
62 | ; add 'Instruments' menu to main |
96 | ; add 'Instruments' menu to main |
Line 68... | Line 102... | ||
68 | put_main_menu: |
102 | put_main_menu: |
69 | stdcall [kmainmenu_draw], [main_menu] |
103 | stdcall [kmainmenu_draw], [main_menu] |
70 | ret |
104 | ret |
Line 71... | Line 105... | ||
71 | 105 | ||
72 | button_handler_main_menu: |
106 | button_handler_main_menu: |
73 | cmp eax, 0x71 |
- | |
74 | jne @f |
107 | menu_set 0x71, 7,1 |
75 | mov [number_panel], 7 |
108 | menu_set 0x72, 7,2 |
76 | mov [number_menu], 1 |
- | |
77 | jmp TakeInstruments |
- | |
78 | @@: |
109 | menu_set 0x73, 7,3 |
79 | cmp eax, 0x72 |
- | |
80 | jne @f |
110 | menu_set 0x74, 7,4 |
81 | mov [number_panel], 7 |
111 | menu_set 0x75, 7,5 |
82 | mov [number_menu], 2 |
- | |
83 | jmp TakeInstruments |
- | |
84 | @@: |
- | |
85 | cmp eax, 0x73 |
- | |
86 | jne @f |
112 | menu_set 0x61, 6,1 |
87 | mov [number_panel], 7 |
113 | menu_set 0x62, 6,2 |
88 | mov [number_menu], 3 |
- | |
89 | jmp TakeInstruments |
- | |
90 | @@: |
- | |
91 | cmp eax, 0x74 |
- | |
92 | jne @f |
- | |
93 | mov [number_panel], 7 |
114 | menu_set 0x63, 6,3 |
94 | mov [number_menu], 4 |
- | |
95 | jmp TakeInstruments |
- | |
96 | @@: |
- | |
97 | cmp eax, 0x75 |
- | |
98 | jne @f |
- | |
99 | mov [number_panel], 7 |
115 | menu_set 0x64, 6,4 |
100 | mov [number_menu], 5 |
- | |
101 | jmp TakeInstruments |
- | |
102 | @@: |
- | |
103 | cmp eax, 0x61 |
- | |
104 | jne @f |
116 | menu_set 0x65, 6,5 |
105 | mov [number_panel], 6 |
117 | menu_set 0x66, 6,6 |
106 | mov [number_menu], 1 |
- | |
107 | jmp TakeInstruments |
- | |
108 | @@: |
- | |
109 | cmp eax, 0x62 |
- | |
110 | jne @f |
- | |
111 | mov [number_panel], 6 |
118 | menu_set 0x51, 5,1 |
112 | mov [number_menu], 2 |
- | |
113 | jmp TakeInstruments |
- | |
114 | @@: |
- | |
115 | cmp eax, 0x63 |
- | |
116 | jne @f |
- | |
117 | mov [number_panel], 6 |
119 | menu_set 0x52, 5,2 |
118 | mov [number_menu], 3 |
- | |
119 | jmp TakeInstruments |
- | |
120 | @@: |
- | |
121 | cmp eax, 0x64 |
- | |
122 | jne @f |
- | |
123 | mov [number_panel], 6 |
120 | menu_set 0x53, 5,3 |
124 | mov [number_menu], 4 |
- | |
125 | jmp TakeInstruments |
- | |
126 | @@: |
- | |
127 | cmp eax, 0x65 |
- | |
128 | jne @f |
- | |
129 | mov [number_panel], 6 |
121 | menu_set 0x54, 5,4 |
130 | mov [number_menu], 5 |
- | |
131 | jmp TakeInstruments |
- | |
132 | @@: |
122 | menu_set 0x55, 5,5 |
133 | cmp eax, 0x66 |
- | |
134 | jne @f |
123 | menu_set 0x56, 5,6 |
135 | mov [number_panel], 6 |
124 | menu_set 0x57, 5,7 |
136 | mov [number_menu], 6 |
- | |
137 | jmp TakeInstruments |
- | |
138 | @@: |
125 | menu_set 0x58, 5,8 |
139 | cmp eax, 0x51 |
- | |
140 | jne @f |
126 | menu_set 0x59, 5,9 |
141 | mov [number_panel], 5 |
127 | menu_set 0x5a, 5,10 |
142 | mov [number_menu], 1 |
- | |
143 | jmp TakeInstruments |
- | |
144 | @@: |
128 | menu_set 0x5b, 5,11 |
145 | .end_handler: |
129 | .end_handler: |
Line 146... | Line 130... | ||
146 | ret |
130 | ret |
147 | 131 | ||
Line 165... | Line 149... | ||
165 | sz_main_menu_Edit_Cut db 'Cut', 0 |
149 | sz_main_menu_Edit_Cut db 'Cut', 0 |
166 | sz_main_menu_Edit_ClS db 'Clear screen', 0 |
150 | sz_main_menu_Edit_ClS db 'Clear screen', 0 |
Line 167... | Line 151... | ||
167 | 151 | ||
168 | sz_main_menu_Instr db 'Instruments', 0 |
152 | sz_main_menu_Instr db 'Instruments', 0 |
169 | sz_main_menu_Instr_Pencil db 'Pencil', 0 |
153 | sz_main_menu_Instr_Pencil db 'Pencil', 0 |
- | 154 | sz_main_menu_Instr_Brush db 'Brush', 0 |
|
- | 155 | sz_main_menu_Instr_Spray db 'Spray', 0 |
|
- | 156 | sz_main_menu_Instr_Lastik db 'Lastik', 0 |
|
- | 157 | sz_main_menu_Instr_Flood_fill db 'Flood fill', 0 |
|
- | 158 | sz_main_menu_Instr_Pipetka db 'Pipetka', 0 |
|
- | 159 | sz_main_menu_Instr_Line db 'Line', 0 |
|
- | 160 | sz_main_menu_Instr_Rectangle db 'Rectangle', 0 |
|
- | 161 | sz_main_menu_Instr_Circle db 'Circle', 0 |
|
- | 162 | sz_main_menu_Instr_Ellips db 'Ellips', 0 |
|
- | 163 | sz_main_menu_Instr_Hard_contour db 'Hard contour', 0 |
|
170 | 164 |