Subversion Repositories Kolibri OS

Rev

Rev 109 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 109 Rev 485
Line 16... Line 16...
16
               dd     0x10000                  ; memory for app
16
               dd     0x10000                  ; memory for app
17
               dd     0x10000                  ; esp
17
               dd     0x10000                  ; esp
18
               dd     0x0 , 0x0               ; I_Param , I_Icon
18
               dd     0x0 , 0x0               ; I_Param , I_Icon
Line 19... Line 19...
19
 
19
 
20
include 'lang.inc'
20
include 'lang.inc'
21
include 'macros.inc'
21
include '..\..\..\..\macros.inc'
Line 22... Line 22...
22
include 'dialogs1.inc'
22
include 'dialogs1.inc'
Line 23... Line 23...
23
 
23
 
Line -... Line 24...
-
 
24
menu_history dd 0x0
24
menu_history dd 0x0
25
 
Line 25... Line 26...
25
 
26
START:                          ; start of execution
Line 26... Line 27...
26
START:                          ; start of execution
27
 
27
 
28
red:
28
     call draw_window_main
-
 
Line 29... Line 29...
29
 
29
     call draw_window_main
30
still:                          ; wait here for event
30
 
31
 
31
still:                          ; wait here for event
32
    mov  eax,23
32
 
Line 50... Line 50...
50
 
50
 
51
    mov  eax,13
51
    mov  eax,13
52
    mov  ebx,220*65536+6*4
52
    mov  ebx,220*65536+6*4
53
    mov  ecx,70*65536+8
53
    mov  ecx,70*65536+8
54
    mov  edx,0xffffff
54
    mov  edx,0xffffff
Line 55... Line 55...
55
    int  0x40
55
    mcall
56
 
56
 
57
    mov  eax,4                  ; show menu selections
57
    mov  eax,4                  ; show menu selections
58
    mov  ebx,220*65536+70
58
    mov  ebx,220*65536+70
59
    mov  ecx,0x000000
59
    mov  ecx,0x000000
60
    mov  edx,menu_action
60
    mov  edx,menu_action
Line 61... Line 61...
61
    mov  esi,4
61
    mov  esi,4
Line 62... Line 62...
62
    int  0x40
62
    mcall
63
 
63
 
64
  nodisplay:
64
  nodisplay:
65
 
65
 
66
    cmp  word [menu_action],word 'AD' ; user requests close
66
    cmp  word [menu_action],word 'AD' ; user requests close
Line 67... Line 67...
67
    jne  no_menu_close
67
    jne  no_menu_close
Line 68... Line -...
68
    mov  eax,-1
-
 
69
    int  0x40
-
 
70
  no_menu_close:
-
 
71
 
-
 
72
    jmp  still
68
    mov  eax,-1
73
 
69
    mcall
74
  red:                          ; redraw
70
  no_menu_close:
75
    call draw_window_main
71
 
Line 76... Line 72...
76
    jmp  still
72
    jmp  still
77
 
73
 
78
  key:
74
  key:
Line 79... Line 75...
79
    mov  eax,2                  ; key in buffer
75
    mov  eax,2                  ; key in buffer
80
    int  0x40
76
    mcall
81
    jmp  still
77
    jmp  still
82
 
78
 
83
  button:                       ; button in buffer
79
  button:                       ; button in buffer
Line 84... Line 80...
84
    mov  eax,17
80
    mov  eax,17
85
    int  0x40
81
    mcall
86
 
82
 
Line 120... Line 116...
120
 
116
 
Line 121... Line 117...
121
draw_window_main:
117
draw_window_main:
122
 
118
 
123
    mov  eax,12                    ; function 12:tell os about windowdraw
119
    mov  eax,12                    ; function 12:tell os about windowdraw
Line 124... Line 120...
124
    mov  ebx,1                     ; 1, start of draw
120
    mov  ebx,1                     ; 1, start of draw
125
    int  0x40
121
    mcall
126
 
122
 
127
    mov  eax,0                     ; open window
123
    mov  eax,0                     ; open window
128
    mov  ebx,100*65536+300
124
    mov  ebx,100*65536+300
129
    mov  ecx,100*65536+120
125
    mov  ecx,100*65536+120
130
    mov  edx,0x02ffffff
126
    mov  edx,0x02ffffff
Line 131... Line 127...
131
    mov  esi,0x805080d0
127
    mov  esi,0x805080d0
Line 132... Line 128...
132
    mov  edi,0x005080d0
128
    mov  edi,0x005080d0
133
    int  0x40
129
    mcall
134
 
130
 
135
    call draw_menu                 ; DRAW MENU
131
    call draw_menu                 ; DRAW MENU
136
 
132
 
137
    mov  eax,4                     ; window label
133
    mov  eax,4                     ; window label
Line 138... Line 134...
138
    mov  ebx,8*65536+8
134
    mov  ebx,8*65536+8
139
    mov  ecx,0x10ddeeff
135
    mov  ecx,0x10ddeeff
140
    mov  edx,labelt
136
    mov  edx,labelt
141
    mov  esi,labellen-labelt
137
    mov  esi,labellen-labelt
142
    int  0x40
138
    mcall
143
 
139
 
Line 144... Line 140...
144
    mov  eax,8                     ; close button
140
    mov  eax,8                     ; close button
145
    mov  ebx,(300-17)*65536+10
141
    mov  ebx,(300-17)*65536+10
146
    mov  ecx,5*65536+10
142
    mov  ecx,5*65536+10
147
    mov  edx,1
143
    mov  edx,1
148
    mov  esi,0x4466bb
144
    mov  esi,0x4466bb
149
    int  0x40
145
    mcall
Line 150... Line 146...
150
 
146
 
151
    mov  eax,8                     ; button : OPEN ALERT BOX
147
    mov  eax,8                     ; button : OPEN ALERT BOX
152
    mov  ebx,25*65536+150
148
    mov  ebx,25*65536+150
153
    mov  ecx,61*65536+14
149
    mov  ecx,61*65536+14
154
    mov  edx,2
150
    mov  edx,2
155
    mov  esi,0x4466aa
151
    mov  esi,0x4466aa
Line 156... Line 152...
156
    int  0x40
152
    mcall
157
 
153
 
158
    mov  eax,8                     ; button : OPEN CHOOSE BOX
154
    mov  eax,8                     ; button : OPEN CHOOSE BOX
159
    mov  ebx,25*65536+150
155
    mov  ebx,25*65536+150
160
    mov  ecx,81*65536+14
156
    mov  ecx,81*65536+14
161
    mov  edx,3
157
    mov  edx,3
162
    mov  esi,0x4466aa
158
    mov  esi,0x4466aa
163
    int  0x40
159
    mcall
164
 
160
 
165
    mov  ebx,20*65536+55           ; draw info text with function 4
161
    mov  ebx,20*65536+55           ; draw info text with function 4
166
    mov  ecx,0xffffff
162
    mov  ecx,0xffffff
Line 167... Line 163...
167
    mov  edx,text
163
    mov  edx,text
168
    mov  esi,40
164
    mov  esi,40
169
  newline:
165
  newline:
Line 170... Line 166...
170
    mov  eax,4
166
    mov  eax,4
Line 171... Line 167...
171
    int  0x40
167
    mcall