Subversion Repositories Kolibri OS

Rev

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

Rev 5771 Rev 7017
Line 10... Line 10...
10
;;          GNU GENERAL PUBLIC LICENSE                             ;;
10
;;          GNU GENERAL PUBLIC LICENSE                             ;;
11
;;             Version 2, June 1991                                ;;
11
;;             Version 2, June 1991                                ;;
12
;;                                                                 ;;
12
;;                                                                 ;;
13
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
13
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line -... Line 14...
-
 
14
 
-
 
15
BTN_H equ 22
-
 
16
TEXT_ECX equ 00010000b shl 24 + 0
14
 
17
 
15
draw_gui:
18
draw_gui:
16
        mcall   67, 160, 160, 330, 100          ; resize and move the window
19
        mcall   67, 160, 160, 330, 100          ; resize and move the window
17
        mcall   66, 1, 0                        ; switch keyboard to ascii mode
20
        mcall   66, 1, 0                        ; switch keyboard to ascii mode
18
  .first_time:
21
  .first_time:
Line 21... Line 24...
21
  .redraw:
24
  .redraw:
22
        mcall   12, 1                           ; start window draw
25
        mcall   12, 1                           ; start window draw
23
                                                ; DRAW WINDOW
26
                                                ; DRAW WINDOW
24
        xor     eax, eax                        ; function 0 _logon: define and draw window
27
        xor     eax, eax                        ; function 0 _logon: define and draw window
25
        mov     ebx, 160 shl 16 + 330           ; [x start]:[x size]
28
        mov     ebx, 160 shl 16 + 330           ; [x start]:[x size]
26
        mov     ecx, 160 shl 16 + 100           ; [y start]:[y size]
29
        mov     ecx, 160 shl 16 + 130           ; [y start]:[y size]
27
        mov     edx, 0x34DDDDDD                 ; color of work area RRGGBB
30
        mov     edx, 0x34DDDDDD                 ; color of work area RRGGBB
28
        mov     edi, name                       ; WINDOW LABEL
31
        mov     edi, name                       ; WINDOW LABEL
29
        mcall
32
        mcall
Line 30... Line 33...
30
 
33
 
31
        cmp     [status], STATUS_CONNECTING
34
        cmp     [status], STATUS_CONNECTING
Line 32... Line 35...
32
        ja      .login?
35
        ja      .login?
33
 
36
 
34
        mov     ebx, 25 shl 16 + 24
37
        mov     ebx, 10 shl 16 + 22
35
        xor     ecx, ecx
38
        mov     ecx, TEXT_ECX
36
        mov     edx, serverstr
39
        mov     edx, serverstr
Line 37... Line 40...
37
        mov     esi, userstr-serverstr
40
        mov     esi, userstr-serverstr
Line 38... Line 41...
38
        mcall   4                               ; "server" text
41
        mcall   4                               ; "server" text
39
 
42
 
Line 40... Line 43...
40
        invoke  edit_box_draw, URLbox           ; Server textbox
43
        invoke  edit_box_draw, URLbox           ; Server textbox
41
 
44
 
42
        cmp     [status], STATUS_CONNECTING
45
        cmp     [status], STATUS_CONNECTING
43
        jne     @f
46
        jne     @f
44
 
47
 
Line 45... Line 48...
45
        mov     ebx, 220 shl 16 + 85
48
        mov     ebx, 220 shl 16 + 85
-
 
49
        mov     ecx, 57 shl 16 + BTN_H
46
        mov     ecx, 47 shl 16 + 16
50
        mov     edx, 4
47
        mov     edx, 4
51
        mov     esi, 0xCCCCCC
48
        mov     esi, 0xCCCCCC
52
        mcall   8                               ; Cancel button
Line 49... Line 53...
49
        mcall   8                               ; Cancel button
53
 
Line 58... Line 62...
58
  @@:
62
  @@:
59
        cmp     [status], STATUS_CONNECT
63
        cmp     [status], STATUS_CONNECT
60
        jne     .redraw_done
64
        jne     .redraw_done
Line 61... Line 65...
61
 
65
 
62
        mov     ebx, 220 shl 16 + 85
66
        mov     ebx, 220 shl 16 + 85
63
        mov     ecx, 47 shl 16 + 16
67
        mov     ecx, 57 shl 16 + BTN_H
64
        mov     edx, 2
68
        mov     edx, 2
65
        mov     esi, 0xCCCCCC
69
        mov     esi, 0xCCCCCC
Line 66... Line 70...
66
        mcall   8                               ; Connect button
