Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 3889 → Rev 3890

/programs/system/calendar/trunk/calendar.asm
1,6 → 1,6
; Calendar for KolibriOS
;
; v1.3 - code update, redesign by Leency
; v1.35 - 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,0x10e7c750;0x10ddeeff
mov ecx,COL_ACTIVE_TEXT
else
mov reg,0x10e7c750;0x10ddeeff
mov reg,COL_ACTIVE_TEXT
end if
jmp .exit
.nofocus:
107,7 → 107,7
jne no_tab
.tab:
cmp ebp,FOCUSABLE
je foc_cycle
JAE foc_cycle
inc [focus]
upd:
call calculate
127,13 → 127,6
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
142,7 → 135,7
.nomonth:
cmp ebp,3
je noy_up.year_evt
cmp ebp,5
cmp ebp,4
jne still
mov ebx,[day_sel]
cmp ah,176 ; left arrow
181,7 → 174,7
call draw_days
jmp still
.redraw:
mov [focus],5
mov [focus],4
jmp red
nodayselect:
cmp ah,100
250,7 → 243,7
jne noy_dn
year_dec:
dec [Year]
mov [focus],4
mov [focus],3
jmp upd
noy_dn:
cmp ah,4 ; year+1
257,7 → 250,7
jne noy_up
year_inc:
inc [Year]
mov [focus],4
mov [focus],3
jmp upd
noy_up:
cmp ah,5
270,6 → 263,11
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
310,16 → 308,11
 
 
reset:
 
mov eax,3
mcall
mcall 3
mov ecx,eax
shl ecx,16
shr ecx,16
mov eax,22
mov ebx,0x00000000
mcall
 
mcall 22,0x00000000
jmp still
 
plus_hd:
326,7 → 319,6
mcall 3
mov ecx,eax
add ecx,1
mov eax,22
mcall 22,0x00000000
jmp still
 
341,38 → 333,24
mcall 3
mov ecx,eax
sub ecx,1
mov eax,22
mov ebx,0x00000000
mcall
 
mcall 22,0x00000000
jmp still
 
minus_he:
 
mov eax,3
mcall
mcall 3
mov ecx,eax
sub ecx,16
mov eax,22
mov ebx,0x00000000
mcall
 
mcall 22,0x00000000
jmp still
 
plus_md:
 
mov eax,3
mcall
mcall 3
mov ecx,eax
add ecx,256
mov eax,22
mov ebx,0x00000000
mcall
 
mcall 22,0x00000000
jmp still
 
plus_me:
 
mcall 3
mov ecx,eax
add ecx,4096
380,7 → 358,6
jmp still
 
minus_md:
 
mcall 3
mov ecx,eax
sub ecx,256
388,7 → 365,6
jmp still
 
minus_me:
 
mcall 3
mov ecx,eax
sub ecx,4096
396,7 → 372,6
jmp still
 
set_date:
 
mov eax,0x00000000
mov ebx,[day_sel]
call additem
408,20 → 383,15
mov ebx,[Year]
call additem
mov ecx,eax
mov eax,22
mov ebx,1
mcall
 
mcall 22,1
jmp still
 
additem:
 
add eax,1
daa
sub ebx,1
cmp ebx,0
jne additem
 
ret
 
 
550,7 → 520,7
mov ebx,B_SPIN
mov edx,spinner
mov esi,12
ShowFocus 4
mov ecx,COL_DROPDOWN_T
mcall
 
mov edx,[Month]
672,10 → 642,10
mov esi,COL_DATE_BUTTONS
jmp .draw_but
.draw_sel:
mov esi,COL_DATE_CURRENT
cmp [focus],5
mov esi,COL_DATE_INACTIV
cmp [focus],4
jne .draw_but
mov esi,COL_DATE_CHANGED
mov esi,COL_DATE_ACTIVE
.draw_but:
add edx,200+1 shl 29
mcall 8
798,9 → 768,7
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 (todo)
; program data: colors, text, vars
 
; 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_CURRENT equ 0x31A4D0
COL_DATE_CHANGED equ 0xef7840
COL_DATE_INACTIV equ 0x31A4D0
COL_DATE_ACTIVE equ COL_ACTIVE_TEXT
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 5
FOCUSABLE equ 4
 
; multilanguage interface - configuratable in lang.inc
day_count db 3,0,3,2,3,2,3,3,2,3,2,3