/kernel/branches/net/applications/ircc/gui.inc |
---|
36,7 → 36,7 |
mov ebx, [xsize] |
mov ecx, [ysize] |
sub cx, 35 |
sub cx, 15 ;;;; |
push cx |
shl ecx, 16 |
pop cx |
56,13 → 56,34 |
shl ebx, 16 |
pop bx |
mov ecx, [ysize] |
add ecx, TOP_Y SHL 16 -(15+20) |
add ecx, TOP_Y SHL 16 -(15) ;;;; |
mcall |
call print_channel_list |
; scrollbar |
mov eax, [ysize] |
sub eax, TOP_Y + 15 ;;;; |
push eax |
mov [scroll1.y_size], ax |
mov eax, [xsize] |
sub eax, SCROLLBAR_WIDTH |
mov [scroll1.x_pos], ax |
pop eax ; scrollbar height |
xor edx, edx |
mov ecx, 10 |
div ecx |
mov [scroll1.cur_area], eax |
mov [scroll1.all_redraw], 1 |
push dword scroll1 |
call [scrollbar_v_draw] |
.not_channel: |
mov edx, [edi + window.data_ptr] |
add edx, window_data.text |
call draw_channel_text |
70,7 → 91,7 |
; editbox |
mov eax, [ysize] |
sub eax, 30 ;;;;;; |
sub eax, 12 ;;;;;; |
mov [edit1.top], eax |
mov eax, [xsize] |
79,21 → 100,8 |
push dword edit1 |
call [edit_box_draw] |
; scrollbar |
; tabs |
mov eax, [ysize] |
sub eax, TOP_Y + 35 ;;;; |
mov [scroll1.y_size], ax |
mov eax, [xsize] |
sub eax, SCROLLBAR_WIDTH |
mov [scroll1.x_pos], ax |
mov [scroll1.all_redraw], 1 |
push dword scroll1 |
call [scrollbar_v_draw] |
call draw_windownames |
mcall 12, 2 |
114,7 → 122,7 |
push ebx |
mov bx, USERLIST_X |
mov ecx, [ysize] |
add ecx, TEXT_Y shl 16 - (TEXT_Y + 35 + 10 ) ;;;;; |
add ecx, TEXT_Y shl 16 - (TEXT_Y + 15) ;;;;; + 10??? |
mov edx, [colors.work] |
mcall |
134,7 → 142,7 |
mov eax, 4 ; draw text |
mov edi, [ysize] ; Calculate how many names will fit on screen |
sub edi, TEXT_Y + 35 + 10 ;;;;; |
sub edi, TEXT_Y + 15 ;+ 10 ;;;;; |
.loop: |
; TODO: check if name is selected and highlight background color if so |
cmp byte[edx], ' ' ; end of list? |
/kernel/branches/net/applications/ircc/ircc.asm |
---|
41,7 → 41,7 |
USERCMD_MAX_SIZE = 400 |
WIN_MIN_X = 600 |
WIN_MIN_Y = 200 |
WIN_MIN_Y = 180 |
TEXT_X = 5 |
TEXT_Y = 45 |
/kernel/branches/net/applications/ircc/serverparser.inc |
---|
807,18 → 807,26 |
mov [ebx + window.users], 0 ;;; FIXME: Only if we have just set the receiving names bit |
mov eax, [ebx + window.data_ptr] |
lea edi, [eax + window_data.names] |
lea edx, [edi + MAX_NICK_LEN] |
mov edx, edi |
; now find the semicolon separating channelname and usernames |
.loop2: |
lodsb |
cmp al, ':' |
je .namesloop |
je .newname |
test al, al |
jnz .loop2 |
ret |
.next: |
add edx, MAX_NICK_LEN |
mov edi, edx |
;;; cmp edi, .. ; TODO: Check for buffer overflow |
jmp .namesloop ;;;; |
.newname: |
inc [ebx + window.users] |
.namesloop: |
; now the names list begins, separated with spaces |
lodsb |
829,14 → 837,6 |
stosb |
jmp .namesloop |
.next: |
inc [ebx + window.users] |
mov edi, edx |
add edx, MAX_NICK_LEN |
;;; cmp edi, .. ; TODO: Check for buffer overflow |
jmp .namesloop |
.done: |
call users_calculate |
call print_channel_list |
846,17 → 846,16 |
users_calculate: |
mov eax, [ysize] |
sub eax, TEXT_Y + 35 + 10 ;;;; |
xor edx, edx |
mov ecx, 10 |
div ecx |
mov [scroll1.max_area], eax |
mov ebx, [window_print] |
mov eax, [ebx + window.users] |
mov [scroll1.max_area], eax |
; TODO: check if cur pos isnt greater then max |
; OK, now redraw the scrollbar |
mov [scroll1.all_redraw], 1 |
push dword scroll1 |
call [scrollbar_v_draw] |
ret |