Subversion Repositories Kolibri OS

Rev

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

Rev 6582 Rev 7464
Line 1... Line 1...
1
SYS_COL  = 0xe6e6e6
1
SYS_COL  = 0xe6e6e6
2
BT_COL   = 0xcccccc
2
BT_COL   = 0xcccccc
3
STR_COL  = 0x595959 ;0x000000
3
STR_COL  = 0x595959 ;0x000000
Line -... Line 4...
-
 
4
 
-
 
5
WIN_X = 320
-
 
6
WIN_Y = 300
-
 
7
WIN_W = 390
-
 
8
WIN_H = 230
-
 
9
 
-
 
10
pad = 28 ; padding between editboxes
4
 
11
 
5
;;================================================================================================;;
12
;;================================================================================================;;
6
login_gui: ;//////////////////////////////////////////////////////////////////////////////////////;;
13
login_gui: ;//////////////////////////////////////////////////////////////////////////////////////;;
7
;;------------------------------------------------------------------------------------------------;;
14
;;------------------------------------------------------------------------------------------------;;
8
;? Login GUI-specific functions                                                                   ;;
15
;? Login GUI-specific functions                                                                   ;;
Line 18... Line 25...
18
        mov     [initial_login], 1
25
        mov     [initial_login], 1
Line 19... Line 26...
19
 
26
 
20
  .get_username:
27
  .get_username:
21
        ; in case of error when either login_gui.server_addr or 
28
        ; in case of error when either login_gui.server_addr or 
22
        ; login_gui.get_username is called, should resize window
29
        ; login_gui.get_username is called, should resize window
Line 23... Line 30...
23
        mcall   67, 320, 300, 390, 200 ; resize to login gui window size
30
        mcall   67, WIN_X, WIN_Y, WIN_W, WIN_H ; resize to login gui window size
24
 
31
 
25
  .redraw:
32
  .redraw:
Line 26... Line 33...
26
        call    .draw
33
        call    .draw
27
        jmp     .still
34
        jmp     .still
28
 
35
 
29
 
36
 
Line 30... Line 37...
30
  align 4
37
  align 4
31
  .draw:
38
  .draw:
32
        mcall   12, 1
39
        mcall   12, 1
33
        mcall   0, <320,390>, <300,200>, 0x34000000+SYS_COL, 0x805080DD, hed
40
        mcall   0, , , 0x34000000+SYS_COL, 0x805080DD, str_title
34
 
41
 
Line 35... Line 42...
35
        stdcall [edit_box_draw], edit_usr
42
        stdcall [edit_box_draw], edit_usr
36
        stdcall [edit_box_draw], edit_pass
43
        stdcall [edit_box_draw], edit_pass
Line 37... Line 44...
37
        stdcall [edit_box_draw], edit_server
44
        stdcall [edit_box_draw], edit_server
38
        stdcall [edit_box_draw], edit_port
45
        stdcall [edit_box_draw], edit_port
39
        stdcall [edit_box_draw], edit_path
46
        stdcall [edit_box_draw], edit_path
40
 
47
 
41
        ; draw "connect" button
48
        ; draw "connect" button
42
        mcall   8, <162,65>, <140,25>, 2, BT_COL
49
        mcall   8, <162,65>, <150,25>, 2, BT_COL
43
 
50
 
44
        ; draw strings
51
        ; draw strings
45
        mcall   4, <3,5>, 0xb0000000, gui_str_usr
52
        mcall   4, <3,      8>, 0xb0000000, gui_str_usr
Line 46... Line 53...
46
        mcall   4, <3,25>, 0xb0000000, gui_str_pass
53
        mcall    , <3,pad*1+8>,           , gui_str_pass
47
        mcall   4, <3,45>, 0xb0000000, gui_str_server
54
        mcall    , <3,pad*2+8>,           , gui_str_server
Line 84... Line 91...
84
        jmp     .still
91
        jmp     .still
Line 85... Line 92...
85
 
92
 
86
  .key:
93
  .key:
Line -... Line 94...
-
 
94
        mcall   2
-
 
95
 
-
 
96
        cmp     ah,13
-
 
97
        je      gui.main
-
 
98
 
-
 
99
        cmp     ah,9
87
        mcall   2
100
        je      .tab
88
 
101
 
89
        stdcall [edit_box_key], edit_usr
102
        stdcall [edit_box_key], edit_usr
90
        stdcall [edit_box_key], edit_pass
103
        stdcall [edit_box_key], edit_pass
91
        stdcall [edit_box_key], edit_server
104
        stdcall [edit_box_key], edit_server
Line 99... Line 112...
99
        jmp     .server_addr
112
        jmp     .server_addr
Line 100... Line 113...
100
    
113
    
101
  .exit:
114
  .exit:
Line -... Line 115...
-
 
115
        jmp     gui.exit
-
 
116
 
-
 
117
  .tab:
-
 
118
        ;TODO
Line 102... Line 119...
102
        jmp     gui.exit
119
        jmp     .still
103
 
120
 
104
 
121
 
105
gui_str_connect db 'Connect',0
122
gui_str_connect db 'Connect',0
Line 112... Line 129...
112
gui_str_null    db ' ',0
129
gui_str_null    db ' ',0
Line 113... Line 130...
113
 
130
 
Line 114... Line 131...
114
str_error_addr  dd gui_str_null
131
str_error_addr  dd gui_str_null
115
 
132
 
116
; login window components
133
; login window components
117
edit_usr edit_box 300,75,5, 0xffffff,0x6f9480,0,0xAABBCC,0,99,param_user,mouse_dd,ed_focus
134
edit_usr    edit_box 300,75,5,      0xffffff,0x94AECE,0,0xAABBCC,0x10000000,99,param_user,mouse_dd,ed_focus
118
edit_pass edit_box 300,75,25,0xffffff,0x6a9480,0,0xAABBCC,0,99,param_password,mouse_dd,ed_pass
135
edit_pass   edit_box 300,75,pad+5,  0xffffff,0x94AECE,0,0xAABBCC,0x10000000,99,param_password,mouse_dd,ed_pass
119
edit_server edit_box 300,75,45,0xffffff,0x6a9480,0,0xAABBCC,0,99,param_server_addr,mouse_dd,0
136
edit_server edit_box 300,75,pad*2+5,0xffffff,0x94AECE,0,0xAABBCC,0x10000000,99,param_server_addr,mouse_dd,0
Line 120... Line 137...
120
edit_port edit_box 50,75,65,0xffffff,0x6a9480,0,0xAABBCC,0,99,param_port,mouse_dd,ed_figure_only
137
edit_port   edit_box 50, 75,pad*3+5,0xffffff,0x94AECE,0,0xAABBCC,0x10000000,99,param_port,mouse_dd,ed_figure_only
121
edit_path edit_box 300,75,85,0xffffff,0x6a9480,0,0xAABBCC,0,99,param_path,mouse_dd,0
138
edit_path   edit_box 300,75,pad*4+5,0xffffff,0x94AECE,0,0xAABBCC,0x10000000,99,param_path,mouse_dd,0