Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 3890 → Rev 3889

/programs/system/calendar/trunk/calendar.asm
1,6 → 1,6
; Calendar for KolibriOS
;
; v1.35 - code update, redesign by Leency
; v1.3 - code update, redesign by Leency
; v1.1 - add change time support by DedOK
; v1.0 - written in pure assembler by Ivushkin Andrey aka Willow
; also - diamond, spraid, fedesco
32,9 → 32,9
cmp [focus],field
jne .nofocus
if reg eq
mov ecx,COL_ACTIVE_TEXT
mov ecx,0x10e7c750;0x10ddeeff
else
mov reg,COL_ACTIVE_TEXT
mov reg,0x10e7c750;0x10ddeeff
end if
jmp .exit
.nofocus:
107,7 → 107,7
jne no_tab
.tab:
cmp ebp,FOCUSABLE
JAE foc_cycle
je foc_cycle
inc [focus]
upd:
call calculate
127,6 → 127,13
mov [Month],edi
jmp upd
.noFkey:
cmp ebp,4
jne no_spinner
cmp ah,176
je year_dec
cmp ah,179
je year_inc
no_spinner:
cmp ebp,2
jne .nomonth
cmp ah,177
135,7 → 142,7
.nomonth:
cmp ebp,3
je noy_up.year_evt
cmp ebp,4
cmp ebp,5
jne still
mov ebx,[day_sel]
cmp ah,176 ; left arrow
174,7 → 181,7
call draw_days
jmp still
.redraw:
mov [focus],4
mov [focus],5
jmp red
nodayselect:
cmp ah,100
243,7 → 250,7
jne noy_dn
year_dec:
dec [Year]
mov [focus],3
mov [focus],4
jmp upd
noy_dn:
cmp ah,4 ; year+1
250,7 → 257,7
jne noy_up
year_inc:
inc [Year]
mov [focus],3
mov [focus],4
jmp upd
noy_up:
cmp ah,5
263,11 → 270,6
jne still.evt
mcall 2
.year_evt:
cmp ah,176
je year_dec
cmp ah,179
je year_inc
mov ebx,10
cmp ah,9
je key.tab
308,11 → 310,16
 
 
reset:
mcall 3
 
mov eax,3
mcall
mov ecx,eax
shl ecx,16
shr ecx,16
mcall 22,0x00000000
mov eax,22
mov ebx,0x00000000
mcall
 
jmp still
 
plus_hd:
319,6 → 326,7
mcall 3
mov ecx,eax
add ecx,1
mov eax,22
mcall 22,0x00000000
jmp still
 
333,24 → 341,38
mcall 3
mov ecx,eax
sub ecx,1
mcall 22,0x00000000
mov eax,22
mov ebx,0x00000000
mcall
 
jmp still
 
minus_he:
mcall 3
 
mov eax,3
mcall
mov ecx,eax
sub ecx,16
mcall 22,0x00000000
mov eax,22
mov ebx,0x00000000
mcall
 
jmp still
 
plus_md:
mcall 3
 
mov eax,3
mcall
mov ecx,eax
add ecx,256
mcall 22,0x00000000
mov eax,22
mov ebx,0x00000000
mcall
 
jmp still
 
plus_me:
 
mcall 3
mov ecx,eax
add ecx,4096
358,6 → 380,7
jmp still
 
minus_md:
 
mcall 3
mov ecx,eax
sub ecx,256
365,6 → 388,7
jmp still
 
minus_me:
 
mcall 3
mov ecx,eax
sub ecx,4096
372,6 → 396,7
jmp still
 
set_date:
 
mov eax,0x00000000
mov ebx,[day_sel]
call additem
383,15 → 408,20
mov ebx,[Year]
call additem
mov ecx,eax
mcall 22,1
mov eax,22
mov ebx,1
mcall
 
jmp still
 
additem:
 
add eax,1
daa
sub ebx,1
cmp ebx,0
jne additem
 
ret
 
 
520,7 → 550,7
mov ebx,B_SPIN
mov edx,spinner
mov esi,12
mov ecx,COL_DROPDOWN_T
ShowFocus 4
mcall
 
mov edx,[Month]
642,10 → 672,10
mov esi,COL_DATE_BUTTONS
jmp .draw_but
.draw_sel:
mov esi,COL_DATE_INACTIV
cmp [focus],4
mov esi,COL_DATE_CURRENT
cmp [focus],5
jne .draw_but
mov esi,COL_DATE_ACTIVE
mov esi,COL_DATE_CHANGED
.draw_but:
add edx,200+1 shl 29
mcall 8
768,7 → 798,9
Year dd ?
Month dd ?
day_sel dd ?
all_days dd ?
 
datestr dd ?
leap_year dd ?
number dd ?
year_input dd ?
/programs/system/calendar/trunk/data.inc
1,18 → 1,18
; program data: colors, text, vars
; program data: colors, text, vars (todo)
 
; colors
COL_WINDOW_BG equ 0x14E7E7E7
COL_TOOLBAR_BG equ 0x555555
COL_ACTIVE_TEXT equ 0x10e7c750
COL_WEEKDAY_BG equ 0xCCCDDD
COL_DATE_BUTTONS equ 0xF3F3F3
COL_DATE_INACTIV equ 0x31A4D0
COL_DATE_ACTIVE equ COL_ACTIVE_TEXT
COL_DATE_CURRENT equ 0x31A4D0
COL_DATE_CHANGED equ 0xef7840
COL_TIME_BUTTONS equ 0x5555dd
COL_GO_TODAY_T equ 0xd048c8
COL_MONTH_YEAR_B equ 0x0555555 ; 0 for time?
COL_DROPDOWN_BG equ 0x666666
COL_DROPDOWN_T equ 0x10CCCccc
 
COL_NEW_STYLE_T equ 0xef3333
 
remainder dd 1
53,7 → 53,7
B_NS_Y equ 48 shl 16+10
B_NS equ 190 shl 16+50
 
FOCUSABLE equ 4
FOCUSABLE equ 5
 
; multilanguage interface - configuratable in lang.inc
day_count db 3,0,3,2,3,2,3,3,2,3,2,3