forked from KolibriOS/kolibrios
aclock: redraw optimized, set window title using f0
git-svn-id: svn://kolibrios.org@2741 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
8050dfb9ec
commit
829ad51ebf
@ -86,13 +86,18 @@ main:
|
|||||||
|
|
||||||
call drawWindow
|
call drawWindow
|
||||||
.msgpump:
|
.msgpump:
|
||||||
call drawClock
|
; call drawClock
|
||||||
|
|
||||||
; wait up to a second for next event
|
; wait up to a second for next event
|
||||||
mov eax,MOS_SC_WAITEVENTTIMEOUT
|
mov eax,MOS_SC_WAITEVENTTIMEOUT
|
||||||
mov ebx,100
|
mov ebx,100
|
||||||
int 0x40
|
int 0x40
|
||||||
|
|
||||||
|
test eax,eax
|
||||||
|
jne .event_occured
|
||||||
|
call drawClock
|
||||||
|
|
||||||
|
.event_occured:
|
||||||
cmp eax,MOS_EVT_REDRAW
|
cmp eax,MOS_EVT_REDRAW
|
||||||
je .redraw
|
je .redraw
|
||||||
cmp eax,MOS_EVT_KEY
|
cmp eax,MOS_EVT_KEY
|
||||||
@ -157,19 +162,10 @@ drawWindow:
|
|||||||
shl ecx,16
|
shl ecx,16
|
||||||
or ecx,[wndHeight]
|
or ecx,[wndHeight]
|
||||||
mov edx,[wndColors+MOS_WNDCOLORS.work]
|
mov edx,[wndColors+MOS_WNDCOLORS.work]
|
||||||
or edx,0x03000000
|
or edx,0x53000000
|
||||||
mov esi,[wndColors+MOS_WNDCOLORS.grab]
|
mov edi,label
|
||||||
mov edi,[wndColors+MOS_WNDCOLORS.frame]
|
|
||||||
int 0x40
|
int 0x40
|
||||||
|
|
||||||
; draw window label
|
|
||||||
mov eax,MOS_SC_WRITETEXT
|
|
||||||
mov ebx,MOS_DWORD(8,8)
|
|
||||||
mov ecx,[wndColors+MOS_WNDCOLORS.grabText]
|
|
||||||
mov edx,label
|
|
||||||
mov esi,LABEL_LEN
|
|
||||||
int 0x40
|
|
||||||
|
|
||||||
call drawClock
|
call drawClock
|
||||||
|
|
||||||
; end window redraw
|
; end window redraw
|
||||||
|
@ -114,9 +114,11 @@ drawClock:
|
|||||||
pushad
|
pushad
|
||||||
mov ebx,(MOS_WND_SKIN_BORDER_LEFT)*0x10000 ; x start
|
mov ebx,(MOS_WND_SKIN_BORDER_LEFT)*0x10000 ; x start
|
||||||
or ebx,ecx ; width
|
or ebx,ecx ; width
|
||||||
|
inc ebx
|
||||||
mov ecx,eax ; y start
|
mov ecx,eax ; y start
|
||||||
shl ecx,16 ; (=skin height)
|
shl ecx,16 ; (=skin height)
|
||||||
or ecx,edx ; height
|
or ecx,edx ; height
|
||||||
|
inc ecx
|
||||||
mov edx,[wndColors + MOS_WNDCOLORS.work]
|
mov edx,[wndColors + MOS_WNDCOLORS.work]
|
||||||
mov eax,MOS_SC_DRAWBAR
|
mov eax,MOS_SC_DRAWBAR
|
||||||
int 0x40
|
int 0x40
|
||||||
|
Loading…
Reference in New Issue
Block a user