ftpc: use tab to switch between editboxes

git-svn-id: svn://kolibrios.org@7465 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2018-10-14 18:29:31 +00:00
parent 02e226cd9a
commit 8261da26a4
2 changed files with 46 additions and 8 deletions

View File

@ -750,7 +750,7 @@ exit2:
; data
str_title db 'FTP client for KolibriOS',0
str_welcome db 'FTP client for KolibriOS v0.12a',10
str_welcome db 'FTP client for KolibriOS v0.14',10
db 10,0
str_srv_addr db 'Please enter ftp server address.',10,0

View File

@ -32,6 +32,14 @@ login_gui: ;////////////////////////////////////////////////////////////////////
.redraw:
call .draw
jmp .still
.draw_editboxes:
stdcall [edit_box_draw], edit_usr
stdcall [edit_box_draw], edit_pass
stdcall [edit_box_draw], edit_server
stdcall [edit_box_draw], edit_port
stdcall [edit_box_draw], edit_path
ret
align 4
@ -39,11 +47,7 @@ login_gui: ;////////////////////////////////////////////////////////////////////
mcall 12, 1
mcall 0, <WIN_X,WIN_W>, <WIN_Y,WIN_H>, 0x34000000+SYS_COL, 0x805080DD, str_title
stdcall [edit_box_draw], edit_usr
stdcall [edit_box_draw], edit_pass
stdcall [edit_box_draw], edit_server
stdcall [edit_box_draw], edit_port
stdcall [edit_box_draw], edit_path
call .draw_editboxes
; draw "connect" button
mcall 8, <162,65>, <150,25>, 2, BT_COL
@ -115,10 +119,44 @@ login_gui: ;////////////////////////////////////////////////////////////////////
jmp gui.exit
.tab:
;TODO
test word [edit_usr.flags],ed_focus
je @f
sub word [edit_usr.flags],ed_focus
add word [edit_pass.flags],ed_focus
jmp .tab_end
@@:
test word [edit_pass.flags],ed_focus
je @f
sub word [edit_pass.flags],ed_focus
add word [edit_server.flags],ed_focus
jmp .tab_end
@@:
test word [edit_server.flags],ed_focus
je @f
sub word [edit_server.flags],ed_focus
add word [edit_port.flags],ed_focus
jmp .tab_end
@@:
test word [edit_port.flags],ed_focus
je @f
sub word [edit_port.flags],ed_focus
add word [edit_path.flags],ed_focus
jmp .tab_end
@@:
test word [edit_path.flags],ed_focus
je @f
sub word [edit_path.flags],ed_focus
add word [edit_usr.flags],ed_focus
;jmp .tab_end
.tab_end:
call .draw_editboxes
jmp .still
;=========================================================
;DATA AREA
;=========================================================
gui_str_connect db 'Connect',0
gui_str_usr db 'Username:',0
gui_str_pass db 'Password:',0