IRCc 0.24: Make better use of available space on screen.
git-svn-id: svn://kolibrios.org@6023 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
45a7eeea24
commit
e48064d090
@ -1,6 +0,0 @@
|
||||
@erase lang.inc
|
||||
@echo lang fix en >lang.inc
|
||||
@fasm -m 16384 ircc.asm ircc
|
||||
@kpack ircc
|
||||
@erase lang.inc
|
||||
@pause
|
@ -1,6 +1,6 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; ;;
|
||||
;; Copyright (C) KolibriOS team 2004-2014. All rights reserved. ;;
|
||||
;; Copyright (C) KolibriOS team 2004-2016. All rights reserved. ;;
|
||||
;; Distributed under terms of the GNU General Public License ;;
|
||||
;; ;;
|
||||
;; Written by hidnplayr@kolibrios.org ;;
|
||||
@ -11,7 +11,6 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
|
||||
|
||||
draw_window: ; Completely redraw the window, recalculate all coordinates and sizes
|
||||
|
||||
pusha
|
||||
@ -55,23 +54,12 @@ draw_window: ; Completely redraw the window, recalculate all coordinates and
|
||||
mcall
|
||||
mcall 12, 2
|
||||
|
||||
test [thread_info.wnd_state], 100b ; skip if window rolled up
|
||||
test [thread_info.wnd_state], 100b ; skip if window is rolled up
|
||||
jne .exit
|
||||
|
||||
mov ebx, [xsize]
|
||||
mov ecx, [ysize]
|
||||
sub cx, BOTTOM_Y ;;;;
|
||||
push cx
|
||||
shl ecx, 16
|
||||
pop cx
|
||||
mov edx, [colors.work_graph]
|
||||
mcall 38 ; draw bottom line
|
||||
mov ecx, TOP_Y SHL 16 + TOP_Y
|
||||
mcall ; draw top line
|
||||
|
||||
; calculate available space for textbox and coordinates for scrollbars
|
||||
mov eax, [ysize]
|
||||
sub eax, TOP_Y + BOTTOM_Y - 1 ;;;;
|
||||
sub eax, TOP_Y + INPUTBOX_HEIGHT - 1 ;;;;
|
||||
mov [scroll2.y_size], ax
|
||||
mov [scroll1.y_size], ax
|
||||
sub eax, 4 ;;;;
|
||||
@ -137,14 +125,14 @@ draw_window: ; Completely redraw the window, recalculate all coordinates and
|
||||
shl ebx, 16
|
||||
pop bx
|
||||
mov ecx, [ysize]
|
||||
add ecx, TOP_Y shl 16 - (BOTTOM_Y)
|
||||
add ecx, TOP_Y shl 16 - (INPUTBOX_HEIGHT)
|
||||
mov edx, [colors.work_graph]
|
||||
mcall 38
|
||||
.not_channel:
|
||||
|
||||
; draw editbox
|
||||
mov eax, [ysize]
|
||||
sub eax, 13 ;;;;;;
|
||||
sub eax, INPUTBOX_HEIGHT
|
||||
mov [edit1.top], eax
|
||||
|
||||
mov eax, [xsize]
|
||||
@ -267,11 +255,18 @@ draw_channel_list:
|
||||
|
||||
draw_windowtabs:
|
||||
|
||||
; Draw horizontal line
|
||||
|
||||
mov ebx, [xsize]
|
||||
mov edx, [colors.work_graph]
|
||||
mov ecx, TOP_Y SHL 16 + TOP_Y
|
||||
mcall 38
|
||||
|
||||
; Create the buttons
|
||||
|
||||
mov eax, 8
|
||||
mov ebx, 5 shl 16 + 120
|
||||
mov ecx, 12 shl 16 + 12
|
||||
mov ebx, TAB_WIDTH
|
||||
mov ecx, TOP_SPACE shl 16 + TAB_HEIGHT
|
||||
mov edx, WINDOW_BTN_START
|
||||
mov edi, windows
|
||||
.more_btn:
|
||||
@ -283,23 +278,22 @@ draw_windowtabs:
|
||||
@@:
|
||||
mcall
|
||||
inc edx
|
||||
add ebx, 125 shl 16
|
||||
add ebx, (TAB_WIDTH + TAB_SPACE) shl 16
|
||||
add edi, sizeof.window
|
||||
cmp [edi + window.data_ptr], 0
|
||||
jne .more_btn
|
||||
|
||||
; Draw the close window button
|
||||
|
||||
mov edi, [window_active]
|
||||
cmp [edi + window.type], WINDOWTYPE_SERVER ; dont let the user close server window
|
||||
je @f
|
||||
|
||||
; mov eax, 8
|
||||
mov ebx, [xsize]
|
||||
sub ebx, 12
|
||||
sub ebx, SCROLLBAR_WIDTH
|
||||
shl ebx, 16
|
||||
mov bx, 12
|
||||
mov ecx, 6 shl 16 + 12
|
||||
mov bx, SCROLLBAR_WIDTH
|
||||
mov ecx, TOP_SPACE shl 16 + TAB_HEIGHT - 1
|
||||
mov edx, WINDOW_BTN_CLOSE
|
||||
mov esi, 0x00aa0000 ; red !
|
||||
mcall
|
||||
@ -308,7 +302,7 @@ draw_windowtabs:
|
||||
; Draw the windownames onto the buttons
|
||||
|
||||
mov eax, 4
|
||||
mov ebx, 10 shl 16 + 15
|
||||
mov ebx, 5 shl 16 + TOP_SPACE + 4 ;;;;
|
||||
mov esi, MAX_WINDOWS
|
||||
mov edi, windows
|
||||
.more:
|
||||
@ -323,7 +317,7 @@ draw_windowtabs:
|
||||
add edi, sizeof.window ; get ptr to next window
|
||||
cmp [edi + window.data_ptr], 0
|
||||
je .enough
|
||||
add ebx, 125 shl 16
|
||||
add ebx, (TAB_WIDTH + TAB_SPACE) shl 16
|
||||
dec esi
|
||||
jnz .more
|
||||
.enough:
|
||||
@ -334,7 +328,7 @@ draw_windowtabs:
|
||||
|
||||
highlight_updated_tabs:
|
||||
mov eax, 4
|
||||
mov ebx, 10 shl 16 + 15
|
||||
mov ebx, 5 shl 16 + TOP_SPACE + 4 ;;;;
|
||||
mov ecx, 0x80aa0000
|
||||
mov esi, MAX_WINDOWS
|
||||
mov edi, windows
|
||||
@ -347,7 +341,7 @@ highlight_updated_tabs:
|
||||
add edi, sizeof.window ; get ptr to next window
|
||||
cmp [edi + window.data_ptr], 0
|
||||
je .enough_
|
||||
add ebx, 125 shl 16
|
||||
add ebx, (TAB_WIDTH + TAB_SPACE) shl 16
|
||||
dec esi
|
||||
jnz .more_
|
||||
.enough_:
|
||||
|
@ -1,6 +1,6 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; ;;
|
||||
;; Copyright (C) KolibriOS team 2004-2014. All rights reserved. ;;
|
||||
;; Copyright (C) KolibriOS team 2004-2016. All rights reserved. ;;
|
||||
;; Distributed under terms of the GNU General Public License ;;
|
||||
;; ;;
|
||||
;; IRC client for KolibriOS ;;
|
||||
@ -13,7 +13,7 @@
|
||||
;; ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
version equ '0.23'
|
||||
version equ '0.24'
|
||||
|
||||
; connection status
|
||||
STATUS_DISCONNECTED = 0
|
||||
@ -48,8 +48,12 @@ WIN_MIN_Y = 170
|
||||
TEXT_X = 5
|
||||
TEXT_Y = TOP_Y + 2
|
||||
|
||||
TOP_Y = 24
|
||||
BOTTOM_Y = 15
|
||||
TOP_SPACE = 2
|
||||
TAB_HEIGHT = 14
|
||||
TAB_WIDTH = 120
|
||||
TAB_SPACE = 5
|
||||
TOP_Y = TOP_SPACE+ TAB_HEIGHT
|
||||
INPUTBOX_HEIGHT = 13
|
||||
|
||||
MAX_WINDOWS = 20
|
||||
MAX_USERS = 4096
|
||||
@ -503,12 +507,12 @@ str_welcome db 3, '3 ___', 3, '7__________', 3, '6_________ ', 3, '4 _
|
||||
db 3, '3|___|', 3, '7|____|_ /', 3, '6\______ /', 3, '4 \___ >____/__|\___ >___| /__|', 10
|
||||
db 3, '3 ', 3, '7 \/ ', 3, '6 \/ ', 3, '4 \/ \/ \/', 10
|
||||
db 10
|
||||
db 'Welcome to the KolibriOS IRC client v', version, 10
|
||||
db 'Welcome to KolibriOS IRC client ', version, 10
|
||||
db 10
|
||||
db 'Type /help for help', 10, 10, 0
|
||||
|
||||
str_version db 'VERSION '
|
||||
str_programname db 'KolibriOS IRC client v', version, 0
|
||||
str_version db 'VERSION KolibriOS '
|
||||
str_programname db 'IRC client ', version, 0
|
||||
|
||||
str_user db 'user', 0
|
||||
str_nick db 'nick', 0
|
||||
|
@ -1,6 +1,6 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; ;;
|
||||
;; Copyright (C) KolibriOS team 2004-2014. All rights reserved. ;;
|
||||
;; Copyright (C) KolibriOS team 2004-2016. All rights reserved. ;;
|
||||
;; Distributed under terms of the GNU General Public License ;;
|
||||
;; ;;
|
||||
;; Written by hidnplayr@kolibrios.org ;;
|
||||
|
@ -1,6 +1,6 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; ;;
|
||||
;; Copyright (C) KolibriOS team 2004-2014. All rights reserved. ;;
|
||||
;; Copyright (C) KolibriOS team 2004-2016. All rights reserved. ;;
|
||||
;; Distributed under terms of the GNU General Public License ;;
|
||||
;; ;;
|
||||
;; Written by hidnplayr@kolibrios.org ;;
|
||||
|
@ -1,6 +1,6 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; ;;
|
||||
;; Copyright (C) KolibriOS team 2004-2014. All rights reserved. ;;
|
||||
;; Copyright (C) KolibriOS team 2004-2016. All rights reserved. ;;
|
||||
;; Distributed under terms of the GNU General Public License ;;
|
||||
;; ;;
|
||||
;; Written by hidnplayr@kolibrios.org ;;
|
||||
|
@ -1,6 +1,6 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; ;;
|
||||
;; Copyright (C) KolibriOS team 2004-2014. All rights reserved. ;;
|
||||
;; Copyright (C) KolibriOS team 2004-2016. All rights reserved. ;;
|
||||
;; Distributed under terms of the GNU General Public License ;;
|
||||
;; ;;
|
||||
;; Written by hidnplayr@kolibrios.org ;;
|
||||
|
Loading…
Reference in New Issue
Block a user