forked from KolibriOS/kolibrios
Mostly cosmetical updates for IRCC
git-svn-id: svn://kolibrios.org@3331 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
0a833519d1
commit
336245620b
@ -133,6 +133,8 @@ redraw_channel_list:
|
|||||||
.noscroll:
|
.noscroll:
|
||||||
mov [scroll1.position], 0
|
mov [scroll1.position], 0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
print_channel_list:
|
print_channel_list:
|
||||||
|
|
||||||
pusha
|
pusha
|
||||||
@ -156,7 +158,10 @@ print_channel_list:
|
|||||||
mul ecx
|
mul ecx
|
||||||
mov edx, eax
|
mov edx, eax
|
||||||
mov eax, [window_open]
|
mov eax, [window_open]
|
||||||
add edx, [eax + window.data_ptr]
|
mov eax, [eax + window.data_ptr]
|
||||||
|
add edx, eax
|
||||||
|
mov ebp, [eax + window_data.selected]
|
||||||
|
sub ebp, [scroll1.position]
|
||||||
add edx, window_data.names
|
add edx, window_data.names
|
||||||
|
|
||||||
pop ebx
|
pop ebx
|
||||||
@ -168,8 +173,19 @@ print_channel_list:
|
|||||||
mov edi, [ysize] ; Calculate how many names will fit on screen
|
mov edi, [ysize] ; Calculate how many names will fit on screen
|
||||||
sub edi, TEXT_Y + 15 ;+ 10 ;;;;;
|
sub edi, TEXT_Y + 15 ;+ 10 ;;;;;
|
||||||
.loop:
|
.loop:
|
||||||
; TODO: check if name is selected and highlight background color if so
|
dec ebp ; is this name selected?
|
||||||
cmp byte[edx], ' ' ; end of list?
|
jnz @f
|
||||||
|
; yes, highlight it
|
||||||
|
pusha
|
||||||
|
mov cx, bx
|
||||||
|
mov bx, USERLIST_X
|
||||||
|
shl ecx, 16
|
||||||
|
mov cx, 10 - 1
|
||||||
|
mov edx, 0x00000055 ; blue!
|
||||||
|
mcall 13
|
||||||
|
popa
|
||||||
|
@@:
|
||||||
|
cmp byte[edx], 0 ; end of list?
|
||||||
je .done
|
je .done
|
||||||
mcall
|
mcall
|
||||||
|
|
||||||
|
@ -42,12 +42,12 @@ UTF8 = 2
|
|||||||
USERCMD_MAX_SIZE = 400
|
USERCMD_MAX_SIZE = 400
|
||||||
|
|
||||||
WIN_MIN_X = 600
|
WIN_MIN_X = 600
|
||||||
WIN_MIN_Y = 180
|
WIN_MIN_Y = 165
|
||||||
|
|
||||||
TEXT_X = 5
|
TEXT_X = 5
|
||||||
TEXT_Y = 45
|
TEXT_Y = 30
|
||||||
|
|
||||||
TOP_Y = 40
|
TOP_Y = 25
|
||||||
|
|
||||||
MAX_WINDOWS = 20
|
MAX_WINDOWS = 20
|
||||||
MAX_USERS = 4096
|
MAX_USERS = 4096
|
||||||
@ -107,6 +107,7 @@ struct window_data
|
|||||||
text rb 120*60
|
text rb 120*60
|
||||||
title rb 256
|
title rb 256
|
||||||
names rb MAX_NICK_LEN * MAX_USERS
|
names rb MAX_NICK_LEN * MAX_USERS
|
||||||
|
selected dd ? ; selected user, 0 if none selected
|
||||||
usertext rb 256
|
usertext rb 256
|
||||||
usertextlen dd ?
|
usertextlen dd ?
|
||||||
ends
|
ends
|
||||||
@ -169,7 +170,6 @@ START:
|
|||||||
mcall 48, 3, colors, 40
|
mcall 48, 3, colors, 40
|
||||||
|
|
||||||
; set edit box and scrollbar colors
|
; set edit box and scrollbar colors
|
||||||
|
|
||||||
mov eax, [colors.work]
|
mov eax, [colors.work]
|
||||||
mov [scroll1.bg_color], eax
|
mov [scroll1.bg_color], eax
|
||||||
|
|
||||||
@ -374,10 +374,6 @@ sockaddr1:
|
|||||||
|
|
||||||
status dd STATUS_DISCONNECTED
|
status dd STATUS_DISCONNECTED
|
||||||
|
|
||||||
channel_line_sun dd 0x9999ff
|
|
||||||
channel_line_shadow dd 0x666699
|
|
||||||
index_list_2 dd 0x0000ff
|
|
||||||
|
|
||||||
text_start dd ? ; pointer to current textbox data
|
text_start dd ? ; pointer to current textbox data
|
||||||
irc_data dd 0x0 ; encoder
|
irc_data dd 0x0 ; encoder
|
||||||
textbox_width dd 80 ; in characters, not pixels ;)
|
textbox_width dd 80 ; in characters, not pixels ;)
|
||||||
@ -422,7 +418,7 @@ I_END:
|
|||||||
edit1 edit_box 0, 0, 0, 0xffffff, 0x6f9480, 0, 0, 0, USERCMD_MAX_SIZE, usercommand, mouse_dd, ed_focus, 25, 25
|
edit1 edit_box 0, 0, 0, 0xffffff, 0x6f9480, 0, 0, 0, USERCMD_MAX_SIZE, usercommand, mouse_dd, ed_focus, 25, 25
|
||||||
; xsize, xpos, ysize, ypos, max, cur, pos, bgcol, frcol, linecol
|
; xsize, xpos, ysize, ypos, max, cur, pos, bgcol, frcol, linecol
|
||||||
scroll1 scrollbar SCROLLBAR_WIDTH, 300, 150, TOP_Y, 10, 100, 0, 0, 0, 0, 0, 1
|
scroll1 scrollbar SCROLLBAR_WIDTH, 300, 150, TOP_Y, 10, 100, 0, 0, 0, 0, 0, 1
|
||||||
|
scroll2 scrollbar SCROLLBAR_WIDTH, 300, 150, TOP_Y, 10, 100, 0, 0, 0, 0, 0, 1
|
||||||
|
|
||||||
main_PID dd ? ; identifier of main thread
|
main_PID dd ? ; identifier of main thread
|
||||||
utf8_bytes_rest dd ? ; bytes rest in current UTF8 sequence
|
utf8_bytes_rest dd ? ; bytes rest in current UTF8 sequence
|
||||||
|
@ -46,6 +46,8 @@ server_parser:
|
|||||||
|
|
||||||
server_commands:
|
server_commands:
|
||||||
|
|
||||||
|
dd '322 ', cmd_322 ; RPL_LIST
|
||||||
|
dd '323 ', cmd_323 ; RPL_LISTEND
|
||||||
dd '328 ', cmd_328
|
dd '328 ', cmd_328
|
||||||
dd '332 ', cmd_topic
|
dd '332 ', cmd_topic
|
||||||
dd '333 ', cmd_333 ; nickname and time of topic
|
dd '333 ', cmd_333 ; nickname and time of topic
|
||||||
@ -870,3 +872,18 @@ cmd_333:
|
|||||||
.fail:
|
.fail:
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
cmd_322:
|
||||||
|
add esi, 4
|
||||||
|
|
||||||
|
call skip_nick
|
||||||
|
|
||||||
|
call print_text2
|
||||||
|
|
||||||
|
mov esi, str_newline
|
||||||
|
call print_text2
|
||||||
|
|
||||||
|
ret
|
||||||
|
|
||||||
|
cmd_323:
|
||||||
|
|
||||||
|
ret
|
@ -144,8 +144,7 @@ cmd_usr_quit:
|
|||||||
mov ecx, MAX_WINDOWS
|
mov ecx, MAX_WINDOWS
|
||||||
mov edi, windows
|
mov edi, windows
|
||||||
.loop:
|
.loop:
|
||||||
mov [edi+window.flags], FLAG_CLOSE
|
mov [edi + window.flags], FLAG_CLOSE
|
||||||
; call notify_channel_thread
|
|
||||||
add edi, sizeof.window
|
add edi, sizeof.window
|
||||||
dec ecx
|
dec ecx
|
||||||
jnz .loop
|
jnz .loop
|
||||||
|
Loading…
Reference in New Issue
Block a user