From ef2476cf2fc85f049e4287db811e609515ecdd55 Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Wed, 10 Feb 2016 23:25:56 +0000 Subject: [PATCH] end: bigger checkbox, no draw overlap git-svn-id: svn://kolibrios.org@6190 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/system/end/light/data.inc | 4 ++-- programs/system/end/light/end.asm | 28 ++++++++++++++++++++++------ 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/programs/system/end/light/data.inc b/programs/system/end/light/data.inc index 6a440b6748..c6151fb0d1 100644 --- a/programs/system/end/light/data.inc +++ b/programs/system/end/light/data.inc @@ -90,14 +90,14 @@ aini_get_int db 'ini_get_int',0 aini_set_int db 'ini_set_int',0 ;--------------------------------------------------------------------- -check1 check_box2 20 shl 16 +8,110 shl 16 +8,6,0xffffff,0,0,label4 +check1 check_box2 20 shl 16 +12,108 shl 16 +12,6,0xffffff,0,0,label4,ch_flag_middle hide db 'h',0 asettings db 'settings',0 aautosave db 'autosave',0 ini_file db '/sys/settings/rdsave.ini',0 -color1 dd 0x019098d0 +color1 dd 0x6068a0 color2 dd 0xFFFFFF color3 dd 0xe4dfe1 diff --git a/programs/system/end/light/end.asm b/programs/system/end/light/end.asm index 6ea19ee00b..df5c7652b2 100644 --- a/programs/system/end/light/end.asm +++ b/programs/system/end/light/end.asm @@ -23,11 +23,26 @@ include '../../../dll.inc' include '../../../develop/libraries/box_lib/load_lib.mac' include '../../../develop/libraries/box_lib/trunk/box_lib.mac' - @use_library +@use_library +macro DrawBar x, y, width, height, color +{ + mcall 13, (x) shl 16 + (width), (y) shl 16 + (height), color +} + +macro DrawRectangle x, y, w, h, color +{ + DrawBar x,y,w,1,color + DrawBar x,y+h,w,1 + DrawBar x,y,1,h + DrawBar x+w,y,1,h+1 +} + + align 4 START: + load_libraries l_libs_start,end_l_libs inc eax test eax,eax @@ -167,8 +182,7 @@ checkbox: jmp still draw_window: - mov al,12 - mcall ,1 + mcall 12,1 mov al,14 mcall ;eax=14 - get screen max x & max y @@ -181,11 +195,13 @@ draw_window: lea ecx,[ecx-70 shl 16+132] xor eax,eax - mcall , , ,[color1],0x01000000 ;define and draw window + mov edx, 0x01000000 + mcall ;define and draw window + DrawRectangle 0,0,332,132,[color1] mov al,13 - mcall ,<0,333> ,<0,133> - mcall ,<1,331>,<1,131>,[color2] + mcall ,<1,331>,<1,1>,[color2] + mcall ,<1,1>,<1,131> mcall ,<2,330>,<2,130>, [color3] mov al,8