70
        mcall   8                               ; Connect button
-
 
71
 
67
 
72
        mov     ebx, 236 shl 16 + 62
68
        mov     ebx, 240 shl 16 + 52
73
		mov     ecx, TEXT_ECX
69
        mov     edx, connectstr
74
        mov     edx, connectstr
Line 70... Line 75...
70
        mov     esi, loginstr-connectstr
75
        mov     esi, loginstr-connectstr
Line 71... Line 76...
71
        mcall   4                               ; Connect button text
76
        mcall   4                               ; Connect button text
72
 
77
 
73
        jmp     .redraw_done
78
        jmp     .redraw_done
Line 74... Line 79...
74
 
79
 
75
  .login?:
80
  .login?:
76
        cmp     [status], STATUS_LOGIN
81
        cmp     [status], STATUS_LOGIN
77
        ja      @f
82
        ja      @f
78
 
83
 
Line 79... Line 84...
79
        mov     ebx, 25 shl 16 + 14
84
        mov     ebx, 10 shl 16 + 12
80
        xor     ecx, ecx
85
        mov     ecx, TEXT_ECX
81
        mov     edx, userstr
86
        mov     edx, userstr
82
        mov     esi, passstr-userstr
87
        mov     esi, passstr-userstr
Line 83... Line 88...
83
        mcall   4                               ; "user" text
88
        mcall   4                               ; "user" text
Line 92... Line 97...
92
 
97
 
93
        cmp     [status], STATUS_REQ_LOGIN
98
        cmp     [status], STATUS_REQ_LOGIN
Line 94... Line 99...
94
        jne     .redraw_done
99
        jne     .redraw_done
95
 
100
 
96
        mov     ebx, 220 shl 16 + 85
101
        mov     ebx, 220 shl 16 + 85
97
        mov     ecx, 47 shl 16 + 16
102
        mov     ecx, 67 shl 16 + BTN_H
98
        mov     edx, 3
103
        mov     edx, 3
Line 99... Line -...
99
        mov     esi, 0xCCCCCC
-
 
100
        mcall   8                               ; Login button
-
 
101
 
-
 
102
        mov     ebx, 240 shl 16 + 52
-
 
103
        mov     edx, loginstr
-
 
104
        mov     esi, cancelstr-loginstr
104
        mov     esi, 0xCCCCCC
105
        mcall   4                               ; Login button text
105
        mcall   8                               ; Login button
106
 
106
 
107
        mov     ebx, 120 shl 16 + 85
107
        mov     ebx, 120 shl 16 + 85
108
        mov     ecx, 47 shl 16 + 16
108
        mov     ecx, 67 shl 16 + BTN_H
Line -... Line 109...
-
 
109
        mov     edx, 4
-
 
110
        mov     esi, 0xCCCCCC
-
 
111
        mcall   8                               ; Cancel button
-
 
112
 
-
 
113
        mov     ebx, 240 shl 16 + 71
-
 
114
		mov     ecx, TEXT_ECX
109
        mov     edx, 4
115
        mov     edx, loginstr
110
        mov     esi, 0xCCCCCC
116
        mov     esi, cancelstr-loginstr
111
        mcall   8                               ; Cancel button
117
        mcall   4                               ; Login button text
112
 
118
		
Line 113... Line 119...
113
        mov     ebx, 140 shl 16 + 52
119
        mov     ebx, 140 shl 16 + 71
Line 143... Line 149...
143
        jmp     .restart
149
        jmp     .restart
144
  .last:
150
  .last:
145
        mcall   4                               ; print error message to window
151
        mcall   4                               ; print error message to window
Line 146... Line 152...
146
 
152
 
147
        mov     ebx, 220 shl 16 + 85
153
        mov     ebx, 220 shl 16 + 85
148
        mov     ecx, 47 shl 16 + 16
154
        mov     ecx, 47 shl 16 + BTN_H
149
        mov     edx, 5
155
        mov     edx, 5
150
        mov     esi, 0xCCCCCC
156
        mov     esi, 0xCCCCCC
Line 151... Line 157...
151
        mcall   8                               ; OK button
157
        mcall   8                               ; OK button
-
 
158
 
152
 
159
        mov     ebx, 256 shl 16 + 52
153
        mov     ebx, 256 shl 16 + 52
160
		mov     ecx, TEXT_ECX
154
        mov     edx, okstr
161
        mov     edx, okstr
Line 155... Line 162...
155
        mov     esi, okstr_e-okstr
162
        mov     esi, okstr_e-okstr