Calendar 1.45: highlight current date

git-svn-id: svn://kolibrios.org@3892 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2013-09-06 17:06:53 +00:00
parent 6d61491177
commit 9c5d2fc3fc
2 changed files with 17 additions and 15 deletions

View File

@ -1,6 +1,6 @@
; Calendar for KolibriOS
;
; v1.2 - v1.4 - new desighn and functionality by Leency
; v1.2 - v1.45 - new desighn and functionality 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
@ -714,14 +714,13 @@ draw_days:
cmp [focus],4
jne .not_active
DrawRect COL_DATE_ACTIVE_1,COL_DATE_ACTIVE_2,COL_DATE_ACTIVE_3,COL_DATE_ACTIVE_4
jmp .after_draw_but
jmp .out
.not_active:
DrawRect COL_DATE_INACTIVE_1,COL_DATE_INACTIVE_2,COL_DATE_INACTIVE_3,COL_DATE_INACTIVE_4
jmp .after_draw_but
jmp .out
.draw_but: ;draw non selected button
add edx,200+1 shl 29
mcall 8
.after_draw_but:
mov eax,[Year]
cmp [curYear],eax
jne .out
@ -731,10 +730,13 @@ draw_days:
mov eax,[number]
cmp [curDay],eax
jne .out
;DrawRect COL_DATE_INACTIVE_1,COL_DATE_INACTIVE_2,COL_DATE_INACTIVE_3,COL_DATE_INACTIVE_4
mov edx,0xff0000
mov bx,DATE_BUTTON_WIDTH-2
mov cx,2
add ebx,1 shl 16
add ecx,27 shl 16
mcall 13
.out:
mov eax, [number]
xor edx, edx
mov ecx, 10

View File

@ -19,14 +19,14 @@ COL_DROPDOWN_BG equ 0x666666
COL_DROPDOWN_T equ 0x10CCCccc
COL_NEW_STYLE_T equ 0xef3333
COL_DATE_INACTIVE_1 equ 0x1585B8
COL_DATE_INACTIVE_2 equ 0x4EA4CA
COL_DATE_INACTIVE_3 equ 0x5FB2D6
COL_DATE_INACTIVE_4 equ 0x81C1DE
COL_DATE_ACTIVE_1 equ 0xBB8C00
COL_DATE_ACTIVE_2 equ 0xEAB10F
COL_DATE_ACTIVE_3 equ 0xF7C22D
COL_DATE_ACTIVE_4 equ 0xF7CB4B
COL_DATE_INACTIVE_1 equ 0x1379A8
COL_DATE_INACTIVE_2 equ 0x53ACD1
COL_DATE_INACTIVE_3 equ 0x7CC0DC
COL_DATE_INACTIVE_4 equ 0xABD7E8
COL_DATE_ACTIVE_1 equ 0xB17A00
COL_DATE_ACTIVE_2 equ 0xEDA700
COL_DATE_ACTIVE_3 equ 0xFFCC00
COL_DATE_ACTIVE_4 equ 0xFFE56B
remainder dd 1
quotient dd 1