diff --git a/programs/develop/libGUI/examples/text/text.asm b/programs/develop/libGUI/examples/text/text.asm index 8ea3047488..dfbdaea0eb 100644 --- a/programs/develop/libGUI/examples/text/text.asm +++ b/programs/develop/libGUI/examples/text/text.asm @@ -96,8 +96,9 @@ start: ;******************Init Text***************** ;******************************************** - mov [Text.type],byte 10000000b + mov [Text.type],byte 10000010b mov [Text.color],0xffffff + mov [Text.background_color],0xff mov [Text.x],5 mov [Text.y],10 mov [Text.length],36 @@ -356,6 +357,7 @@ struc TEXT .y rd 1 .length rd 1 .pointer rd 1 + .background_color rd 1 } Button1 BUTTON diff --git a/programs/develop/libGUI/src/VERSION.INC b/programs/develop/libGUI/src/VERSION.INC index 27869e2645..0237e56095 100644 --- a/programs/develop/libGUI/src/VERSION.INC +++ b/programs/develop/libGUI/src/VERSION.INC @@ -11,6 +11,6 @@ align 4 get_version: xor eax,eax - mov eax,dword 071119 ;07.11.19 + mov eax,dword 071128 ;07.11.28 ret \ No newline at end of file diff --git a/programs/develop/libGUI/src/libGUI.asm b/programs/develop/libGUI/src/libGUI.asm index a8020191cb..31e5550118 100644 --- a/programs/develop/libGUI/src/libGUI.asm +++ b/programs/develop/libGUI/src/libGUI.asm @@ -410,6 +410,7 @@ struc TEXT .y rd 1 .length rd 1 .pointer rd 1 + .background_color rd 1 } struc NUMBER @@ -544,3 +545,4 @@ pointer2 rd 13 IPC_table process_information; rb 1024 colors_table1 rd 15 colors_table2 rd 15 + diff --git a/programs/develop/libGUI/src/text.inc b/programs/develop/libGUI/src/text.inc index 6e5e4d7cb8..0cd73a3c12 100644 --- a/programs/develop/libGUI/src/text.inc +++ b/programs/develop/libGUI/src/text.inc @@ -1,10 +1,11 @@ -tx_control_data_size = 22 +tx_control_data_size = 26 tx_no_show_text = 00000001b +tx_text_and_background = 00000010b tx_redraw_all = 10000000b tx_redraw_all_off = 01111111b -tx_special_redraw_on = 00000100b -tx_special_redraw_off = 11111011b +;tx_special_redraw_on = 00000100b +;tx_special_redraw_off = 11111011b ;**************************************************** ;********************craete Text********************** @@ -95,12 +96,12 @@ text: xor ebx,ebx mov bl,[Text.type] - and bl,tx_special_redraw_on + and bl,activate_trap test bl,bl jz no_special_message_for_text or [Text.type],tx_redraw_all - and [Text.type],tx_special_redraw_off + and [Text.type],deactivate_trap no_special_message_for_text: @@ -127,20 +128,32 @@ text: and [Text.type],tx_redraw_all_off + mov esi,dword Text mov edi,[PointerForText] add edi,control_header_size mov ecx,2 rep movsb + mov ecx,[Text.color] + + xor eax,eax + mov al,[Text.type] + and al,tx_text_and_background + test al,al + jz no_background_color + + mov edi,[Text.background_color] + or ecx,01000000000000000000000000000000b + + no_background_color: + mov eax,4 mov ebx,[Text.x] shl ebx,16 add ebx,[Text.y] - mov ecx,[Text.color] mov edx,[Text.pointer] mov esi,[Text.length] - mov edi,[pointer2+8] mcall no_redraw_text_: diff --git a/programs/develop/libGUI/whats new.txt b/programs/develop/libGUI/whats new.txt index 6d43d84b56..7c328d11ac 100644 --- a/programs/develop/libGUI/whats new.txt +++ b/programs/develop/libGUI/whats new.txt @@ -1,3 +1,13 @@ +28.11.07 + +RUSSIAN + +Добавлена поддержка фонового цвета для control-а Text. + +ENGLISH + +Support of background color for control Text is added. + 19.11.07 RUSSIAN