Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 7805 → Rev 7806

/programs/cmm/lib/date.h
13,4 → 13,24
word year;
};
 
:void DrawDate(dword x, y, color, in_date)
{
EDI = in_date;
EAX = 47;
EBX = 2<<16;
EDX = x<<16+y;
ESI = 0x90<<24+color;
ECX = EDI.date.day;
$int 0x40;
EDX += 20<<16;
ECX = EDI.date.month;
$int 0x40;
EDX += 20<<16;
EBX = 4<<16;
ECX = EDI.date.year;
$int 0x40;
DrawBar(x+17,y+10,2,2,color);
DrawBar(x+37,y+10,2,2,color);
}
 
#endif
/programs/cmm/lib/gui/checkbox.h
61,17 → 61,17
:void checkbox::draw(dword _x,_y)
{
#define SIZE 14
dword text_col = system.color.work_text;
dword text_col = sc.work_text;
if (!id) id = GetFreeButtonId();
x=_x; y=_y;
 
DefineButton(x-1, y-1, strlen(text)*8 + SIZE + 17, SIZE+2, id+BT_HIDE+BT_NOFRAME, 0);
DrawRectangle(x, y, SIZE, SIZE, system.color.work_graph);
DrawRectangle(x, y, SIZE, SIZE, sc.work_graph);
if (disabled)
{
DrawRectangle(x+1, y+1, SIZE-2, SIZE-2, 0xffffff);
DrawBar(x+2, y+2, SIZE-3, SIZE-3, 0xCCCccc);
text_col = MixColors(system.color.work, system.color.work_text, 128);
text_col = MixColors(sc.work, sc.work_text, 128);
}
else if (checked == false)
{
82,8 → 82,8
{
_PutImage(x+1, y+1, 13, 13, #checkbox_flag);
}
if (text) WriteTextWithBg(x+SIZE+8, SIZE / 2 + y -7, 0xD0, text_col, text, system.color.work);
DrawRectangle3D(x-1,y-1,SIZE+2,SIZE+2,system.color.work_dark,system.color.work_light);
if (text) WriteTextWithBg(x+SIZE+8, SIZE / 2 + y -7, 0xD0, text_col, text, sc.work);
DrawRectangle3D(x-1,y-1,SIZE+2,SIZE+2,sc.work_dark,sc.work_light);
}
 
:void checkbox::redraw()
/programs/cmm/lib/gui/more_less_box.h
49,7 → 49,7
check_values();
x=_x; y=_y;
 
DrawRectangle(x, y, VALUE_FIELD_W+1, SIZE, system.color.work_graph);
DrawRectangle(x, y, VALUE_FIELD_W+1, SIZE, sc.work_graph);
DrawRectangle3D(x+1, y+1, VALUE_FIELD_W-2, SIZE-2, 0xDDDddd, 0xffffff);
 
if (disabled)
56,20 → 56,20
{
DrawRectangle(x+1, y+1, VALUE_FIELD_W-2, SIZE-2, 0xffffff);
DrawBar(x+2, y+2, VALUE_FIELD_W-3, SIZE-3, 0xCCCccc);
text_col = system.color.work_graph;
text_col = sc.work_graph;
}
else
{
DrawBar(x+2, y+2, VALUE_FIELD_W-3, SIZE-3, 0xffffff);
text_col = system.color.work_text;
text_col = sc.work_text;
}
 
WriteText( -strlen(value_text)+3*8 + x+6, SIZE / 2 + y -6, 0x90, 0x333333, value_text);
 
DrawCaptButton(VALUE_FIELD_W + x + 1, y, SIZE, SIZE, id_inc, system.color.work_button, system.color.work_button_text, "+");
DrawCaptButton(VALUE_FIELD_W + x + SIZE, y, SIZE, SIZE, id_dec, system.color.work_button, system.color.work_button_text, "-");
WriteTextWithBg(x+VALUE_FIELD_W+SIZE+SIZE+10, SIZE / 2 + y -7, 0xD0, text_col, text, system.color.work);
DrawRectangle3D(x-1,y-1,VALUE_FIELD_W+SIZE+SIZE+2,SIZE+2,system.color.work_dark,system.color.work_light);
DrawCaptButton(VALUE_FIELD_W + x + 1, y, SIZE, SIZE, id_inc, sc.button, sc.button_text, "+");
DrawCaptButton(VALUE_FIELD_W + x + SIZE, y, SIZE, SIZE, id_dec, sc.button, sc.button_text, "-");
WriteTextWithBg(x+VALUE_FIELD_W+SIZE+SIZE+10, SIZE / 2 + y -7, 0xD0, text_col, text, sc.work);
DrawRectangle3D(x-1,y-1,VALUE_FIELD_W+SIZE+SIZE+2,SIZE+2,sc.work_dark,sc.work_light);
}
 
:void more_less_box::redraw()
/programs/cmm/lib/gui/sensor.h
23,8 → 23,8
 
:void sensor::draw_wrapper()
{
DrawRectangle(x-1, y-1, w+1, h+1, system.color.work_graph);
DrawRectangle3D(x-2, y-2, w+3, h+3, system.color.work_dark, system.color.work_light);
DrawRectangle(x-1, y-1, w+1, h+1, sc.work_graph);
DrawRectangle3D(x-2, y-2, w+3, h+3, sc.work_dark, sc.work_light);
}
 
:void sensor::draw_progress(dword progress_w, active_value, bg_value, mesure)
34,7 → 34,7
 
DrawBar(x, y, w-progress_w, 1, MixColors(PROGRESS_ACTIVE, PROGRESS_BG, 200));
DrawBar(x, y+1, w-progress_w, h-2, PROGRESS_ACTIVE);
DrawBar(x, y+h-1, w-progress_w, 1, MixColors(PROGRESS_ACTIVE, system.color.work_graph, 200));
DrawBar(x, y+h-1, w-progress_w, 1, MixColors(PROGRESS_ACTIVE, sc.work_graph, 200));
 
sprintf(#param, "%i%s", active_value, mesure);
WriteText(w-progress_w- calc(strlen(#param)*8) /2 + x, h/2-7+y, 0x90, PROGRESS_BG, #param);
/programs/cmm/lib/gui/tabs.h
13,8 → 13,8
 
:void _tabs::draw_wrapper()
{
DrawRectangle(x,y+TAB_HEIGHT,w-1,h-TAB_HEIGHT, system.color.work_graph);
DrawRectangle(x+1,y+1+TAB_HEIGHT,w-3,h-2-TAB_HEIGHT, system.color.work_light);
DrawRectangle(x,y+TAB_HEIGHT,w-1,h-TAB_HEIGHT, sc.work_graph);
DrawRectangle(x+1,y+1+TAB_HEIGHT,w-3,h-2-TAB_HEIGHT, sc.work_light);
}
 
:void _tabs::draw_button(dword xx, but_id, text)
25,12 → 25,12
if (but_id==active_tab)
{
col_bg=0xE44C9C;
col_text=system.color.work_text;
col_text=sc.work_text;
}
else
{
col_bg=0xC3A1B7;
col_text= MixColors(system.color.work, system.color.work_text, 120);
col_text= MixColors(sc.work, sc.work_text, 120);
}
DefineHiddenButton(xx-2,y, ww-1+4,hh-1, but_id);
WriteText(xx, y+6, 0x90, col_text, text);
/programs/cmm/lib/gui.h
87,17 → 87,17
int ty = y + padding_v+1;
int tw = strlen(text)*8;
int w = tw + padding_h + padding_h;
unsigned darker_color = MixColors(system.color.work_button,0,230);
unsigned darker_color = MixColors(sc.button,0,230);
 
 
if (id>0) DefineButton(x,y,w,h,id,system.color.work_button);
if (id>0) DefineButton(x,y,w,h,id,sc.button);
 
WriteText(tx+1,ty+1,0x90,darker_color,text);
WriteText(tx,ty,0x90,system.color.work_button_text,text);
WriteText(tx,ty,0x90,sc.button_text,text);
 
if (active_button_id==id) {
DrawBar(tx,ty+15,tw,1, darker_color);
DrawBar(tx,ty+14,tw,1, system.color.work_button_text);
DrawBar(tx,ty+14,tw,1, sc.button_text);
}
 
return w + right_margin;
146,8 → 146,8
if (ESI.edit_box.flags & 100000000000b) bg = 0xCACACA; else bg = 0xFFFfff;
edit_box_draw stdcall (edit_box_pointer);
DrawRectangle3D(x-1, y-1, w+1, h+1, 0xE7E7E7, bg);
DrawRectangle(x-2, y-2, w+3, h+3, system.color.work_graph);
DrawRectangle3D(x-3, y-3, w+5, h+5, system.color.work_dark, system.color.work_light);
DrawRectangle(x-2, y-2, w+3, h+3, sc.work_graph);
DrawRectangle3D(x-3, y-3, w+5, h+5, sc.work_dark, sc.work_light);
}
 
#define DOT_W 37
163,11 → 163,11
if (ESI.edit_box.flags & 100000000000b) bg = 0xCACACA; else bg = 0xFFFfff;
edit_box_draw stdcall (edit_box_pointer);
DrawRectangle3D(x-1, y-1, w+1, h+1, 0xE7E7E7, bg);
DrawRectangle(x-2, y-2, w+3, h+3, system.color.work_graph);
DrawRectangle3D(x-3, y-3, w+DOT_W+5, h+5, system.color.work_dark, system.color.work_light);
DrawRectangle(x-2, y-2, w+3, h+3, sc.work_graph);
DrawRectangle3D(x-3, y-3, w+DOT_W+5, h+5, sc.work_dark, sc.work_light);
 
WriteText(x-2, y-19, 0x90, system.color.work_text, title);
DrawCaptButton(x+w+1, y-2, DOT_W, h+3, btn, system.color.work_button, system.color.work_button_text, "...");
WriteText(x-2, y-19, 0x90, sc.work_text, title);
DrawCaptButton(x+w+1, y-2, DOT_W, h+3, btn, sc.button, sc.button_text, "...");
}
 
:void DrawEditBoxPos(dword x,y, edit_box_pointer)
229,9 → 229,9
 
:void Draw3DPopup(dword x,y,w,h)
{
DrawRectangle3D(x,y,w,h, system.color.work_dark, system.color.work_graph);
DrawBar(x+1,y+1,w-1,1,system.color.work_light);
DrawBar(x+1,y+2,1,h-2,system.color.work_light);
DrawRectangle3D(x,y,w,h, sc.work_dark, sc.work_graph);
DrawBar(x+1,y+1,w-1,1,sc.work_light);
DrawBar(x+1,y+2,1,h-2,sc.work_light);
DrawPopupShadow(x,y,w,h-1,0);
}
 
302,7 → 302,7
:bool skin_is_dark()
{
dword gray;
dword color_image = #system.color.work;
dword color_image = #sc.work;
 
gray = DSBYTE[color_image]*DSBYTE[color_image];
gray += DSBYTE[color_image+1]*DSBYTE[color_image+1];
/programs/cmm/lib/kolibri.h
519,6 → 519,7
 
:void PutPaletteImage(dword inbuf,w,h,x,y,bits,pal)
{
if (h<1) || (w<0) return;
EAX = 65;
EBX = inbuf;
ECX = w<<16+h;
641,26 → 642,6
 
:byte skin_height;
 
:void DrawDate(dword x, y, color, in_date)
{
EDI = in_date;
EAX = 47;
EBX = 2<<16;
EDX = x<<16+y;
ESI = 0x90<<24+color;
ECX = EDI.date.day;
$int 0x40;
EDX += 20<<16;
ECX = EDI.date.month;
$int 0x40;
EDX += 20<<16;
EBX = 4<<16;
ECX = EDI.date.year;
$int 0x40;
DrawBar(x+17,y+10,2,2,color);
DrawBar(x+37,y+10,2,2,color);
}
 
dword __generator; // random number generator init
 
//The initialization of the initial data before running
670,7 → 651,7
screen.width = GetScreenWidth()+1;
screen.height = GetScreenHeight()+1;
__generator = GetStartTime();
mem_init();
//mem_init();
main();
}
______STOP______:
/programs/cmm/lib/obj/box_lib.h
219,10 → 219,10
:frame frame123 = { 0, 260, 10, 60, 16, NULL, 0xFFFfff, 1, NULL, 0, 1, 12, 0x000111, 0xCCCccc };
:void DrawFrame(dword x,y,w,h,text)
{
frame123.font_color = system.color.work_text;
frame123.ext_col = system.color.work_graph;
frame123.int_col = system.color.work_light;
frame123.font_backgr_color = system.color.work;
frame123.font_color = sc.work_text;
frame123.ext_col = sc.work_graph;
frame123.int_col = sc.work_light;
frame123.font_backgr_color = sc.work;
 
frame123.start_x = x;
frame123.start_y = y;
/programs/cmm/lib/patterns/select_list.h
53,15 → 53,15
void SelectList_DrawBorder() {
DrawRectangle3D(select_list.x-2, select_list.y-2,
select_list.w+3+scroll1.size_x, select_list.h+3,
system.color.work_dark, system.color.work_light);
DrawRectangle(select_list.x-1, select_list.y-1, select_list.w+1+scroll1.size_x, select_list.h+1, system.color.work_graph);
sc.work_dark, sc.work_light);
DrawRectangle(select_list.x-1, select_list.y-1, select_list.w+1+scroll1.size_x, select_list.h+1, sc.work_graph);
}
 
void SelectList_DrawScroller()
{
scroll1.bckg_col = MixColors(system.color.work, 0xBBBbbb, 80);
scroll1.frnt_col = MixColors(system.color.work,0xFFFfff,120);
scroll1.line_col = system.color.work_graph;
scroll1.bckg_col = MixColors(sc.work, 0xBBBbbb, 80);
scroll1.frnt_col = MixColors(sc.work,0xFFFfff,120);
scroll1.line_col = sc.work_graph;
 
scroll1.max_area = select_list.count;
scroll1.cur_area = select_list.visible;
/programs/cmm/lib/patterns/toolbar_button.h
7,8 → 7,8
if (!semi_white) {
Libimg_LoadImage(#top_icons, "/sys/icons16.png");
 
semi_white = MixColors(system.color.work, 0xFFFfff, skin_is_dark()*90 + 96);
bg_col_dark = MixColors(system.color.work, system.color.work_graph, 90);
semi_white = MixColors(sc.work, 0xFFFfff, skin_is_dark()*90 + 96);
bg_col_dark = MixColors(sc.work, sc.work_graph, 90);
bg_col_light = MixColors(semi_white, 0xFFFfff, skin_is_dark()*90 + 10);
 
Libimg_ReplaceColor(top_icons.image, top_icons.w, top_icons.h, 0xffFFFfff, semi_white);
16,7 → 16,7
}
 
DrawWideRectangle(_x+1, _y+1, TSZE, TSZE, 5, semi_white);
DrawOvalBorder(_x, _y, TSZE, TSZE, bg_col_light, bg_col_dark, semi_white, system.color.work);
DrawOvalBorder(_x, _y, TSZE, TSZE, bg_col_light, bg_col_dark, semi_white, sc.work);
 
DefineHiddenButton(_x, _y, TSZE+1, TSZE+1, _button_id);
if (_icon_n==-1) {
/programs/cmm/lib/system.h
14,7 → 14,7
work_text,
work_graph;
void get();
};
} sc;
 
:void COLORS::get()
{
25,9 → 25,4
$int 0x40
}
 
:struct SYSTEM
{
COLORS color;
} system;
 
#endif