tinypad: no optim_save by default

eolite: fix crash on put image h<1
cmm: rename colors to the short one "sc"

git-svn-id: svn://kolibrios.org@7806 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2020-04-17 23:52:24 +00:00
parent 610a0f5c6e
commit 2eda7fed5c
57 changed files with 418 additions and 427 deletions

View File

@ -208,18 +208,18 @@ int DrawMenuButton(dword x,y,id,text)
int textlen = strlen(text)*8; int textlen = strlen(text)*8;
int padding = 12; int padding = 12;
DefineHiddenButton(x, y, textlen+padding+padding, TOPPANELH-2, id); DefineHiddenButton(x, y, textlen+padding+padding, TOPPANELH-2, id);
WriteText(x+padding,y+4, 0x90, MixColors(system.color.work, system.color.work_text, 70), text); WriteText(x+padding,y+4, 0x90, MixColors(sc.work, sc.work_text, 70), text);
return textlen+padding+padding; return textlen+padding+padding;
} }
void draw_window() void draw_window()
{ {
system.color.get(); sc.get();
DefineAndDrawWindow(screen.width-WIN_W/2,screen.height-WIN_H/2,WIN_W,WIN_H,0x73,0xFFFFFF,#win_title,0); DefineAndDrawWindow(screen.width-WIN_W/2,screen.height-WIN_H/2,WIN_W,WIN_H,0x73,0xFFFFFF,#win_title,0);
GetProcessInfo(#Form, SelfInfo); GetProcessInfo(#Form, SelfInfo);
DrawBar(0, 0, Form.cwidth, TOPPANELH-1, system.color.work); DrawBar(0, 0, Form.cwidth, TOPPANELH-1, sc.work);
DrawBar(0, TOPPANELH-1, Form.cwidth, 1, system.color.work_dark); DrawBar(0, TOPPANELH-1, Form.cwidth, 1, sc.work_dark);
DrawBar(0, Form.cheight-BOTPANELH, Form.cwidth, BOTPANELH, system.color.work); DrawBar(0, Form.cheight-BOTPANELH, Form.cwidth, BOTPANELH, sc.work);
menu_encoding_x = menu_file_x + DrawMenuButton(menu_file_x, 0, MENU_ID_FILE, MENU1); menu_encoding_x = menu_file_x + DrawMenuButton(menu_file_x, 0, MENU_ID_FILE, MENU1);
menu_reopen_x = menu_encoding_x + DrawMenuButton(menu_encoding_x, 0, MENU_ID_ENCODING, MENU2); menu_reopen_x = menu_encoding_x + DrawMenuButton(menu_encoding_x, 0, MENU_ID_ENCODING, MENU2);

View File

@ -479,7 +479,7 @@ void draw_window()
if (Form.width < 200) { MoveSize(OLD,OLD,200,OLD); return; } if (Form.width < 200) { MoveSize(OLD,OLD,200,OLD); return; }
if (Form.height < 200) { MoveSize(OLD,OLD,OLD,200); return; } if (Form.height < 200) { MoveSize(OLD,OLD,OLD,200); return; }
system.color.get(); sc.get();
list.SetSizes(0, TOOLBAR_H, Form.cwidth-scroll.size_x-1, list.SetSizes(0, TOOLBAR_H, Form.cwidth-scroll.size_x-1,
Form.cheight-TOOLBAR_H-STATUSBAR_H, kfont.size.pt+4); Form.cheight-TOOLBAR_H-STATUSBAR_H, kfont.size.pt+4);
@ -544,14 +544,14 @@ void DrawAddressBox()
PathShow_data status_text = {0, 17,250, 6, 250, 0, 0, 0x0, 0xFFFfff, 0, NULL, 0}; PathShow_data status_text = {0, 17,250, 6, 250, 0, 0, 0x0, 0xFFFfff, 0, NULL, 0};
void DrawStatusBar(dword _status_text) void DrawStatusBar(dword _status_text)
{ {
DrawBar(0,Form.cheight - STATUSBAR_H, Form.cwidth,STATUSBAR_H, system.color.work); DrawBar(0,Form.cheight - STATUSBAR_H, Form.cwidth,STATUSBAR_H, sc.work);
DrawBar(0,Form.cheight - STATUSBAR_H, Form.cwidth,1, 0x8C8C8C); DrawBar(0,Form.cheight - STATUSBAR_H, Form.cwidth,1, 0x8C8C8C);
if (_status_text) { if (_status_text) {
status_text.start_x = 7; status_text.start_x = 7;
status_text.start_y = Form.cheight - STATUSBAR_H + 3; status_text.start_y = Form.cheight - STATUSBAR_H + 3;
status_text.area_size_x = Form.cwidth - status_text.start_x -3; status_text.area_size_x = Form.cwidth - status_text.start_x -3;
status_text.font_color = system.color.work_text; status_text.font_color = sc.work_text;
status_text.text_pointer = _status_text; status_text.text_pointer = _status_text;
PathShow_prepare stdcall(#status_text); PathShow_prepare stdcall(#status_text);
PathShow_draw stdcall(#status_text); PathShow_draw stdcall(#status_text);

View File

@ -103,16 +103,16 @@ void draw_window()
{ {
incn y; incn y;
y.n=0; y.n=0;
system.color.get(); sc.get();
DefineAndDrawWindow(screen.width-570/2, 100, 570, 300+skin_height, 0x34, system.color.work, WINDOW_TITLE_TEXT,0); DefineAndDrawWindow(screen.width-570/2, 100, 570, 300+skin_height, 0x34, sc.work, WINDOW_TITLE_TEXT,0);
GetProcessInfo(#Form, SelfInfo); GetProcessInfo(#Form, SelfInfo);
WriteTextB(CONX+2,y.inc(20)+2,0x81,MixColors(system.color.work, 0xB92234,220),CONTENT_HEADER_TEXT); WriteTextB(CONX+2,y.inc(20)+2,0x81,MixColors(sc.work, 0xB92234,220),CONTENT_HEADER_TEXT);
WriteTextB(CONX,y.n,0x81,0xB92234,CONTENT_HEADER_TEXT); WriteTextB(CONX,y.n,0x81,0xB92234,CONTENT_HEADER_TEXT);
PutPaletteImage(#scr,144,171,Form.cwidth-180,y.n,8,#scr_pal); PutPaletteImage(#scr,144,171,Form.cwidth-180,y.n,8,#scr_pal);
DrawRectangle(Form.cwidth-180-1,y.n-1, 144+1,171+1, system.color.work_graph); DrawRectangle(Form.cwidth-180-1,y.n-1, 144+1,171+1, sc.work_graph);
WriteTextLines(CONX,y.inc(50),0x90,system.color.work_text,DESCRIPTION_TEXT,20); WriteTextLines(CONX,y.inc(50),0x90,sc.work_text,DESCRIPTION_TEXT,20);
DrawButtons(); DrawButtons();
} }

View File

@ -181,8 +181,8 @@ void main()
void draw_window() void draw_window()
{ {
system.color.get(); sc.get();
DefineAndDrawWindow(screen.width-600/2,80,630,504+skin_height,0x34,system.color.work,WINDOW_HEADER,0); DefineAndDrawWindow(screen.width-600/2,80,630,504+skin_height,0x34,sc.work,WINDOW_HEADER,0);
GetProcessInfo(#Form, SelfInfo); GetProcessInfo(#Form, SelfInfo);
IF (Form.status_window>=2) return; IF (Form.status_window>=2) return;
DrawWindowContent(); DrawWindowContent();
@ -193,7 +193,7 @@ void DrawWindowContent()
int id; int id;
int list_w; int list_w;
system.color.get(); sc.get();
if (tabs.active_tab == SKINS) list_w=250; else list_w=350; if (tabs.active_tab == SKINS) list_w=250; else list_w=350;
@ -222,7 +222,7 @@ void DrawWindowContent()
SelectList_Draw(); SelectList_Draw();
SelectList_DrawBorder(); SelectList_DrawBorder();
//DrawWideRectangle(0, 0, Form.cwidth, Form.cheight, LP, system.color.work); //DrawWideRectangle(0, 0, Form.cwidth, Form.cheight, LP, sc.work);
if (tabs.active_tab == SKINS) if (tabs.active_tab == SKINS)
{ {
@ -278,8 +278,8 @@ void SelectList_DrawLine(dword i)
if (select_list.cur_y-select_list.first==i) if (select_list.cur_y-select_list.first==i)
{ {
DrawBar(select_list.x, yyy, select_list.w, select_list.item_h, system.color.work_button); DrawBar(select_list.x, yyy, select_list.w, select_list.item_h, sc.button);
WriteText(select_list.x+12,yyy+select_list.text_y,select_list.font_type,system.color.work_button_text, #temp_filename); WriteText(select_list.x+12,yyy+select_list.text_y,select_list.font_type,sc.button_text, #temp_filename);
} }
else else
{ {

View File

@ -13,9 +13,9 @@ void DrawUiElementsPreview(dword x,y,h)
incn y2; incn y2;
y2.n = y; y2.n = y;
spinbox1.draw(x, y2.inc(30)); spinbox1.draw(x, y2.inc(30));
WriteText(x, y2.inc(30), 0x90, system.color.work_text, "C-- Edit"); WriteText(x, y2.inc(30), 0x90, sc.work_text, "C-- Edit");
DrawEditBoxPos(x, y2.inc(20), #edit_cmm); DrawEditBoxPos(x, y2.inc(20), #edit_cmm);
WriteText(x, y2.inc(35), 0x90, system.color.work_text, "Strandard Edit"); WriteText(x, y2.inc(35), 0x90, sc.work_text, "Strandard Edit");
DrawStEditBoxPos(x, y2.inc(20), #edit_st); DrawStEditBoxPos(x, y2.inc(20), #edit_st);
DrawStandartCaptButton(x, y+h-40, GetFreeButtonId(), "Button1"); DrawStandartCaptButton(x, y+h-40, GetFreeButtonId(), "Button1");
DrawStandartCaptButton(x+100, y+h-40, GetFreeButtonId(), "Button2"); DrawStandartCaptButton(x+100, y+h-40, GetFreeButtonId(), "Button2");
@ -23,8 +23,8 @@ void DrawUiElementsPreview(dword x,y,h)
:void DrawStEditBoxPos(dword x,y, edit_box_pointer) :void DrawStEditBoxPos(dword x,y, edit_box_pointer)
{ {
dword c_inactive = MixColors(system.color.work_graph, system.color.work, 128); dword c_inactive = MixColors(sc.work_graph, sc.work, 128);
dword c_active = MixColors(system.color.work_graph, 0, 128); dword c_active = MixColors(sc.work_graph, 0, 128);
ESI = edit_box_pointer; ESI = edit_box_pointer;
ESI.edit_box.left = x; ESI.edit_box.left = x;
ESI.edit_box.top = y; ESI.edit_box.top = y;

View File

@ -146,8 +146,8 @@ void main()
break; break;
case evReDraw: case evReDraw:
system.color.get(); sc.get();
DefineAndDrawWindow(130, 150, 465, 398 + skin_height, 0x34, system.color.work, WINDOW_TITLE, 0); DefineAndDrawWindow(130, 150, 465, 398 + skin_height, 0x34, sc.work, WINDOW_TITLE, 0);
GetProcessInfo(#Form, SelfInfo); GetProcessInfo(#Form, SelfInfo);
if (Form.status_window>2) break; if (Form.status_window>2) break;
DrawWindowContent(); DrawWindowContent();
@ -170,7 +170,7 @@ void DrawWindowContent()
y.n = frame_y; y.n = frame_y;
DefineButton(22, y.inc(18), PIMG_W-1, PIMG_H-1, 100 + BT_HIDE, 0); DefineButton(22, y.inc(18), PIMG_W-1, PIMG_H-1, 100 + BT_HIDE, 0);
DrawPanelsImage(y.n, tbAttachment); DrawPanelsImage(y.n, tbAttachment);
WriteTextWithBg(68, y.inc(7), 0xD0, system.color.work_text, CHANGE_POS, system.color.work); WriteTextWithBg(68, y.inc(7), 0xD0, sc.work_text, CHANGE_POS, sc.work);
tbSoftenUp.draw(22, y.inc(35)); tbSoftenUp.draw(22, y.inc(35));
tbClock.draw(win_center_x, y.n); tbClock.draw(win_center_x, y.n);
tbSoftenDown.draw(22, y.inc(24)); tbSoftenDown.draw(22, y.inc(24));
@ -188,7 +188,7 @@ void DrawWindowContent()
frame_y = calc(y.inc(20)); frame_y = calc(y.inc(20));
DefineButton(22, y.inc(18), PIMG_W-1, PIMG_H-1, 200 + BT_HIDE, 0); DefineButton(22, y.inc(18), PIMG_W-1, PIMG_H-1, 200 + BT_HIDE, 0);
DrawPanelsImage(y.n, dkLocation+1); DrawPanelsImage(y.n, dkLocation+1);
WriteTextWithBg(68, y.inc(7), 0xD0, system.color.work_text, CHANGE_POS, system.color.work); WriteTextWithBg(68, y.inc(7), 0xD0, sc.work_text, CHANGE_POS, sc.work);
dkFsize.draw(22, y.inc(35)); dkFsize.draw(22, y.inc(35));
dkAshow.draw(win_center_x, y.n); dkAshow.draw(win_center_x, y.n);
DrawFrame(PD, frame_y, Form.cwidth-PD-PD, Form.cheight-frame_y-PD, DOCK_FRAME_T); DrawFrame(PD, frame_y, Form.cwidth-PD-PD, Form.cheight-frame_y-PD, DOCK_FRAME_T);

View File

@ -210,7 +210,7 @@ void main()
GetScreenHeight()-700/2-random(80),800,700,0x73,0,0,0); GetScreenHeight()-700/2-random(80),800,700,0x73,0,0,0);
GetProcessInfo(#Form, SelfInfo); GetProcessInfo(#Form, SelfInfo);
ProcessMenuClick(); ProcessMenuClick();
system.color.get(); sc.get();
if (Form.status_window>2) break; if (Form.status_window>2) break;
if (Form.height<120) { MoveSize(OLD,OLD,OLD,120); break; } if (Form.height<120) { MoveSize(OLD,OLD,OLD,120); break; }
if (Form.width<280) { MoveSize(OLD,OLD,280,OLD); break; } if (Form.width<280) { MoveSize(OLD,OLD,280,OLD); break; }
@ -307,19 +307,19 @@ void draw_window()
int i; int i;
SetElementSizes(); SetElementSizes();
DrawBar(0,0, Form.cwidth,PADDING, system.color.work); DrawBar(0,0, Form.cwidth,PADDING, sc.work);
DrawBar(0,PADDING+TSZE+1, Form.cwidth,PADDING-1, system.color.work); DrawBar(0,PADDING+TSZE+1, Form.cwidth,PADDING-1, sc.work);
DrawBar(0,TOOLBAR_H-2, Form.cwidth,1, MixColors(system.color.work_dark, system.color.work, 180)); DrawBar(0,TOOLBAR_H-2, Form.cwidth,1, MixColors(sc.work_dark, sc.work, 180));
DrawBar(0,TOOLBAR_H-1, Form.cwidth,1, system.color.work_graph); DrawBar(0,TOOLBAR_H-1, Form.cwidth,1, sc.work_graph);
DrawBar(0, PADDING, address_box.left-2, TSZE+1, system.color.work); DrawBar(0, PADDING, address_box.left-2, TSZE+1, sc.work);
DrawBar(address_box.left+address_box.width+18, PADDING, Form.cwidth-address_box.left-address_box.width-18, TSZE+1, system.color.work); DrawBar(address_box.left+address_box.width+18, PADDING, Form.cwidth-address_box.left-address_box.width-18, TSZE+1, sc.work);
DrawTopPanelButton(BACK_BUTTON, PADDING-1, PADDING, 30); DrawTopPanelButton(BACK_BUTTON, PADDING-1, PADDING, 30);
DrawTopPanelButton(FORWARD_BUTTON, PADDING+TSZE+PADDING-2, PADDING, 31); DrawTopPanelButton(FORWARD_BUTTON, PADDING+TSZE+PADDING-2, PADDING, 31);
DrawTopPanelButton(SANDWICH_BUTTON, Form.cwidth-PADDING-TSZE-3, PADDING, -1); DrawTopPanelButton(SANDWICH_BUTTON, Form.cwidth-PADDING-TSZE-3, PADDING, -1);
for (i=0; i<=2; i++) DrawBar(Form.cwidth-PADDING-TSZE+3, i*5+PADDING+7, 15, 3, system.color.work_graph); for (i=0; i<=2; i++) DrawBar(Form.cwidth-PADDING-TSZE+3, i*5+PADDING+7, 15, 3, sc.work_graph);
DrawBar(0,Form.cheight - STATUSBAR_H, Form.cwidth,1, system.color.work_graph); DrawBar(0,Form.cheight - STATUSBAR_H, Form.cwidth,1, sc.work_graph);
DrawRectangle(WB1.list.x + WB1.list.w, WB1.list.y, scroll_wv.size_x, DrawRectangle(WB1.list.x + WB1.list.w, WB1.list.y, scroll_wv.size_x,
WB1.list.h-1, scroll_wv.bckg_col); WB1.list.h-1, scroll_wv.bckg_col);
@ -859,12 +859,12 @@ void EventUpdateBrowser()
void DrawStatusBar(dword _status_text) void DrawStatusBar(dword _status_text)
{ {
status_text.font_color = system.color.work_text; status_text.font_color = sc.work_text;
status_text.start_x = 10; status_text.start_x = 10;
status_text.start_y = Form.cheight - STATUSBAR_H + 4; status_text.start_y = Form.cheight - STATUSBAR_H + 4;
status_text.area_size_x = Form.cwidth - status_text.start_x -3 - 70; status_text.area_size_x = Form.cwidth - status_text.start_x -3 - 70;
//DrawBar(status_text.start_x, status_text.start_y, status_text.area_size_x, 9, system.color.work); //DrawBar(status_text.start_x, status_text.start_y, status_text.area_size_x, 9, sc.work);
DrawBar(0,Form.cheight - STATUSBAR_H+1, Form.cwidth,STATUSBAR_H-1, system.color.work); DrawBar(0,Form.cheight - STATUSBAR_H+1, Form.cwidth,STATUSBAR_H-1, sc.work);
if (_status_text) { if (_status_text) {
status_text.text_pointer = _status_text; status_text.text_pointer = _status_text;
PathShow_prepare stdcall(#status_text); PathShow_prepare stdcall(#status_text);
@ -873,15 +873,15 @@ void DrawStatusBar(dword _status_text)
DefineHiddenButton(status_text.start_x+status_text.area_size_x+10, status_text.start_y-3, DefineHiddenButton(status_text.start_x+status_text.area_size_x+10, status_text.start_y-3,
60, 12, CHANGE_ENCODING); 60, 12, CHANGE_ENCODING);
WriteTextCenter(status_text.start_x+status_text.area_size_x+10, WriteTextCenter(status_text.start_x+status_text.area_size_x+10,
status_text.start_y, 60, system.color.work_text, WB1.cur_encoding*10+#charsets); status_text.start_y, 60, sc.work_text, WB1.cur_encoding*10+#charsets);
} }
void DrawOmnibox() void DrawOmnibox()
{ {
int imgxoff; int imgxoff;
DrawOvalBorder(address_box.left-2, address_box.top-3, address_box.width+18, 24, system.color.work_graph, DrawOvalBorder(address_box.left-2, address_box.top-3, address_box.width+18, 24, sc.work_graph,
system.color.work_graph, system.color.work_graph, system.color.work_dark); sc.work_graph, sc.work_graph, sc.work_dark);
DrawBar(address_box.left-1, address_box.top-2, address_box.width+18, 1, 0xD8DCD8); DrawBar(address_box.left-1, address_box.top-2, address_box.width+18, 1, 0xD8DCD8);
DrawBar(address_box.left-1, address_box.top-1, address_box.width+18, 1, address_box.color); DrawBar(address_box.left-1, address_box.top-1, address_box.width+18, 1, address_box.color);
DrawBar(address_box.left-1, address_box.top, 1, 22, address_box.color); DrawBar(address_box.left-1, address_box.top, 1, 22, address_box.color);

View File

@ -40,8 +40,8 @@ void Downloader()
downloader_opened = true; downloader_opened = true;
SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER + EVM_STACK); SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER + EVM_STACK);
system.color.get(); sc.get();
pb.frame_color = system.color.work_dark; pb.frame_color = sc.work_dark;
filepath[0] = NULL; filepath[0] = NULL;
@ -66,7 +66,7 @@ void Downloader()
break; break;
case evReDraw: case evReDraw:
DefineAndDrawWindow(215, 100, 580, 130, 0x74, system.color.work, DL_WINDOW_HEADER, 0); DefineAndDrawWindow(215, 100, 580, 130, 0x74, sc.work, DL_WINDOW_HEADER, 0);
GetProcessInfo(#DL_Form, SelfInfo); GetProcessInfo(#DL_Form, SelfInfo);
if (DL_Form.status_window>2) break; if (DL_Form.status_window>2) break;
if (DL_Form.height<120) MoveSize(OLD,OLD,OLD,120); if (DL_Form.height<120) MoveSize(OLD,OLD,OLD,120);
@ -111,7 +111,7 @@ void DL_Draw_Window()
{ {
int but_x = 0; int but_x = 0;
int but_y = 58; int but_y = 58;
DrawBar(0,0, DL_Form.cwidth, DL_Form.cheight, system.color.work); DrawBar(0,0, DL_Form.cwidth, DL_Form.cheight, sc.work);
DeleteButton(301); DeleteButton(301);
DeleteButton(302); DeleteButton(302);
DeleteButton(305); DeleteButton(305);
@ -130,7 +130,7 @@ void DL_Draw_Window()
DrawStandartCaptButton(DL_Form.width - 190, but_y, 302, STOP_DOWNLOADING); DrawStandartCaptButton(DL_Form.width - 190, but_y, 302, STOP_DOWNLOADING);
DrawDownloading(); DrawDownloading();
} }
WriteText(CONX, ed.top + 4, 0x90, system.color.work_text, "URL:"); WriteText(CONX, ed.top + 4, 0x90, sc.work_text, "URL:");
ed.width = DL_Form.cwidth - ed.left - CONX - 3; ed.width = DL_Form.cwidth - ed.left - CONX - 3;
ed.offset=0; ed.offset=0;
DrawEditBox(#ed); DrawEditBox(#ed);
@ -188,8 +188,8 @@ void DrawDownloading()
{ {
char bytes_received[70]; char bytes_received[70];
sprintf(#bytes_received, KB_RECEIVED, ConvertSizeToKb(downloader.httpd.content_received) ); sprintf(#bytes_received, KB_RECEIVED, ConvertSizeToKb(downloader.httpd.content_received) );
DrawBar(CONX, pb.top + 22, pb.width, 16, system.color.work); DrawBar(CONX, pb.top + 22, pb.width, 16, sc.work);
WriteText(CONX, pb.top + 22, 0x90, system.color.work_text, #bytes_received); WriteText(CONX, pb.top + 22, 0x90, sc.work_text, #bytes_received);
//CalculateSpeed(); //CalculateSpeed();
progressbar_draw stdcall(#pb); progressbar_draw stdcall(#pb);
} }

View File

@ -84,25 +84,25 @@ void DrawTab(int _id)
if (_id==tab.active) { if (_id==tab.active) {
tab.save_state(); tab.save_state();
bgcol = system.color.work_light; bgcol = sc.work_light;
border_bottom_color = system.color.work_light; border_bottom_color = sc.work_light;
} else { } else {
bgcol=system.color.work; bgcol=sc.work;
border_bottom_color = system.color.work_graph; border_bottom_color = sc.work_graph;
} }
if (data[_id].header) { if (data[_id].header) {
strncpy(#header_no_version, #data[_id].header, strlen(#data[_id].header)-sizeof(version)-2); strncpy(#header_no_version, #data[_id].header, strlen(#data[_id].header)-sizeof(version)-2);
strncpy(#name, #header_no_version, tab_w-CLOSE_S/6-2); strncpy(#name, #header_no_version, tab_w-CLOSE_S/6-2);
} }
DrawBar(xxx, TOOLBAR_H, 1, TAB_H, system.color.work_dark); DrawBar(xxx, TOOLBAR_H, 1, TAB_H, sc.work_dark);
DrawBar(xxx+1, TOOLBAR_H, tab_w-1, TAB_H-1, bgcol); DrawBar(xxx+1, TOOLBAR_H, tab_w-1, TAB_H-1, bgcol);
DrawBar(xxx+1, TOOLBAR_H+TAB_H-1, tab_w-1, 1, border_bottom_color); DrawBar(xxx+1, TOOLBAR_H+TAB_H-1, tab_w-1, 1, border_bottom_color);
DefineHiddenButton(xxx, TOOLBAR_H-1, tab_w, TAB_H, TAB_ID+_id); DefineHiddenButton(xxx, TOOLBAR_H-1, tab_w, TAB_H, TAB_ID+_id);
WriteTextCenter(xxx, TOOLBAR_H+6, tab_w-CLOSE_S, system.color.work_text, #name); WriteTextCenter(xxx, TOOLBAR_H+6, tab_w-CLOSE_S, sc.work_text, #name);
DefineHiddenButton(xxx+tab_w-CLOSE_S-3, TOOLBAR_H+3, CLOSE_S-1, CLOSE_S-1, TAB_CLOSE_ID+_id); DefineHiddenButton(xxx+tab_w-CLOSE_S-3, TOOLBAR_H+3, CLOSE_S-1, CLOSE_S-1, TAB_CLOSE_ID+_id);
DrawBar(xxx+tab_w-CLOSE_S-3, TOOLBAR_H+3, CLOSE_S, CLOSE_S, system.color.work_dark); DrawBar(xxx+tab_w-CLOSE_S-3, TOOLBAR_H+3, CLOSE_S, CLOSE_S, sc.work_dark);
WriteText(xxx+tab_w-CLOSE_S+1, TOOLBAR_H+5, 0x80, system.color.work_light, "x"); WriteText(xxx+tab_w-CLOSE_S+1, TOOLBAR_H+5, 0x80, sc.work_light, "x");
} }
void DrawActiveTab() void DrawActiveTab()
@ -113,17 +113,17 @@ void DrawActiveTab()
int DrawNewTabButton() int DrawNewTabButton()
{ {
dword btn_light = MixColors(system.color.work_button, 0xFFFfff, 220); dword btn_light = MixColors(sc.button, 0xFFFfff, 220);
dword btn_dark = MixColors(system.color.work_button, 0, 180); dword btn_dark = MixColors(sc.button, 0, 180);
int xxx = tab.count * tab_w; int xxx = tab.count * tab_w;
if (tab.count < TABS_MAX) { if (tab.count < TABS_MAX) {
DrawBar(xxx, TOOLBAR_H, 1, TAB_H, system.color.work_graph); DrawBar(xxx, TOOLBAR_H, 1, TAB_H, sc.work_graph);
DrawBar(xxx+1, TOOLBAR_H, TAB_H, TAB_H-1, system.color.work_button); DrawBar(xxx+1, TOOLBAR_H, TAB_H, TAB_H-1, sc.button);
DrawRectangle3D(xxx+1, TOOLBAR_H, TAB_H, TAB_H-1, btn_light, btn_dark); DrawRectangle3D(xxx+1, TOOLBAR_H, TAB_H, TAB_H-1, btn_light, btn_dark);
PutPixel(xxx+1+TAB_H, TOOLBAR_H, btn_dark); PutPixel(xxx+1+TAB_H, TOOLBAR_H, btn_dark);
DefineHiddenButton(xxx+1, TOOLBAR_H, TAB_H-1, TAB_H-1, NEW_TAB); DefineHiddenButton(xxx+1, TOOLBAR_H, TAB_H-1, TAB_H-1, NEW_TAB);
WriteText(xxx+7, TOOLBAR_H+2, 0x90, system.color.work_button_text, "+"); WriteText(xxx+7, TOOLBAR_H+2, 0x90, sc.button_text, "+");
return xxx + TAB_H + 2; return xxx + TAB_H + 2;
} else { } else {
return xxx; return xxx;
@ -136,8 +136,8 @@ void DrawTabsBar()
tab_w = GetTabWidth(); tab_w = GetTabWidth();
for (i=0; i<tab.count; i++) DrawTab(i); for (i=0; i<tab.count; i++) DrawTab(i);
i = DrawNewTabButton(); i = DrawNewTabButton();
DrawBar(i, TOOLBAR_H, Form.cwidth-i, TAB_H-1, MixColors(system.color.work_dark, system.color.work, 128)); DrawBar(i, TOOLBAR_H, Form.cwidth-i, TAB_H-1, MixColors(sc.work_dark, sc.work, 128));
DrawBar(i, TOOLBAR_H+TAB_H-1, Form.cwidth-i, 1, system.color.work_graph); DrawBar(i, TOOLBAR_H+TAB_H-1, Form.cwidth-i, 1, sc.work_graph);
} }
void EventTabClose(int _id) void EventTabClose(int _id)

View File

@ -77,7 +77,7 @@ void main()
break; break;
case evReDraw: case evReDraw:
system.color.get(); sc.get();
DefineAndDrawWindow(screen.width-700/2,80,700,454+skin_height,0x73,0xE4DFE1,WINDOW_HEADER,0); DefineAndDrawWindow(screen.width-700/2,80,700,454+skin_height,0x73,0xE4DFE1,WINDOW_HEADER,0);
GetProcessInfo(#Form, SelfInfo); GetProcessInfo(#Form, SelfInfo);
IF (Form.status_window>=2) break; IF (Form.status_window>=2) break;
@ -103,14 +103,14 @@ void main()
void DrawWindowContent() void DrawWindowContent()
{ {
int button_x = select_list.x; int button_x = select_list.x;
DrawBar(0,0, Form.cwidth, PANEL_TOP_H, system.color.work); DrawBar(0,0, Form.cwidth, PANEL_TOP_H, sc.work);
DrawBar(0,Form.cheight-PANEL_BOTTOM_H, Form.cwidth, PANEL_BOTTOM_H, system.color.work); DrawBar(0,Form.cheight-PANEL_BOTTOM_H, Form.cwidth, PANEL_BOTTOM_H, sc.work);
DrawWideRectangle(select_list.x-LIST_PADDING, select_list.y-LIST_PADDING, LIST_PADDING*2+select_list.w+scroll1.size_x, LIST_PADDING*2+select_list.h, LIST_PADDING-2, system.color.work); DrawWideRectangle(select_list.x-LIST_PADDING, select_list.y-LIST_PADDING, LIST_PADDING*2+select_list.w+scroll1.size_x, LIST_PADDING*2+select_list.h, LIST_PADDING-2, sc.work);
button_x += DrawStandartCaptButton(button_x, select_list.y + select_list.h + 8, BT_DELETE_LAST_SLOT, T_DELETE_LAST_SLOT); button_x += DrawStandartCaptButton(button_x, select_list.y + select_list.h + 8, BT_DELETE_LAST_SLOT, T_DELETE_LAST_SLOT);
button_x += DrawStandartCaptButton(button_x, select_list.y + select_list.h + 8, BT_DELETE_ALL_SLOTS, T_DELETE_ALL_SLOTS); button_x += DrawStandartCaptButton(button_x, select_list.y + select_list.h + 8, BT_DELETE_ALL_SLOTS, T_DELETE_ALL_SLOTS);
button_x += DrawStandartCaptButton(button_x, select_list.y + select_list.h + 8, BT_UNLOCK, T_RESET_BUFFER_LOCK); button_x += DrawStandartCaptButton(button_x, select_list.y + select_list.h + 8, BT_UNLOCK, T_RESET_BUFFER_LOCK);
WriteText(select_list.x+12, select_list.y - 23, select_list.font_type, system.color.work_text, T_COLUMNS_TITLE); WriteText(select_list.x+12, select_list.y - 23, select_list.font_type, sc.work_text, T_COLUMNS_TITLE);
WriteText(select_list.x+select_list.w - 88-14, select_list.y - 23, select_list.font_type, system.color.work_text, T_COLUMN_VIEW); WriteText(select_list.x+select_list.w - 88-14, select_list.y - 23, select_list.font_type, sc.work_text, T_COLUMN_VIEW);
ClipViewSelectListDraw(); ClipViewSelectListDraw();
SelectList_DrawBorder(); SelectList_DrawBorder();
} }

View File

@ -136,9 +136,9 @@ void main()
break; break;
case evReDraw: case evReDraw:
DefineAndDrawWindow(GetScreenWidth()-800/2-random(80),GetScreenHeight()-600/2-random(80),800,600,0x73,system.color.work,0,0); DefineAndDrawWindow(GetScreenWidth()-800/2-random(80),GetScreenHeight()-600/2-random(80),800,600,0x73,sc.work,0,0);
GetProcessInfo(#Form, SelfInfo); GetProcessInfo(#Form, SelfInfo);
system.color.get(); sc.get();
if (Form.status_window>2) break; if (Form.status_window>2) break;
if (Form.height<120) { MoveSize(OLD,OLD,OLD,120); break; } if (Form.height<120) { MoveSize(OLD,OLD,OLD,120); break; }
if (Form.width<280) { MoveSize(OLD,OLD,280,OLD); break; } if (Form.width<280) { MoveSize(OLD,OLD,280,OLD); break; }
@ -166,12 +166,12 @@ void SetElementSizes()
void draw_window() void draw_window()
{ {
DrawBar(0,0, Form.cwidth,TOOLBAR_H-2, system.color.work); DrawBar(0,0, Form.cwidth,TOOLBAR_H-2, sc.work);
DrawBar(0,TOOLBAR_H-2, Form.cwidth,1, 0xD7D0D3); DrawBar(0,TOOLBAR_H-2, Form.cwidth,1, 0xD7D0D3);
DrawBar(0,TOOLBAR_H-1, Form.cwidth,1, system.color.work_graph); DrawBar(0,TOOLBAR_H-1, Form.cwidth,1, sc.work_graph);
DrawRectangle(address_box.left-3, address_box.top-3, address_box.width+4, 25,system.color.work_graph); DrawRectangle(address_box.left-3, address_box.top-3, address_box.width+4, 25,sc.work_graph);
DrawBar(0,Form.cheight - STATUSBAR_H, Form.cwidth,STATUSBAR_H, system.color.work); DrawBar(0,Form.cheight - STATUSBAR_H, Form.cwidth,STATUSBAR_H, sc.work);
DrawBar(0,Form.cheight - STATUSBAR_H, Form.cwidth,1, system.color.work_graph); DrawBar(0,Form.cheight - STATUSBAR_H, Form.cwidth,1, sc.work_graph);
DrawEditBoxWebView(); DrawEditBoxWebView();
if (!WB1.header) { if (!WB1.header) {
OpenPage(#current_path); OpenPage(#current_path);

View File

@ -76,18 +76,18 @@ void main()
break; break;
case evReDraw: case evReDraw:
system.color.get(); sc.get();
DefineAndDrawWindow(215,120,500,350,0x73,system.color.work,WINDOW_TITLE,0); DefineAndDrawWindow(215,120,500,350,0x73,sc.work,WINDOW_TITLE,0);
GetProcessInfo(#Form, SelfInfo); GetProcessInfo(#Form, SelfInfo);
if (Form.status_window>2) break; if (Form.status_window>2) break;
if (Form.height<140) { MoveSize(OLD,OLD,OLD,140); break; } if (Form.height<140) { MoveSize(OLD,OLD,OLD,140); break; }
if (Form.width<400) { MoveSize(OLD,OLD,400,OLD); break; } if (Form.width<400) { MoveSize(OLD,OLD,400,OLD); break; }
DrawBar(0, 0, Form.cwidth, TOPH, system.color.work); //top bg DrawBar(0, 0, Form.cwidth, TOPH, sc.work); //top bg
DrawBar(0, TOPH, Form.cwidth, 1, system.color.work_graph); DrawBar(0, TOPH, Form.cwidth, 1, sc.work_graph);
edit1.width=Form.cwidth-edit1.left-edit1.left - 116; edit1.width=Form.cwidth-edit1.left-edit1.left - 116;
edit_box_draw stdcall(#edit1); edit_box_draw stdcall(#edit1);
DrawWideRectangle(edit1.left-2, edit1.top-2, edit1.width+3, 25, 2, 0xffffff); DrawWideRectangle(edit1.left-2, edit1.top-2, edit1.width+3, 25, 2, 0xffffff);
DrawRectangle(edit1.left-3, edit1.top-3, edit1.width+4, 26, system.color.work_graph); DrawRectangle(edit1.left-3, edit1.top-3, edit1.width+4, 26, sc.work_graph);
DrawTranslation(); DrawTranslation();
DrawLangButtons(); DrawLangButtons();
} }
@ -98,11 +98,11 @@ void main()
void DrawLangButtons() void DrawLangButtons()
{ {
dword direction; dword direction;
DrawBar(Form.cwidth-111, edit1.top+3, 100, 25, system.color.work); DrawBar(Form.cwidth-111, edit1.top+3, 100, 25, sc.work);
DefineButton(Form.cwidth-79, edit1.top-4+3, 20, 20, BUTTON_CHANGE_LANGUAGE, system.color.work_button); DefineButton(Form.cwidth-79, edit1.top-4+3, 20, 20, BUTTON_CHANGE_LANGUAGE, sc.button);
WriteText(Form.cwidth-73, edit1.top-1+3, 10000001b, system.color.work_button_text, "\26"); WriteText(Form.cwidth-73, edit1.top-1+3, 10000001b, sc.button_text, "\26");
if (active_dict == ENG_RUS) direction = TEXT_VOC_R_E; else direction = TEXT_VOC_E_R; if (active_dict == ENG_RUS) direction = TEXT_VOC_R_E; else direction = TEXT_VOC_E_R;
WriteText(Form.cwidth-111, edit1.top+3, 0x90, system.color.work_text, direction); WriteText(Form.cwidth-111, edit1.top+3, 0x90, sc.work_text, direction);
} }
void Translate() void Translate()

View File

@ -95,8 +95,8 @@ void gui()
void draw_window() void draw_window()
{ {
system.color.get(); sc.get();
DefineAndDrawWindow(215, 100, WIN_W+9, 170 + skin_height, 0x34, system.color.work, #window_title,0); DefineAndDrawWindow(215, 100, WIN_W+9, 170 + skin_height, 0x34, sc.work, #window_title,0);
//GetProcessInfo(#Form, SelfInfo); //GetProcessInfo(#Form, SelfInfo);
if (READY==state) { if (READY==state) {
DrawFileBox(#src_box, T_FIRST, BID_SRC_OPEN); DrawFileBox(#src_box, T_FIRST, BID_SRC_OPEN);
@ -105,9 +105,9 @@ void draw_window()
} }
#ifdef COPYING #ifdef COPYING
if (COPYING==state) { if (COPYING==state) {
pr.frame_color = system.color.work_graph; pr.frame_color = sc.work_graph;
DrawRectangle3D(PR_LEFT-1, PR_TOP-1, PR_W+1, PR_H+1, system.color.work_dark, DrawRectangle3D(PR_LEFT-1, PR_TOP-1, PR_W+1, PR_H+1, sc.work_dark,
system.color.work_light); sc.work_light);
DrawProgress(); DrawProgress();
DrawStandartCaptButton(-19*8+WIN_W/2-15, dst_box.top + 35, B_STOP, " Stop "); DrawStandartCaptButton(-19*8+WIN_W/2-15, dst_box.top + 35, B_STOP, " Stop ");
} }

View File

@ -128,10 +128,10 @@ void Draw_IntroWindow()
{ {
incn y; incn y;
y.n = Form.cheight/2 - 80; y.n = Form.cheight/2 - 80;
WriteTextB(30+2,y.n+2,0x81,MixColors(system.color.work, 0xB92234,220),T_CAUTION_TITLE); WriteTextB(30+2,y.n+2,0x81,MixColors(sc.work, 0xB92234,220),T_CAUTION_TITLE);
WriteTextB(30,y.n,0x81,0xB92234,T_CAUTION_TITLE); WriteTextB(30,y.n,0x81,0xB92234,T_CAUTION_TITLE);
y.n = DrawTextViewArea(30, y.inc(30), Form.cwidth-60, Form.cheight-140, y.n = DrawTextViewArea(30, y.inc(30), Form.cwidth-60, Form.cheight-140,
T_CAUTION_PARAGRAPH, -1, system.color.work_text); T_CAUTION_PARAGRAPH, -1, sc.work_text);
active_button_id = BUTTON_ID_ASSEPT_RISK; active_button_id = BUTTON_ID_ASSEPT_RISK;
DrawStandartCaptButton(30, y.inc(10), BUTTON_ID_ASSEPT_RISK, T_ASSEPT_RISK); DrawStandartCaptButton(30, y.inc(10), BUTTON_ID_ASSEPT_RISK, T_ASSEPT_RISK);
} }
@ -153,15 +153,15 @@ void Draw_DriverListWindow()
SelectList_DrawBorder(); SelectList_DrawBorder();
//RIGHT FRAME //RIGHT FRAME
GetCurrentSectionData(); GetCurrentSectionData();
DrawBar(right_frame_x, PADDING+3, Form.cwidth - right_frame_x - PADDING, 80, system.color.work); DrawBar(right_frame_x, PADDING+3, Form.cwidth - right_frame_x - PADDING, 80, sc.work);
if (streq(#cur_type, "disk")) icon_n = 50; if (streq(#cur_type, "disk")) icon_n = 50;
DrawIcon32(right_frame_x, PADDING, system.color.work, icon_n); DrawIcon32(right_frame_x, PADDING, sc.work, icon_n);
WriteTextB(right_frame_x+44, PADDING+3, 0x81, system.color.work_text, ini_sections.get(select_list.cur_y)); WriteTextB(right_frame_x+44, PADDING+3, 0x81, sc.work_text, ini_sections.get(select_list.cur_y));
WriteText(right_frame_x+44, PADDING+23, 0x80, system.color.work_text, #cur_version); WriteText(right_frame_x+44, PADDING+23, 0x80, sc.work_text, #cur_version);
if(cur_readme_path[0]) readme_w = DrawStandartCaptButton(right_frame_x, PADDING+45, BUTTON_ID_README, T_README); if(cur_readme_path[0]) readme_w = DrawStandartCaptButton(right_frame_x, PADDING+45, BUTTON_ID_README, T_README);
DrawStandartCaptButton(right_frame_x + readme_w, PADDING+45, BUTTON_ID_INSTALL, T_INSTALL); DrawStandartCaptButton(right_frame_x + readme_w, PADDING+45, BUTTON_ID_INSTALL, T_INSTALL);
DrawTextViewArea(right_frame_x-2, PADDING+83, Form.cwidth - right_frame_x - PADDING, Form.cheight-PADDING-PADDING, DrawTextViewArea(right_frame_x-2, PADDING+83, Form.cwidth - right_frame_x - PADDING, Form.cheight-PADDING-PADDING,
#cur_description, system.color.work, system.color.work_text); #cur_description, sc.work, sc.work_text);
} }
void SelectList_DrawLine(dword i) void SelectList_DrawLine(dword i)
@ -172,8 +172,8 @@ void SelectList_DrawLine(dword i)
if (select_list.cur_y-select_list.first==i) if (select_list.cur_y-select_list.first==i)
{ {
DrawBar(select_list.x, yyy, select_list.w, select_list.item_h, system.color.work_button); DrawBar(select_list.x, yyy, select_list.w, select_list.item_h, sc.button);
WriteText(select_list.x+12,yyy+select_list.text_y,select_list.font_type,system.color.work_button_text, ini_sections.get(i)); WriteText(select_list.x+12,yyy+select_list.text_y,select_list.font_type,sc.button_text, ini_sections.get(i));
} }
else else
{ {
@ -214,8 +214,8 @@ void Event_ProcessButtonId(int id)
void Event_DrawWindow() void Event_DrawWindow()
{ {
system.color.get(); sc.get();
DefineAndDrawWindow(215, 100, 600, 400, 0x33, system.color.work, WINDOW_TITLE,0); DefineAndDrawWindow(215, 100, 600, 400, 0x33, sc.work, WINDOW_TITLE,0);
GetProcessInfo(#Form, SelfInfo); GetProcessInfo(#Form, SelfInfo);
if (Form.status_window>2) return; if (Form.status_window>2) return;
if (Form.width < 450) { MoveSize(OLD,OLD,450,OLD); return; } if (Form.width < 450) { MoveSize(OLD,OLD,450,OLD); return; }

View File

@ -126,14 +126,14 @@ void DrawWindow()
{ {
int i; int i;
system.color.get(); sc.get();
DefineAndDrawWindow(screen.width-400, screen.height/3, 270, DefineAndDrawWindow(screen.width-400, screen.height/3, 270,
skin_height + 30+PD+PD, 0x34, system.color.work, "EasyShot",0); skin_height + 30+PD+PD, 0x34, sc.work, "EasyShot",0);
GetProcessInfo(#Form, SelfInfo); GetProcessInfo(#Form, SelfInfo);
DrawCaptButton(PD, PD, 170, 28, BTN_MAKE_SCREENSHOT, 0x0090B8, 0xFFFfff, T_TAKE_SCREENSHOT); DrawCaptButton(PD, PD, 170, 28, BTN_MAKE_SCREENSHOT, 0x0090B8, 0xFFFfff, T_TAKE_SCREENSHOT);
DefineButton(PD+170+20, PD, 35, 28, BTN_SETTINGS, system.color.work_button); DefineButton(PD+170+20, PD, 35, 28, BTN_SETTINGS, sc.button);
for (i=0; i<=2; i++) DrawBar(PD+170+30, i*5+PD+9, 15, 2, system.color.work_button_text); for (i=0; i<=2; i++) DrawBar(PD+170+30, i*5+PD+9, 15, 2, sc.button_text);
delay.draw(PD, SETTINGS_Y); delay.draw(PD, SETTINGS_Y);
DrawFileBox(#edit_save, T_EDITBOX_FRAME, BTN_CHOOSE_SAVING_PATH); DrawFileBox(#edit_save, T_EDITBOX_FRAME, BTN_CHOOSE_SAVING_PATH);
} }

View File

@ -238,7 +238,7 @@ void main()
if (mouse.x>=files.x+files.w) && (mouse.x<=files.x+files.w+16) && (mouse.y>files.y-17) && (mouse.y<files.y) if (mouse.x>=files.x+files.w) && (mouse.x<=files.x+files.w+16) && (mouse.y>files.y-17) && (mouse.y<files.y)
{ {
if (mouse.lkm) DrawRectangle3D(files.x+files.w+1,files.y-16,14,14,system.color.work_dark,system.color.work_light); if (mouse.lkm) DrawRectangle3D(files.x+files.w+1,files.y-16,14,14,sc.work_dark,sc.work_light);
WHILE (mouse.lkm) && (files.first>0) WHILE (mouse.lkm) && (files.first>0)
{ {
pause(8); pause(8);
@ -246,12 +246,12 @@ void main()
List_ReDraw(); List_ReDraw();
mouse.get(); mouse.get();
} }
DrawRectangle3D(files.x+files.w+1,files.y-16,14,14,system.color.work_light,system.color.work_dark); DrawRectangle3D(files.x+files.w+1,files.y-16,14,14,sc.work_light,sc.work_dark);
} }
if (mouse.x>=files.x+files.w) && (mouse.x<=files.x+files.w+16) && (mouse.y>files.y+files.h-16) && (mouse.y<files.y+files.h) if (mouse.x>=files.x+files.w) && (mouse.x<=files.x+files.w+16) && (mouse.y>files.y+files.h-16) && (mouse.y<files.y+files.h)
{ {
if (mouse.lkm) DrawRectangle3D(files.x+files.w+1,files.y+files.h-15,14,14,system.color.work_dark,system.color.work_light); if (mouse.lkm) DrawRectangle3D(files.x+files.w+1,files.y+files.h-15,14,14,sc.work_dark,sc.work_light);
while (mouse.lkm) && (files.first<files.count-files.visible) while (mouse.lkm) && (files.first<files.count-files.visible)
{ {
pause(8); pause(8);
@ -259,7 +259,7 @@ void main()
List_ReDraw(); List_ReDraw();
mouse.get(); mouse.get();
} }
DrawRectangle3D(files.x+files.w+1,files.y+files.h-15,14,14,system.color.work_light,system.color.work_dark); DrawRectangle3D(files.x+files.w+1,files.y+files.h-15,14,14,sc.work_light,sc.work_dark);
} }
//Scrooll //Scrooll
@ -514,21 +514,21 @@ void draw_window()
if ( two_panels.checked) && (Form.width < 573) { MoveSize(OLD,OLD,573,OLD); return; } if ( two_panels.checked) && (Form.width < 573) { MoveSize(OLD,OLD,573,OLD); return; }
GetProcessInfo(#Form, SelfInfo); GetProcessInfo(#Form, SelfInfo);
SetAppColors(); SetAppColors();
ESDWORD[#toolbar_pal] = col.work; ESDWORD[#toolbar_pal] = sc.work;
ESDWORD[#toolbar_pal+4] = MixColors(0, col.work, 35); ESDWORD[#toolbar_pal+4] = MixColors(0, sc.work, 35);
PutPaletteImage(#toolbar, 246, 34, 0, 0, 8, #toolbar_pal); PutPaletteImage(#toolbar, 246, 34, 0, 0, 8, #toolbar_pal);
DrawBar(127, 8, 1, 25, col.graph); DrawBar(127, 8, 1, 25, sc.work_graph);
for (i=0; i<3; i++) DefineHiddenButton(toolbar_buttons_x[i]+2,7,31-5,29-5,21+i); for (i=0; i<3; i++) DefineHiddenButton(toolbar_buttons_x[i]+2,7,31-5,29-5,21+i);
for (i=3; i<6; i++) DefineHiddenButton(toolbar_buttons_x[i], 5,31, 29, 21+i); for (i=3; i<6; i++) DefineHiddenButton(toolbar_buttons_x[i], 5,31, 29, 21+i);
DrawBar(246,0, Form.cwidth - 246, 34, col.work); DrawBar(246,0, Form.cwidth - 246, 34, sc.work);
DrawDot(Form.cwidth-17,12); DrawDot(Form.cwidth-17,12);
DrawDot(Form.cwidth-17,12+6); DrawDot(Form.cwidth-17,12+6);
DrawDot(Form.cwidth-17,12+12); DrawDot(Form.cwidth-17,12+12);
DefineHiddenButton(Form.cwidth-24,7,20,25,51+BT_NOFRAME); //dots DefineHiddenButton(Form.cwidth-24,7,20,25,51+BT_NOFRAME); //dots
//main rectangles //main rectangles
DrawRectangle(1,40,Form.cwidth-3,Form.cheight - 42-status_bar_h,col.graph); DrawRectangle(1,40,Form.cwidth-3,Form.cheight - 42-status_bar_h,sc.work_graph);
DrawRectangle(0,39,Form.cwidth-1,-show_status_bar.checked*status_bar_h + Form.cheight - 40,col.work_gradient[4]); //bg DrawRectangle(0,39,Form.cwidth-1,-show_status_bar.checked*status_bar_h + Form.cheight - 40,col.work_gradient[4]); //bg
for (i=0; i<6; i++) DrawBar(0, 34+i, Form.cwidth, 1, MixColors(system.color.work_dark, system.color.work, i*10)); for (i=0; i<6; i++) DrawBar(0, 34+i, Form.cwidth, 1, MixColors(sc.work_dark, sc.work, i*10));
llist_copy(#files_active, #files); llist_copy(#files_active, #files);
strcpy(#active_path, #path); strcpy(#active_path, #path);
DrawStatusBar(); DrawStatusBar();
@ -549,9 +549,9 @@ void DrawList()
if (sort_type==1) sorting_arrow_x = files.w - 141 / 2 + files.x + 18; if (sort_type==1) sorting_arrow_x = files.w - 141 / 2 + files.x + 18;
if (sort_type==2) sorting_arrow_x = files.x + files.w - 90; if (sort_type==2) sorting_arrow_x = files.x + files.w - 90;
if (sort_type==3) sorting_arrow_x = strlen(T_SIZE)*3-30+files.x+files.w; if (sort_type==3) sorting_arrow_x = strlen(T_SIZE)*3-30+files.x+files.w;
WriteText(sorting_arrow_x,files.y-12,0x80, system.color.work_text, sorting_arrow_t); WriteText(sorting_arrow_x,files.y-12,0x80, sc.work_text, sorting_arrow_t);
DrawBar(files.x+files.w,files.y,1,files.h,col.graph); DrawBar(files.x+files.w,files.y,1,files.h,sc.work_graph);
if (two_panels.checked) && (files.x<5) DrawBar(files.x+files.w+16,files.y,1,files.h,col.graph); if (two_panels.checked) && (files.x<5) DrawBar(files.x+files.w+16,files.y,1,files.h,sc.work_graph);
} }
void DrawStatusBar() void DrawStatusBar()
@ -560,13 +560,13 @@ void DrawStatusBar()
int go_up_folder_exists=0; int go_up_folder_exists=0;
if (!show_status_bar.checked) return; if (!show_status_bar.checked) return;
if (files.count>0) && (strcmp(file_mas[0]*304+buf+72,"..")==0) go_up_folder_exists=1; if (files.count>0) && (strcmp(file_mas[0]*304+buf+72,"..")==0) go_up_folder_exists=1;
DrawBar(0, Form.cheight - status_bar_h, Form.cwidth, status_bar_h, system.color.work); DrawBar(0, Form.cheight - status_bar_h, Form.cwidth, status_bar_h, sc.work);
sprintf(#status_bar_str, T_STATUS_EVEMENTS, count_dir-go_up_folder_exists, files.count-count_dir); sprintf(#status_bar_str, T_STATUS_EVEMENTS, count_dir-go_up_folder_exists, files.count-count_dir);
WriteText(6,Form.cheight - 13,0x80,system.color.work_text,#status_bar_str); WriteText(6,Form.cheight - 13,0x80,sc.work_text,#status_bar_str);
if (selected_count) { if (selected_count) {
sprintf(#status_bar_str, T_STATUS_SELECTED, selected_count); sprintf(#status_bar_str, T_STATUS_SELECTED, selected_count);
WriteText(Form.cwidth - calc(strlen(#status_bar_str)*6)-6,Form.cheight - 13, WriteText(Form.cwidth - calc(strlen(#status_bar_str)*6)-6,Form.cheight - 13,
0x80,system.color.work_text,#status_bar_str); 0x80,sc.work_text,#status_bar_str);
} }
} }
@ -857,18 +857,18 @@ void Del_Form()
{ {
if (!files.count) return; if (!files.count) return;
DrawEolitePopup(T_YES, T_NO); DrawEolitePopup(T_YES, T_NO);
WriteText(-strlen(T_DELETE_FILE)*3+110+dform_x,175,0x80,system.color.work_text,T_DELETE_FILE); WriteText(-strlen(T_DELETE_FILE)*3+110+dform_x,175,0x80,sc.work_text,T_DELETE_FILE);
if (selected_count) if (selected_count)
{ {
sprintf(#f_count,"%s%d%s",DEL_MORE_FILES_1,selected_count,DEL_MORE_FILES_2); sprintf(#f_count,"%s%d%s",DEL_MORE_FILES_1,selected_count,DEL_MORE_FILES_2);
WriteText(-strlen(#f_count)*3+110+dform_x,190,0x80,system.color.work_text,#f_count); WriteText(-strlen(#f_count)*3+110+dform_x,190,0x80,sc.work_text,#f_count);
} }
else else
{ {
if (strlen(#file_name)<28) if (strlen(#file_name)<28)
{ {
WriteText(strlen(#file_name)*3+110+dform_x+2,190,0x80,system.color.work_text,"?"); WriteText(strlen(#file_name)*3+110+dform_x+2,190,0x80,sc.work_text,"?");
WriteText(-strlen(#file_name)*3+110+dform_x,190,0x80,system.color.work_text,#file_name); WriteText(-strlen(#file_name)*3+110+dform_x,190,0x80,sc.work_text,#file_name);
} }
else else
{ {

View File

@ -33,17 +33,17 @@ void about_dialog()
break; break;
case evReDraw: case evReDraw:
DefineAndDrawWindow(Form.left+Form.width/2,Form.top+Form.height/2-114,300,300+skin_height,0x34,system.color.work,T_ABOUT,0); DefineAndDrawWindow(Form.left+Form.width/2,Form.top+Form.height/2-114,300,300+skin_height,0x34,sc.work,T_ABOUT,0);
GetProcessInfo(#about_form, SelfInfo); GetProcessInfo(#about_form, SelfInfo);
if (about_form.status_window>2) break; if (about_form.status_window>2) break;
logo_pal[0] = system.color.work; logo_pal[0] = sc.work;
ESDWORD[#logo_pal+16] = system.color.work_dark; ESDWORD[#logo_pal+16] = sc.work_dark;
PutPaletteImage(#logo,86,86,about_form.cwidth-86/2,10,8,#logo_pal); PutPaletteImage(#logo,86,86,about_form.cwidth-86/2,10,8,#logo_pal);
about_x = -strlen(ABOUT_TITLE)*18+about_form.cwidth/2; about_x = -strlen(ABOUT_TITLE)*18+about_form.cwidth/2;
WriteTextB(about_x+2,107,0x82,0xD49CD2,ABOUT_TITLE); WriteTextB(about_x+2,107,0x82,0xD49CD2,ABOUT_TITLE);
WriteTextB(about_x,105,0x82,0x9D129D,ABOUT_TITLE); WriteTextB(about_x,105,0x82,0x9D129D,ABOUT_TITLE);
DrawRectangle3D(0,154,about_form.cwidth,1,system.color.work_dark,system.color.work_light); DrawRectangle3D(0,154,about_form.cwidth,1,sc.work_dark,sc.work_light);
WriteTextLines(7,163,0x90,system.color.work_text,"KolibriOS File Manager\nAuthors: Leency, Veliant\nPunk_Joker, Pavelyakov\n2008 - 2019",20); WriteTextLines(7,163,0x90,sc.work_text,"KolibriOS File Manager\nAuthors: Leency, Veliant\nPunk_Joker, Pavelyakov\n2008 - 2019",20);
#ifdef LANG_RUS #ifdef LANG_RUS
DrawStandartCaptButton(60,about_form.cheight-38,11,"ˆáâ®à¨ï ࠧࠡ®âª¨"); DrawStandartCaptButton(60,about_form.cheight-38,11,"ˆáâ®à¨ï ࠧࠡ®âª¨");
#endif #endif

View File

@ -4,9 +4,9 @@ void DrawPathBar()
{ {
PathShow.area_size_x = Form.cwidth-300; PathShow.area_size_x = Form.cwidth-300;
DrawBar(PathShow.start_x-3, PathShow.start_y-6, PathShow.area_size_x+3, 19, col.odd_line); DrawBar(PathShow.start_x-3, PathShow.start_y-6, PathShow.area_size_x+3, 19, col.odd_line);
DrawRectangle(PathShow.start_x-4,PathShow.start_y-7,PathShow.area_size_x+4,20,col.graph); DrawRectangle(PathShow.start_x-4,PathShow.start_y-7,PathShow.area_size_x+4,20,sc.work_graph);
DefineHiddenButton(PathShow.start_x-4+1,PathShow.start_y-7+1,PathShow.area_size_x+4-2,20-2,PATH_BTN); DefineHiddenButton(PathShow.start_x-4+1,PathShow.start_y-7+1,PathShow.area_size_x+4-2,20-2,PATH_BTN);
DrawBar(PathShow.start_x-4, PathShow.start_y+14, PathShow.area_size_x+5+18, 1, system.color.work_light); DrawBar(PathShow.start_x-4, PathShow.start_y+14, PathShow.area_size_x+5+18, 1, sc.work_light);
DrawFlatButtonSmall(PathShow.start_x+PathShow.area_size_x,PathShow.start_y-7,18,20, 61, "\26"); DrawFlatButtonSmall(PathShow.start_x+PathShow.area_size_x,PathShow.start_y-7,18,20, 61, "\26");
@ -46,7 +46,7 @@ void DrawBreadCrumbs()
//DrawFavButton(btn.x); //DrawFavButton(btn.x);
//btn.x+=20; //btn.x+=20;
btn.x++; btn.x++;
DrawBar(btn.x,btn.y-1,Form.cwidth-btn.x-25,btn.h+3,col.work); DrawBar(btn.x,btn.y-1,Form.cwidth-btn.x-25,btn.h+3,sc.work);
} }
@ -64,10 +64,10 @@ void ClickOnBreadCrumb(unsigned clickid)
void DrawBreadcrumbButton(dword x,y,w,h,id,text) void DrawBreadcrumbButton(dword x,y,w,h,id,text)
{ {
int i; int i;
DrawRectangle(x,y,w,h,col.graph); DrawRectangle(x,y,w,h,sc.work_graph);
for (i=0; (i<h-1) & (i<20); i++) DrawBar(x+1, y+i+1, w-1, 1, col.work_gradient[20-i]); for (i=0; (i<h-1) & (i<20); i++) DrawBar(x+1, y+i+1, w-1, 1, col.work_gradient[20-i]);
DrawRectangle3D(x+1,y+1,w-2,h-2,system.color.work_light, system.color.work_dark); DrawRectangle3D(x+1,y+1,w-2,h-2,sc.work_light, sc.work_dark);
DefineHiddenButton(x+1,y+1,w-2,h-2,id); DefineHiddenButton(x+1,y+1,w-2,h-2,id);
WriteText(-strlen(text)*8+w/2+x,h/2+y-7,0x90,system.color.work_text,text); WriteText(-strlen(text)*8+w/2+x,h/2+y-7,0x90,sc.work_text,text);
DrawBar(x, y+h+1, w+1, 1, system.color.work_light); DrawBar(x, y+h+1, w+1, 1, sc.work_light);
} }

View File

@ -21,21 +21,21 @@ void Scroll() {
if (sc_slider_h > sc_h-sc_slider_y+56) || (files.first+files.visible>=files.count) sc_slider_y= sc_y + sc_h - sc_slider_h - 1; //äëÿ áîëüøîãî ñïèñêà if (sc_slider_h > sc_h-sc_slider_y+56) || (files.first+files.visible>=files.count) sc_slider_y= sc_y + sc_h - sc_slider_h - 1; //äëÿ áîëüøîãî ñïèñêà
} }
//slider //slider
DrawRectangle(sc_x,sc_slider_y,16,sc_slider_h,col.graph); DrawRectangle(sc_x,sc_slider_y,16,sc_slider_h,sc.work_graph);
DrawRectangle3D(sc_x+1,sc_slider_y+1,14,sc_slider_h-2, system.color.work_light , system.color.work_dark); DrawRectangle3D(sc_x+1,sc_slider_y+1,14,sc_slider_h-2, sc.work_light , sc.work_dark);
if (!scroll_used) for (i=0; i<13; i++) DrawBar(sc_x + 2 + i, sc_slider_y+2, 1, sc_slider_h-3, col.work_gradient[13-i]); if (!scroll_used) for (i=0; i<13; i++) DrawBar(sc_x + 2 + i, sc_slider_y+2, 1, sc_slider_h-3, col.work_gradient[13-i]);
if (scroll_used) for (i=0; i<13; i++) DrawBar(sc_x + 2 + i, sc_slider_y+2, 1, sc_slider_h-3, col.work_gradient[i]); if (scroll_used) for (i=0; i<13; i++) DrawBar(sc_x + 2 + i, sc_slider_y+2, 1, sc_slider_h-3, col.work_gradient[i]);
sc_center = sc_slider_h / 2 + sc_slider_y; sc_center = sc_slider_h / 2 + sc_slider_y;
DrawBar(sc_x+4, sc_center-3, 8, 1, col.graph); DrawBar(sc_x+4, sc_center-3, 8, 1, sc.work_graph);
DrawBar(sc_x+4+1, sc_center-2, 8, 1, system.color.work_light); DrawBar(sc_x+4+1, sc_center-2, 8, 1, sc.work_light);
DrawBar(sc_x+3, sc_center, 10, 1, col.graph); DrawBar(sc_x+3, sc_center, 10, 1, sc.work_graph);
DrawBar(sc_x+3+1, sc_center+1, 10, 1, system.color.work_light); DrawBar(sc_x+3+1, sc_center+1, 10, 1, sc.work_light);
DrawBar(sc_x+4, sc_center+3, 8, 1, col.graph); DrawBar(sc_x+4, sc_center+3, 8, 1, sc.work_graph);
DrawBar(sc_x+4+1, sc_center+4, 8, 1, system.color.work_light); DrawBar(sc_x+4+1, sc_center+4, 8, 1, sc.work_light);
//area before slider //area before slider
if (sc_slider_y > sc_y + 1) if (sc_slider_y > sc_y + 1)
@ -55,12 +55,12 @@ void Scroll() {
void DrawFlatButtonSmall(dword x,y,width,height,id,text) void DrawFlatButtonSmall(dword x,y,width,height,id,text)
{ {
DrawRectangle(x,y,width,height,col.graph); DrawRectangle(x,y,width,height,sc.work_graph);
DrawRectangle3D(x+1,y+1,width-2,height-2, system.color.work_light, system.color.work_dark); DrawRectangle3D(x+1,y+1,width-2,height-2, sc.work_light, sc.work_dark);
PutPixel(x+width-1, y+1, system.color.work_dark); PutPixel(x+width-1, y+1, sc.work_dark);
DrawFilledBar(x+2, y+2, width-3, height-3); DrawFilledBar(x+2, y+2, width-3, height-3);
if (id) DefineHiddenButton(x+1,y+1,width-2,height-2,id); if (id) DefineHiddenButton(x+1,y+1,width-2,height-2,id);
WriteText(-strlen(text)*6+width/2+x+1,height/2+y-3,0x80,system.color.work_text,text); WriteText(-strlen(text)*6+width/2+x+1,height/2+y-3,0x80,sc.work_text,text);
} }
void DrawFilledBar(dword x, y, w, h) void DrawFilledBar(dword x, y, w, h)
@ -71,15 +71,15 @@ void DrawEolitePopup(dword b1_text, b2_text)
{ {
int but_x; int but_x;
int popin_x = files.w - popin_w / 2 + files.x ; int popin_x = files.w - popin_w / 2 + files.x ;
DrawPopup(popin_x, 160, popin_w, 95, 1, system.color.work, col.graph); DrawPopup(popin_x, 160, popin_w, 95, 1, sc.work, sc.work_graph);
but_x = DrawStandartCaptButton(popin_x+23, 215, POPUP_BTN1, b1_text); but_x = DrawStandartCaptButton(popin_x+23, 215, POPUP_BTN1, b1_text);
DrawStandartCaptButton(popin_x+23 + but_x, 215, POPUP_BTN2, b2_text); DrawStandartCaptButton(popin_x+23 + but_x, 215, POPUP_BTN2, b2_text);
} }
void DrawDot(dword x,y) { void DrawDot(dword x,y) {
dword col_pxl = MixColors(col.graph, col.work, 60); dword col_pxl = MixColors(sc.work_graph, sc.work, 60);
DrawBar(x+1,y,2,4,col.graph); DrawBar(x+1,y,2,4,sc.work_graph);
DrawBar(x,y+1,4,2,col.graph); DrawBar(x,y+1,4,2,sc.work_graph);
PutPixel(x,y,col_pxl); PutPixel(x,y,col_pxl);
PutPixel(x+3,y,col_pxl); PutPixel(x+3,y,col_pxl);
PutPixel(x,y+3,col_pxl); PutPixel(x,y+3,col_pxl);

View File

@ -161,9 +161,8 @@ void _SystemDiscs::Draw()
{ {
strcat(#disc_name, #dev_name); strcat(#disc_name, #dev_name);
if (is_active) WriteText(draw_x+30,draw_y+5,0x80,0x555555,#disc_name); if (is_active) WriteText(draw_x+30,draw_y+5,0x80,0x555555,#disc_name);
WriteText(draw_x+29,draw_y+5,0x80,0,#disc_name); } WriteText(draw_x+29,draw_y+5,0x80,0,#disc_name);
else } else {
{
if (is_active) WriteText(draw_x+30,draw_y+5,0x80,0x555555,#dev_name); if (is_active) WriteText(draw_x+30,draw_y+5,0x80,0x555555,#dev_name);
WriteText(draw_x+29,draw_y+5,0x80,0,#dev_name); WriteText(draw_x+29,draw_y+5,0x80,0,#dev_name);
} }
@ -214,9 +213,9 @@ void Tip(int y, dword caption, id, arrow)
DrawFilledBarInner(17, y+1, 160, 16); DrawFilledBarInner(17, y+1, 160, 16);
DrawBar(17,y+17,160,1,0x7E87A3); DrawBar(17,y+17,160,1,0x7E87A3);
} else { } else {
DrawBar(17,y,160,1,col.graph); DrawBar(17,y,160,1,sc.work_graph);
DrawBar(17,y+1,160,16,col.list_bg); DrawBar(17,y+1,160,16,col.list_bg);
DrawBar(17,y+17,160,1,col.graph); DrawBar(17,y+17,160,1,sc.work_graph);
} }
WriteText(25,y+5,0x80,col.list_gb_text,caption); WriteText(25,y+5,0x80,col.list_gb_text,caption);
if (id) DefineButton(159,y+1,16,16,id+BT_HIDE+BT_NOFRAME,0); //arrow button if (id) DefineButton(159,y+1,16,16,id+BT_HIDE+BT_NOFRAME,0); //arrow button

View File

@ -33,7 +33,7 @@ void DisplayOperationForm()
title = T_DELETE_WINDOW_TITLE; title = T_DELETE_WINDOW_TITLE;
copy_bar.progress_color = 0xF17A65; copy_bar.progress_color = 0xF17A65;
} }
copy_bar.frame_color = system.color.work_graph; copy_bar.frame_color = sc.work_graph;
switch(CheckEvent()) switch(CheckEvent())
{ {
case evButton: case evButton:
@ -42,12 +42,12 @@ void DisplayOperationForm()
break; break;
case evReDraw: case evReDraw:
DefineAndDrawWindow(Form.left+Form.width-200,Form.top+90,WIN_DIALOG_W+9,skin_height+WIN_DIALOG_H,0x34,system.color.work,title,0); DefineAndDrawWindow(Form.left+Form.width-200,Form.top+90,WIN_DIALOG_W+9,skin_height+WIN_DIALOG_H,0x34,sc.work,title,0);
GetProcessInfo(#Dialog_Form, SelfInfo); GetProcessInfo(#Dialog_Form, SelfInfo);
DrawCaptButton(WIN_DIALOG_W-PR_LEFT-101, PR_TOP+PR_H+6, 100,26, 2, DrawCaptButton(WIN_DIALOG_W-PR_LEFT-101, PR_TOP+PR_H+6, 100,26, 2,
system.color.work_button, system.color.work_button_text, T_ABORT_WINDOW_BUTTON); sc.button, sc.button_text, T_ABORT_WINDOW_BUTTON);
DrawRectangle3D(PR_LEFT-1, PR_TOP-1, PR_W+1, PR_H+1, system.color.work_dark, system.color.work_light); DrawRectangle3D(PR_LEFT-1, PR_TOP-1, PR_W+1, PR_H+1, sc.work_dark, sc.work_light);
//copying.draw_wrapper(); //copying.draw_wrapper();
} }
} }
@ -65,8 +65,8 @@ void Operation_Draw_Progress(dword filename) {
return; return;
} }
DisplayOperationForm(); DisplayOperationForm();
DrawBar(PR_LEFT, PR_TOP-20, WIN_DIALOG_W-PR_LEFT, 15, system.color.work); DrawBar(PR_LEFT, PR_TOP-20, WIN_DIALOG_W-PR_LEFT, 15, sc.work);
WriteText(PR_LEFT, PR_TOP-20, 0x90, system.color.work_text, filename); WriteText(PR_LEFT, PR_TOP-20, 0x90, sc.work_text, filename);
progressbar_draw stdcall (#copy_bar); progressbar_draw stdcall (#copy_bar);
progressbar_progress stdcall (#copy_bar); progressbar_progress stdcall (#copy_bar);
@ -74,6 +74,6 @@ void Operation_Draw_Progress(dword filename) {
//pause(1); //pause(1);
//copying.draw_progress(copy_bar.value*copying.w/copy_bar.max, copy_bar.value, copy_bar.max-copy_bar.value, ""); //copying.draw_progress(copy_bar.value*copying.w/copy_bar.max, copy_bar.value, copy_bar.max-copy_bar.value, "");
WriteTextWithBg(PR_LEFT, PR_TOP+PR_H+5, 0xD0, system.color.work_text, WriteTextWithBg(PR_LEFT, PR_TOP+PR_H+5, 0xD0, sc.work_text,
sprintf(#param, "%i/%i", copy_bar.value, copy_bar.max), system.color.work); sprintf(#param, "%i/%i", copy_bar.value, copy_bar.max), sc.work);
} }

View File

@ -140,7 +140,7 @@ void SetProperties(int mode)
void ShowConfirmQuestionPopin() void ShowConfirmQuestionPopin()
{ {
apply_question_active = 1; apply_question_active = 1;
DrawPopup(15,80,250,90,1,system.color.work, system.color.work_graph); DrawPopup(15,80,250,90,1,sc.work, sc.work_graph);
WriteText(35, 102, 0x90, 0x000000, QUEST_1); WriteText(35, 102, 0x90, 0x000000, QUEST_1);
WriteText(65, 117, 0x90, 0x000000, QUEST_2); WriteText(65, 117, 0x90, 0x000000, QUEST_2);
DrawStandartCaptButton(62,138,B_SETINGS_APPLY_SUBFOLDER,T_YES); DrawStandartCaptButton(62,138,B_SETINGS_APPLY_SUBFOLDER,T_YES);
@ -272,24 +272,24 @@ void DrawPropertiesWindow()
dword element_size; dword element_size;
incn y; incn y;
char temp_path[sizeof(file_path)]; char temp_path[sizeof(file_path)];
DefineAndDrawWindow(Form.left + 150,150,315,360+skin_height,0x34,system.color.work,WINDOW_TITLE_PROPERTIES,0); DefineAndDrawWindow(Form.left + 150,150,315,360+skin_height,0x34,sc.work,WINDOW_TITLE_PROPERTIES,0);
GetProcessInfo(#pform, SelfInfo); GetProcessInfo(#pform, SelfInfo);
DrawStandartCaptButton(pform.cwidth - 96, pform.cheight-34, B_CLOSE, T_CLOSE); DrawStandartCaptButton(pform.cwidth - 96, pform.cheight-34, B_CLOSE, T_CLOSE);
DrawStandartCaptButton(pform.cwidth -208, pform.cheight-34, B_APPLY, T_APPLY); DrawStandartCaptButton(pform.cwidth -208, pform.cheight-34, B_APPLY, T_APPLY);
WriteText(10, 78, 0x90, system.color.work_text, PR_T_DEST); WriteText(10, 78, 0x90, sc.work_text, PR_T_DEST);
edit_box_draw stdcall (#path_to_file_ed); edit_box_draw stdcall (#path_to_file_ed);
WriteText(10, 97, 0x90, system.color.work_text, PR_T_SIZE); WriteText(10, 97, 0x90, sc.work_text, PR_T_SIZE);
if (selected_count) if (selected_count)
{ {
PropertiesDrawIcon(NULL, "<lot>"); PropertiesDrawIcon(NULL, "<lot>");
sprintf(#folder_info,"%s%d%s%d",SET_6,more_files_count.files,SET_7,more_files_count.folders); sprintf(#folder_info,"%s%d%s%d",SET_6,more_files_count.files,SET_7,more_files_count.folders);
WriteText(file_name_ed.left+4, 30, 0x90, system.color.work_text, #folder_info); WriteText(file_name_ed.left+4, 30, 0x90, sc.work_text, #folder_info);
sprintf(#element_size_label,"%s (%d %s)",ConvertSize64(more_files_count.bytes, NULL),more_files_count.bytes,SET_BYTE_LANG); sprintf(#element_size_label,"%s (%d %s)",ConvertSize64(more_files_count.bytes, NULL),more_files_count.bytes,SET_BYTE_LANG);
WriteText(120, 97, 0x90, system.color.work_text, #element_size_label); WriteText(120, 97, 0x90, sc.work_text, #element_size_label);
} }
else else
{ {
@ -301,24 +301,24 @@ void DrawPropertiesWindow()
if (ext1) ext1 += #file_name2; if (ext1) ext1 += #file_name2;
PropertiesDrawIcon(#temp_path, ext1); PropertiesDrawIcon(#temp_path, ext1);
} }
WriteText(file_name_ed.left, file_name_ed.top-15, 0x80, system.color.work_text, PR_T_NAME); WriteText(file_name_ed.left, file_name_ed.top-15, 0x80, sc.work_text, PR_T_NAME);
DrawEditBox(#file_name_ed); DrawEditBox(#file_name_ed);
if (!itdir) element_size = file_info_general.sizelo; if (!itdir) element_size = file_info_general.sizelo;
else else
{ {
WriteText(10,116, 0x90, system.color.work_text, PR_T_CONTAINS); WriteText(10,116, 0x90, sc.work_text, PR_T_CONTAINS);
sprintf(#folder_info,"%s%d%s%d",SET_6,dir_size.files,SET_7,dir_size.folders); sprintf(#folder_info,"%s%d%s%d",SET_6,dir_size.files,SET_7,dir_size.folders);
WriteText(120, 116, 0x90, system.color.work_text, #folder_info); WriteText(120, 116, 0x90, sc.work_text, #folder_info);
element_size = dir_size.bytes; element_size = dir_size.bytes;
} }
WriteTextLines(10, 136, 0x90, system.color.work_text, CREATED_OPENED_MODIFIED, 20); WriteTextLines(10, 136, 0x90, sc.work_text, CREATED_OPENED_MODIFIED, 20);
DrawDate(120, 136, system.color.work_text, #file_info_general.datecreate); DrawDate(120, 136, sc.work_text, #file_info_general.datecreate);
DrawDate(120, 156, system.color.work_text, #file_info_general.datelastaccess); DrawDate(120, 156, sc.work_text, #file_info_general.datelastaccess);
DrawDate(120, 176, system.color.work_text, #file_info_general.datelastedit); DrawDate(120, 176, sc.work_text, #file_info_general.datelastedit);
sprintf(#element_size_label,"%s (%d %s)",ConvertSize64(element_size, NULL),element_size,SET_BYTE_LANG); sprintf(#element_size_label,"%s (%d %s)",ConvertSize64(element_size, NULL),element_size,SET_BYTE_LANG);
WriteText(120, 99, 0x90, system.color.work_text, #element_size_label); WriteText(120, 99, 0x90, sc.work_text, #element_size_label);
} }
DrawFrame(10, 212, -10*2 + pform.cwidth - 2, 92, FLAGS); DrawFrame(10, 212, -10*2 + pform.cwidth - 2, 92, FLAGS);
y.n = 212; //212 => attributes_frame.y y.n = 212; //212 => attributes_frame.y

View File

@ -108,7 +108,7 @@ void settings_dialog()
case evReDraw: case evReDraw:
DefineAndDrawWindow(Form.cwidth-300/2+Form.left, Form.cheight-292/2+Form.top, 400, DefineAndDrawWindow(Form.cwidth-300/2+Form.left, Form.cheight-292/2+Form.top, 400,
435+skin_height,0x34,system.color.work,TITLE_SETT,0); 435+skin_height,0x34,sc.work,TITLE_SETT,0);
GetProcessInfo(#Settings, SelfInfo); GetProcessInfo(#Settings, SelfInfo);
DrawSettingsCheckBoxes(); DrawSettingsCheckBoxes();
} }
@ -225,28 +225,26 @@ void LoadIcons()
void SetAppColors() void SetAppColors()
{ {
int i; int i;
dword bg_col, old_list_bg_color; static dword bg_col;
system.color.get(); dword old_list_bg_color = col.list_bg;
if (col.work == system.color.work) return; sc.get();
old_list_bg_color = col.list_bg; if (bg_col == sc.work) return;
bg_col = system.color.work; bg_col = sc.work;
if (skin_is_dark()) if (skin_is_dark())
{ {
//use dark colors //use dark colors
col.def = false; col.def = false;
col.list_bg = system.color.work; col.list_bg = sc.work;
col.list_gb_text = system.color.work_text; col.list_gb_text = sc.work_text;
col.list_text_hidden = 0xA6A6B7; col.list_text_hidden = 0xA6A6B7;
col.list_vert_line = system.color.work_graph; col.list_vert_line = sc.work_graph;
col.work = system.color.work; col.lpanel = MixColors(sc.work_graph, sc.work, 65);
col.graph = system.color.work_graph; col.selec = col.selec_active = sc.button;
col.lpanel = MixColors(system.color.work_graph, system.color.work, 65); col.selec_text = sc.button_text;
col.selec = col.selec_active = system.color.work_button; sc.work_dark = MixColors(0, sc.work, 35);
col.selec_text = system.color.work_button_text; if (col.list_bg==col.selec) col.selec = sc.work_graph; //for fucking skins
system.color.work_dark = MixColors(0, system.color.work, 35); col.slider_bg_big = MixColors(0xCED0D0, sc.work, 35);
if (col.list_bg==col.selec) col.selec = system.color.work_graph; //for fucking skins col.odd_line = MixColors(0xFFFfff, sc.work, 15);
col.slider_bg_big = MixColors(0xCED0D0, system.color.work, 35);
col.odd_line = MixColors(0xFFFfff, system.color.work, 15);
} }
else else
{ {
@ -256,18 +254,16 @@ void SetAppColors()
col.list_gb_text = 0x000000; col.list_gb_text = 0x000000;
col.list_text_hidden = 0xA6A6B7; col.list_text_hidden = 0xA6A6B7;
col.list_vert_line = 0xDDD7CF; col.list_vert_line = 0xDDD7CF;
col.work = system.color.work;
col.graph = system.color.work_graph;
col.lpanel = 0x00699C; col.lpanel = 0x00699C;
col.selec = col.selec_active = 0x94AECE; col.selec = col.selec_active = 0x94AECE;
col.selec_text = 0x000000; col.selec_text = 0x000000;
system.color.work_dark = MixColors(0, system.color.work, 35); sc.work_dark = MixColors(0, sc.work, 35);
col.slider_bg_big = 0xCDCFCF; col.slider_bg_big = 0xCDCFCF;
col.odd_line = 0xF1F1F1; col.odd_line = 0xF1F1F1;
} }
col.selec_inactive = MixColors(0xBBBbbb, col.list_bg, 65); col.selec_inactive = MixColors(0xBBBbbb, col.list_bg, 65);
col.slider_bg_left = MixColors(col.graph, col.slider_bg_big, 10); col.slider_bg_left = MixColors(sc.work_graph, col.slider_bg_big, 10);
for (i=0; i<20; i++) col.work_gradient[i] = MixColors(system.color.work_light, system.color.work, i*5); for (i=0; i<20; i++) col.work_gradient[i] = MixColors(sc.work_light, sc.work, i*5);
if (old_list_bg_color!=col.list_bg) LoadIcons(); if (old_list_bg_color!=col.list_bg) LoadIcons();
} }

View File

@ -1,5 +1,5 @@
#define TITLE "Eolite File Manager 4.23" #define TITLE "Eolite File Manager 4.23a"
#define ABOUT_TITLE "EOLITE 4.23" #define ABOUT_TITLE "EOLITE 4.23a"
#ifdef LANG_RUS #ifdef LANG_RUS
?define T_FILE "” ©«" ?define T_FILE "” ©«"

View File

@ -43,7 +43,7 @@ inline GetRevisionNumber()
void draw_window() void draw_window()
{ {
system.color.get(); sc.get();
DefineUnDragableWindow(screen.width-WIN_W-15, GetClientHeight()-WIN_H-15, WIN_W-1, WIN_H-1); DefineUnDragableWindow(screen.width-WIN_W-15, GetClientHeight()-WIN_H-15, WIN_W-1, WIN_H-1);
DrawBar(0,0,WIN_W,WIN_H,0x414155); DrawBar(0,0,WIN_W,WIN_H,0x414155);
DrawWideRectangle(0,0,WIN_W,WIN_H, 3, 0x5555FF); DrawWideRectangle(0,0,WIN_W,WIN_H, 3, 0x5555FF);

View File

@ -47,12 +47,12 @@ void main()
void draw_window() void draw_window()
{ {
system.color.get(); sc.get();
DefineAndDrawWindow(215, 100, 350, 300, 0x34, system.color.work, "Network testing utility",0); DefineAndDrawWindow(215, 100, 350, 300, 0x34, sc.work, "Network testing utility",0);
button.init(10); button.init(10);
key.init(10); key.init(10);
WriteText(10,10, 0x90, system.color.work_text, "Download via:"); WriteText(10,10, 0x90, sc.work_text, "Download via:");
AddEvent(10, 30, #EventRunAsmDownloader, SCAN_CODE_F1, "ASM Downloader [F1]"); AddEvent(10, 30, #EventRunAsmDownloader, SCAN_CODE_F1, "ASM Downloader [F1]");
AddEvent(10, 60, #EventRunCmmDownloader, SCAN_CODE_F2, "C-- Downloader [F2]"); AddEvent(10, 60, #EventRunCmmDownloader, SCAN_CODE_F2, "C-- Downloader [F2]");
AddEvent(10, 120, #EventRunNetStat, SCAN_CODE_F3, "NetStat [F3]"); AddEvent(10, 120, #EventRunNetStat, SCAN_CODE_F3, "NetStat [F3]");

View File

@ -44,12 +44,12 @@ int id;
if (GetKeys()==27) ExitProcess(); if (GetKeys()==27) ExitProcess();
break; break;
case evReDraw: case evReDraw:
system.color.get(); sc.get();
DefineAndDrawWindow(screen.width-fw/2,screen.height-fh/2,fw,fh+skin_height,0x33,0xE0DFE3,"Rainbow (rgb test)",0); DefineAndDrawWindow(screen.width-fw/2,screen.height-fh/2,fw,fh+skin_height,0x33,0xE0DFE3,"Rainbow (rgb test)",0);
_PutImage(0,0,256,256,#image); _PutImage(0,0,256,256,#image);
DrawCaptButton(280,20, 110,30,DRAW1_BTN,system.color.work_button,system.color.work_button_text,"Draw 1"); DrawCaptButton(280,20, 110,30,DRAW1_BTN,sc.button,sc.button_text,"Draw 1");
DrawCaptButton(280,60, 110,30,DRAW2_BTN,system.color.work_button,system.color.work_button_text,"Draw 2"); DrawCaptButton(280,60, 110,30,DRAW2_BTN,sc.button,sc.button_text,"Draw 2");
DrawCaptButton(280,100,110,30,SETBG_BTN,system.color.work_button,system.color.work_button_text,"Background"); DrawCaptButton(280,100,110,30,SETBG_BTN,sc.button,sc.button_text,"Background");
} }
} }

View File

@ -54,9 +54,9 @@ void CanvasReSize_Thread()
case evReDraw: case evReDraw:
DefineAndDrawWindow(Form.left+canvas.x + 100, Form.top+skin_height+canvas.y+40, DefineAndDrawWindow(Form.left+canvas.x + 100, Form.top+skin_height+canvas.y+40,
200, 170, 0x34, system.color.work, "Canvas", 0); 200, 170, 0x34, sc.work, "Canvas", 0);
WriteText(20, 20, 0x90, system.color.work_text, "Width"); WriteText(20, 20, 0x90, sc.work_text, "Width");
WriteText(20, 60, 0x90, system.color.work_text, "Height"); WriteText(20, 60, 0x90, sc.work_text, "Height");
DrawStandartCaptButton(20, 100, BTN_APPLY, "OK"); DrawStandartCaptButton(20, 100, BTN_APPLY, "OK");
DrawEditBoxes(); DrawEditBoxes();
} }

View File

@ -157,16 +157,16 @@ void main()
Libimg_LoadImage(#top_icons, "/sys/icons16.png"); Libimg_LoadImage(#top_icons, "/sys/icons16.png");
Libimg_LoadImage(#left_icons, "/sys/icons16.png"); Libimg_LoadImage(#left_icons, "/sys/icons16.png");
system.color.get(); sc.get();
bg_col = system.color.work; bg_col = sc.work;
bg_dark = skin_is_dark(); bg_dark = skin_is_dark();
semi_white = MixColors(system.color.work, 0xFFFfff, bg_dark*90 + 96); semi_white = MixColors(sc.work, 0xFFFfff, bg_dark*90 + 96);
Libimg_ReplaceColor(top_icons.image, top_icons.w, top_icons.h, 0xffFFFfff, semi_white); Libimg_ReplaceColor(top_icons.image, top_icons.w, top_icons.h, 0xffFFFfff, semi_white);
Libimg_ReplaceColor(top_icons.image, top_icons.w, top_icons.h, 0xffCACBD6, MixColors(semi_white, 0, 220)); Libimg_ReplaceColor(top_icons.image, top_icons.w, top_icons.h, 0xffCACBD6, MixColors(semi_white, 0, 220));
Libimg_ReplaceColor(left_icons.image, left_icons.w, left_icons.h, 0xffFFFfff, system.color.work); Libimg_ReplaceColor(left_icons.image, left_icons.w, left_icons.h, 0xffFFFfff, sc.work);
Libimg_ReplaceColor(left_icons.image, left_icons.w, left_icons.h, 0xffCACBD6, MixColors(system.color.work, 0, 200)); Libimg_ReplaceColor(left_icons.image, left_icons.w, left_icons.h, 0xffCACBD6, MixColors(sc.work, 0, 200));
//fix line and rectandle color for dark skins //fix line and rectandle color for dark skins
if (bg_dark) Libimg_ReplaceColor(left_icons.image, left_icons.w, left_icons.h, 0xff545454, 0xffD3D3D4); if (bg_dark) Libimg_ReplaceColor(left_icons.image, left_icons.w, left_icons.h, 0xff545454, 0xffD3D3D4);
@ -286,10 +286,10 @@ void main()
void DrawTopPanelButton(dword _event, _hotkey, _x, _icon_n) void DrawTopPanelButton(dword _event, _hotkey, _x, _icon_n)
{ {
DrawWideRectangle(_x, 4, 22, 22, 3, semi_white); DrawWideRectangle(_x, 4, 22, 22, 3, semi_white);
PutPixel(_x,4,system.color.work); PutPixel(_x,4,sc.work);
PutPixel(_x,4+21,system.color.work); PutPixel(_x,4+21,sc.work);
PutPixel(_x+21,4,system.color.work); PutPixel(_x+21,4,sc.work);
PutPixel(_x+21,4+21,system.color.work); PutPixel(_x+21,4+21,sc.work);
DefineHiddenButton(_x, 4, 21, 21, button.add(_event)); DefineHiddenButton(_x, 4, 21, 21, button.add(_event));
img_draw stdcall(top_icons.image, _x+3, 7, 16, 16, 0, _icon_n*16); img_draw stdcall(top_icons.image, _x+3, 7, 16, 16, 0, _icon_n*16);
if (_hotkey) key.add_n(_hotkey, _event); if (_hotkey) key.add_n(_hotkey, _event);
@ -301,19 +301,19 @@ int DrawFlatPanelButton(dword _id, _x, _y, _text)
#define P 10 #define P 10
int w = strlen(_text)*6 + P + P; int w = strlen(_text)*6 + P + P;
DrawBar(_x, _y, w, 22, semi_white); DrawBar(_x, _y, w, 22, semi_white);
PutPixel(_x,_y,system.color.work); PutPixel(_x,_y,sc.work);
PutPixel(_x,_y+21,system.color.work); PutPixel(_x,_y+21,sc.work);
PutPixel(_x+w-1,_y,system.color.work); PutPixel(_x+w-1,_y,sc.work);
PutPixel(_x+w-1,_y+21,system.color.work); PutPixel(_x+w-1,_y+21,sc.work);
DefineHiddenButton(_x, _y, w, 21, _id); DefineHiddenButton(_x, _y, w, 21, _id);
WriteText(_x+P, _y+7, 0x80, system.color.work_text, _text); WriteText(_x+P, _y+7, 0x80, sc.work_text, _text);
return w; return w;
} }
void DrawLeftPanelButton(dword _event, _hotkey, _y, _icon_n) void DrawLeftPanelButton(dword _event, _hotkey, _y, _icon_n)
{ {
int x = 5; int x = 5;
DrawRectangle(x, _y, 22-1, 22-1, system.color.work); DrawRectangle(x, _y, 22-1, 22-1, sc.work);
DefineHiddenButton(x, _y, 21, 21, button.add(_event)); DefineHiddenButton(x, _y, 21, 21, button.add(_event));
img_draw stdcall(left_icons.image, x+3, _y+3, 16, 16, 0, _icon_n*16); img_draw stdcall(left_icons.image, x+3, _y+3, 16, 16, 0, _icon_n*16);
key.add_n(_hotkey, _event); key.add_n(_hotkey, _event);
@ -329,8 +329,8 @@ void DrawStatusBar()
calc(strlen(#param)*8)+6, calc(strlen(#param)*8)+6,
18, 18,
button.add(#EventCanvasResize), button.add(#EventCanvasResize),
system.color.work_button, sc.button,
system.color.work_button_text, sc.button_text,
#param #param
); );
} }
@ -343,7 +343,7 @@ void DrawWindow()
#define BLOCK_SPACE 10 #define BLOCK_SPACE 10
incn tx; incn tx;
incn ty; incn ty;
system.color.get(); sc.get();
DefineAndDrawWindow(115+random(100), 50+random(100), 700, 540, 0x73, NULL, T_TITLE, 0); DefineAndDrawWindow(115+random(100), 50+random(100), 700, 540, 0x73, NULL, T_TITLE, 0);
GetProcessInfo(#Form, SelfInfo); GetProcessInfo(#Form, SelfInfo);
if (Form.status_window>2) return; if (Form.status_window>2) return;
@ -354,8 +354,8 @@ void DrawWindow()
right_bar.x = Form.cwidth - right_bar.w; right_bar.x = Form.cwidth - right_bar.w;
b_color_gradient.x = b_last_colors.x = b_default_palette.x = right_bar.x; b_color_gradient.x = b_last_colors.x = b_default_palette.x = right_bar.x;
DrawBar(0, 0, Form.cwidth, TOPBAR_H-1, system.color.work); DrawBar(0, 0, Form.cwidth, TOPBAR_H-1, sc.work);
DrawBar(0, TOPBAR_H-1, Form.cwidth, 1, system.color.work_graph); DrawBar(0, TOPBAR_H-1, Form.cwidth, 1, sc.work_graph);
tx.n = 5-GAPH; tx.n = 5-GAPH;
DrawTopPanelButton(#EventCreateNewIcon, ECTRL + SCAN_CODE_KEY_N, tx.inc(GAPH), 2); DrawTopPanelButton(#EventCreateNewIcon, ECTRL + SCAN_CODE_KEY_N, tx.inc(GAPH), 2);
@ -378,7 +378,7 @@ void DrawWindow()
DrawEditArea(); DrawEditArea();
DrawBar(0, TOPBAR_H, LEFTBAR_W-1, Form.cheight - TOPBAR_H, system.color.work); DrawBar(0, TOPBAR_H, LEFTBAR_W-1, Form.cheight - TOPBAR_H, sc.work);
ty.n = right_bar.y - GAPV - 2; ty.n = right_bar.y - GAPV - 2;
@ -395,19 +395,19 @@ void DrawWindow()
button.add_n(1, #EventExitIconEdit); button.add_n(1, #EventExitIconEdit);
DrawBar(wrapper.x+wrapper.w, TOPBAR_H, Form.cwidth-wrapper.x-wrapper.w, DrawBar(wrapper.x+wrapper.w, TOPBAR_H, Form.cwidth-wrapper.x-wrapper.w,
Form.cheight - TOPBAR_H, system.color.work); Form.cheight - TOPBAR_H, sc.work);
DrawActiveColor(right_bar.y); DrawActiveColor(right_bar.y);
DrawColorPallets(); DrawColorPallets();
DrawPreview(); DrawPreview();
DrawBar(LEFTBAR_W-1, wrapper.y + wrapper.h, wrapper.w+1, DrawBar(LEFTBAR_W-1, wrapper.y + wrapper.h, wrapper.w+1,
Form.cheight - wrapper.y - wrapper.h, system.color.work); Form.cheight - wrapper.y - wrapper.h, sc.work);
DrawStatusBar(); DrawStatusBar();
} }
void DrawLeftPanelSelection() void DrawLeftPanelSelection()
{ {
if (previousTool!=-1) DrawRectangle3D(5, previousTool*GAPV+right_bar.y-2, 16+3+2, 16+3+2, system.color.work, system.color.work); if (previousTool!=-1) DrawRectangle3D(5, previousTool*GAPV+right_bar.y-2, 16+3+2, 16+3+2, sc.work, sc.work);
DrawRectangle3D(5, currentTool*GAPV+right_bar.y-2, 16+3+2, 16+3+2, 0x333333, 0x777777); DrawRectangle3D(5, currentTool*GAPV+right_bar.y-2, 16+3+2, 16+3+2, 0x333333, 0x777777);
} }
@ -437,7 +437,7 @@ void DrawEditArea()
left_side = canvas.x-wrapper.x-1; left_side = canvas.x-wrapper.x-1;
top_side = canvas.y-wrapper.y-1; top_side = canvas.y-wrapper.y-1;
DrawRectangle(wrapper.x-1, wrapper.y-1, wrapper.w, wrapper.h, system.color.work_graph); DrawRectangle(wrapper.x-1, wrapper.y-1, wrapper.w, wrapper.h, sc.work_graph);
if (left_side>0) if (left_side>0)
{ {
@ -468,7 +468,7 @@ void DrawActiveColor(dword iny)
DrawBar(right_bar.x+CELL+5+2, outy+2, CELL-4, CELL-4, color2); DrawBar(right_bar.x+CELL+5+2, outy+2, CELL-4, CELL-4, color2);
//sprintf(#param, "%A", color1); //sprintf(#param, "%A", color1);
//WriteTextWithBg(right_bar.x+30, outy+3, 0xD0, system.color.work_text, #param+4, system.color.work); //WriteTextWithBg(right_bar.x+30, outy+3, 0xD0, sc.work_text, #param+4, sc.work);
DrawCurrentColorGradient(); DrawCurrentColorGradient();
} }
@ -510,7 +510,7 @@ void DrawCurrentColorGradient()
for (i=0 ; i<b_color_gradient.w; i++) { for (i=0 ; i<b_color_gradient.w; i++) {
DrawBar(b_color_gradient.x+i, b_color_gradient.y, 1, b_color_gradient.h, linear_gradient[i]); DrawBar(b_color_gradient.x+i, b_color_gradient.y, 1, b_color_gradient.h, linear_gradient[i]);
} }
DrawGradientMarker(old_marker_pos, system.color.work); DrawGradientMarker(old_marker_pos, sc.work);
old_marker_pos = DrawGradientMarker(lmax, 0xFFFfff * bg_dark); old_marker_pos = DrawGradientMarker(lmax, 0xFFFfff * bg_dark);
} }
@ -620,7 +620,7 @@ void ShowWindow_TestIcon()
DrawImageWithBg(0, 0, 0x000000); DrawImageWithBg(0, 0, 0x000000);
DrawImageWithBg(1, 0, 0xFFFfff); DrawImageWithBg(1, 0, 0xFFFfff);
DrawImageWithBg(0, 1, GetPixelColorFromScreen(0, 0)); DrawImageWithBg(0, 1, GetPixelColorFromScreen(0, 0));
DrawImageWithBg(1, 1, system.color.work); DrawImageWithBg(1, 1, sc.work);
break; break;
} }
} }

View File

@ -13,7 +13,7 @@ void PipetteTool_onMouseEvent(int mouseX, int mouseY, int lkm, int pkm) {
DrawBar(Form.cwidth-30, 5, 20, 20, tool_color); DrawBar(Form.cwidth-30, 5, 20, 20, tool_color);
if (mouse.down) { if (mouse.down) {
DrawBar(Form.cwidth-30, 5, 20, 20, system.color.work); DrawBar(Form.cwidth-30, 5, 20, 20, sc.work);
SetEventMask(EVM_REDRAW+EVM_KEY+EVM_BUTTON+EVM_MOUSE+EVM_MOUSE_FILTER); SetEventMask(EVM_REDRAW+EVM_KEY+EVM_BUTTON+EVM_MOUSE+EVM_MOUSE_FILTER);
if (mouse.key&MOUSE_LEFT) EventSetActiveColor(1, tool_color); if (mouse.key&MOUSE_LEFT) EventSetActiveColor(1, tool_color);
if (mouse.key&MOUSE_RIGHT) EventSetActiveColor(2, tool_color); if (mouse.key&MOUSE_RIGHT) EventSetActiveColor(2, tool_color);

View File

@ -77,9 +77,9 @@ void main()
#define WINH 300 #define WINH 300
void draw_window() void draw_window()
{ {
system.color.get(); sc.get();
DefineAndDrawWindow(screen.width-WINW/2,screen.height-WINH/2, DefineAndDrawWindow(screen.width-WINW/2,screen.height-WINH/2,
WINW+9,WINH+skin_height,0x34,system.color.work,"KolibriN10",0); WINW+9,WINH+skin_height,0x34,sc.work,"KolibriN10",0);
DrawLogo(); DrawLogo();
if (install_complete) DrawInstallComplete(); else DrawIntro(); if (install_complete) DrawInstallComplete(); else DrawIntro();
} }
@ -87,15 +87,15 @@ void draw_window()
void DrawIntro() void DrawIntro()
{ {
DrawTextViewArea(30, 140, WINW-60, WINH-80, DrawTextViewArea(30, 140, WINW-60, WINH-80,
T_INTRO, -1, system.color.work_text); T_INTRO, -1, sc.work_text);
DrawCaptButton(WINW-110/2, WINH-70, 110, 28, B_INSTALL, DrawCaptButton(WINW-110/2, WINH-70, 110, 28, B_INSTALL,
0x0092D8, 0xFFFfff, T_INSTALL); 0x0092D8, 0xFFFfff, T_INSTALL);
} }
void DrawInstallComplete() void DrawInstallComplete()
{ {
DrawIcon32(WINW-32/2, 140, system.color.work, 49); DrawIcon32(WINW-32/2, 140, sc.work, 49);
WriteTextCenter(0,185, WINW, system.color.work_text, T_COMPLETE); WriteTextCenter(0,185, WINW, sc.work_text, T_COMPLETE);
DrawCaptButton(WINW-110/2, WINH-70, 110, 28, CLOSE_BTN, DrawCaptButton(WINW-110/2, WINH-70, 110, 28, CLOSE_BTN,
0x0092D8, 0xFFFfff, T_EXIT); 0x0092D8, 0xFFFfff, T_EXIT);
} }

View File

@ -38,7 +38,7 @@ void main()
if (btn==PHRASE_TAB) || (btn==CHARS_TAB) tabs.click(btn); if (btn==PHRASE_TAB) || (btn==CHARS_TAB) tabs.click(btn);
goto _DRAW_WINDOW_CONTENT; goto _DRAW_WINDOW_CONTENT;
case evReDraw: case evReDraw:
system.color.get(); sc.get();
DefineAndDrawWindow(215,100,WIN_W+9,WIN_H+skin_height+5,0x74,0xFFFFFF,#title,0); DefineAndDrawWindow(215,100,WIN_W+9,WIN_H+skin_height+5,0x74,0xFFFFFF,#title,0);
GetProcessInfo(#Form, SelfInfo); GetProcessInfo(#Form, SelfInfo);
if (Form.status_window>2) break; if (Form.status_window>2) break;
@ -47,8 +47,8 @@ void main()
kfont.bold = bold.checked; kfont.bold = bold.checked;
kfont.smooth = smooth.checked; kfont.smooth = smooth.checked;
DrawBar(0, 0, Form.cwidth, PANELH-1, system.color.work); DrawBar(0, 0, Form.cwidth, PANELH-1, sc.work);
DrawBar(0, PANELH-1,Form.cwidth,1,system.color.work_graph); DrawBar(0, PANELH-1,Form.cwidth,1,sc.work_graph);
bold.draw(10, 8); bold.draw(10, 8);
smooth.draw(83,8); smooth.draw(83,8);
colored.draw(170,8); colored.draw(170,8);

View File

@ -13,4 +13,24 @@
word year; 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 #endif

View File

@ -87,17 +87,17 @@
int ty = y + padding_v+1; int ty = y + padding_v+1;
int tw = strlen(text)*8; int tw = strlen(text)*8;
int w = tw + padding_h + padding_h; 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+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) { if (active_button_id==id) {
DrawBar(tx,ty+15,tw,1, darker_color); 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; return w + right_margin;
@ -146,8 +146,8 @@
if (ESI.edit_box.flags & 100000000000b) bg = 0xCACACA; else bg = 0xFFFfff; if (ESI.edit_box.flags & 100000000000b) bg = 0xCACACA; else bg = 0xFFFfff;
edit_box_draw stdcall (edit_box_pointer); edit_box_draw stdcall (edit_box_pointer);
DrawRectangle3D(x-1, y-1, w+1, h+1, 0xE7E7E7, bg); DrawRectangle3D(x-1, y-1, w+1, h+1, 0xE7E7E7, bg);
DrawRectangle(x-2, y-2, w+3, h+3, system.color.work_graph); DrawRectangle(x-2, y-2, w+3, h+3, sc.work_graph);
DrawRectangle3D(x-3, y-3, w+5, h+5, system.color.work_dark, system.color.work_light); DrawRectangle3D(x-3, y-3, w+5, h+5, sc.work_dark, sc.work_light);
} }
#define DOT_W 37 #define DOT_W 37
@ -163,11 +163,11 @@
if (ESI.edit_box.flags & 100000000000b) bg = 0xCACACA; else bg = 0xFFFfff; if (ESI.edit_box.flags & 100000000000b) bg = 0xCACACA; else bg = 0xFFFfff;
edit_box_draw stdcall (edit_box_pointer); edit_box_draw stdcall (edit_box_pointer);
DrawRectangle3D(x-1, y-1, w+1, h+1, 0xE7E7E7, bg); DrawRectangle3D(x-1, y-1, w+1, h+1, 0xE7E7E7, bg);
DrawRectangle(x-2, y-2, w+3, h+3, system.color.work_graph); DrawRectangle(x-2, y-2, w+3, h+3, sc.work_graph);
DrawRectangle3D(x-3, y-3, w+DOT_W+5, h+5, system.color.work_dark, system.color.work_light); 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); WriteText(x-2, y-19, 0x90, sc.work_text, title);
DrawCaptButton(x+w+1, y-2, DOT_W, h+3, btn, system.color.work_button, system.color.work_button_text, "..."); DrawCaptButton(x+w+1, y-2, DOT_W, h+3, btn, sc.button, sc.button_text, "...");
} }
:void DrawEditBoxPos(dword x,y, edit_box_pointer) :void DrawEditBoxPos(dword x,y, edit_box_pointer)
@ -229,9 +229,9 @@
:void Draw3DPopup(dword x,y,w,h) :void Draw3DPopup(dword x,y,w,h)
{ {
DrawRectangle3D(x,y,w,h, system.color.work_dark, system.color.work_graph); DrawRectangle3D(x,y,w,h, sc.work_dark, sc.work_graph);
DrawBar(x+1,y+1,w-1,1,system.color.work_light); DrawBar(x+1,y+1,w-1,1,sc.work_light);
DrawBar(x+1,y+2,1,h-2,system.color.work_light); DrawBar(x+1,y+2,1,h-2,sc.work_light);
DrawPopupShadow(x,y,w,h-1,0); DrawPopupShadow(x,y,w,h-1,0);
} }
@ -302,7 +302,7 @@
:bool skin_is_dark() :bool skin_is_dark()
{ {
dword gray; dword gray;
dword color_image = #system.color.work; dword color_image = #sc.work;
gray = DSBYTE[color_image]*DSBYTE[color_image]; gray = DSBYTE[color_image]*DSBYTE[color_image];
gray += DSBYTE[color_image+1]*DSBYTE[color_image+1]; gray += DSBYTE[color_image+1]*DSBYTE[color_image+1];

View File

@ -61,17 +61,17 @@ struct checkbox
:void checkbox::draw(dword _x,_y) :void checkbox::draw(dword _x,_y)
{ {
#define SIZE 14 #define SIZE 14
dword text_col = system.color.work_text; dword text_col = sc.work_text;
if (!id) id = GetFreeButtonId(); if (!id) id = GetFreeButtonId();
x=_x; y=_y; x=_x; y=_y;
DefineButton(x-1, y-1, strlen(text)*8 + SIZE + 17, SIZE+2, id+BT_HIDE+BT_NOFRAME, 0); 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) if (disabled)
{ {
DrawRectangle(x+1, y+1, SIZE-2, SIZE-2, 0xffffff); DrawRectangle(x+1, y+1, SIZE-2, SIZE-2, 0xffffff);
DrawBar(x+2, y+2, SIZE-3, SIZE-3, 0xCCCccc); 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) else if (checked == false)
{ {
@ -82,8 +82,8 @@ struct checkbox
{ {
_PutImage(x+1, y+1, 13, 13, #checkbox_flag); _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); 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,system.color.work_dark,system.color.work_light); DrawRectangle3D(x-1,y-1,SIZE+2,SIZE+2,sc.work_dark,sc.work_light);
} }
:void checkbox::redraw() :void checkbox::redraw()

View File

@ -49,27 +49,27 @@
check_values(); check_values();
x=_x; y=_y; 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); DrawRectangle3D(x+1, y+1, VALUE_FIELD_W-2, SIZE-2, 0xDDDddd, 0xffffff);
if (disabled) if (disabled)
{ {
DrawRectangle(x+1, y+1, VALUE_FIELD_W-2, SIZE-2, 0xffffff); DrawRectangle(x+1, y+1, VALUE_FIELD_W-2, SIZE-2, 0xffffff);
DrawBar(x+2, y+2, VALUE_FIELD_W-3, SIZE-3, 0xCCCccc); DrawBar(x+2, y+2, VALUE_FIELD_W-3, SIZE-3, 0xCCCccc);
text_col = system.color.work_graph; text_col = sc.work_graph;
} }
else else
{ {
DrawBar(x+2, y+2, VALUE_FIELD_W-3, SIZE-3, 0xffffff); 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); 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 + 1, y, SIZE, SIZE, id_inc, sc.button, sc.button_text, "+");
DrawCaptButton(VALUE_FIELD_W + x + SIZE, y, SIZE, SIZE, id_dec, system.color.work_button, system.color.work_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, system.color.work); 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,system.color.work_dark,system.color.work_light); DrawRectangle3D(x-1,y-1,VALUE_FIELD_W+SIZE+SIZE+2,SIZE+2,sc.work_dark,sc.work_light);
} }
:void more_less_box::redraw() :void more_less_box::redraw()

View File

@ -23,8 +23,8 @@
:void sensor::draw_wrapper() :void sensor::draw_wrapper()
{ {
DrawRectangle(x-1, y-1, w+1, h+1, system.color.work_graph); DrawRectangle(x-1, y-1, w+1, h+1, sc.work_graph);
DrawRectangle3D(x-2, y-2, w+3, h+3, system.color.work_dark, system.color.work_light); 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) :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, w-progress_w, 1, MixColors(PROGRESS_ACTIVE, PROGRESS_BG, 200));
DrawBar(x, y+1, w-progress_w, h-2, PROGRESS_ACTIVE); 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); 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); WriteText(w-progress_w- calc(strlen(#param)*8) /2 + x, h/2-7+y, 0x90, PROGRESS_BG, #param);

View File

@ -13,8 +13,8 @@
:void _tabs::draw_wrapper() :void _tabs::draw_wrapper()
{ {
DrawRectangle(x,y+TAB_HEIGHT,w-1,h-TAB_HEIGHT, system.color.work_graph); 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, system.color.work_light); 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) :void _tabs::draw_button(dword xx, but_id, text)
@ -25,12 +25,12 @@
if (but_id==active_tab) if (but_id==active_tab)
{ {
col_bg=0xE44C9C; col_bg=0xE44C9C;
col_text=system.color.work_text; col_text=sc.work_text;
} }
else else
{ {
col_bg=0xC3A1B7; 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); DefineHiddenButton(xx-2,y, ww-1+4,hh-1, but_id);
WriteText(xx, y+6, 0x90, col_text, text); WriteText(xx, y+6, 0x90, col_text, text);

View File

@ -519,6 +519,7 @@ inline fastcall dword SetWindowLayerBehaviour(EDX, ESI)
:void PutPaletteImage(dword inbuf,w,h,x,y,bits,pal) :void PutPaletteImage(dword inbuf,w,h,x,y,bits,pal)
{ {
if (h<1) || (w<0) return;
EAX = 65; EAX = 65;
EBX = inbuf; EBX = inbuf;
ECX = w<<16+h; ECX = w<<16+h;
@ -641,26 +642,6 @@ inline fastcall dword GetStartTime()
:byte skin_height; :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 dword __generator; // random number generator init
//The initialization of the initial data before running //The initialization of the initial data before running
@ -670,7 +651,7 @@ void ______INIT______()
screen.width = GetScreenWidth()+1; screen.width = GetScreenWidth()+1;
screen.height = GetScreenHeight()+1; screen.height = GetScreenHeight()+1;
__generator = GetStartTime(); __generator = GetStartTime();
mem_init(); //mem_init();
main(); main();
} }
______STOP______: ______STOP______:

View File

@ -219,10 +219,10 @@ struct frame
:frame frame123 = { 0, 260, 10, 60, 16, NULL, 0xFFFfff, 1, NULL, 0, 1, 12, 0x000111, 0xCCCccc }; :frame frame123 = { 0, 260, 10, 60, 16, NULL, 0xFFFfff, 1, NULL, 0, 1, 12, 0x000111, 0xCCCccc };
:void DrawFrame(dword x,y,w,h,text) :void DrawFrame(dword x,y,w,h,text)
{ {
frame123.font_color = system.color.work_text; frame123.font_color = sc.work_text;
frame123.ext_col = system.color.work_graph; frame123.ext_col = sc.work_graph;
frame123.int_col = system.color.work_light; frame123.int_col = sc.work_light;
frame123.font_backgr_color = system.color.work; frame123.font_backgr_color = sc.work;
frame123.start_x = x; frame123.start_x = x;
frame123.start_y = y; frame123.start_y = y;

View File

@ -53,15 +53,15 @@ void SelectList_ProcessMouse()
void SelectList_DrawBorder() { void SelectList_DrawBorder() {
DrawRectangle3D(select_list.x-2, select_list.y-2, DrawRectangle3D(select_list.x-2, select_list.y-2,
select_list.w+3+scroll1.size_x, select_list.h+3, select_list.w+3+scroll1.size_x, select_list.h+3,
system.color.work_dark, system.color.work_light); 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, system.color.work_graph); 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() void SelectList_DrawScroller()
{ {
scroll1.bckg_col = MixColors(system.color.work, 0xBBBbbb, 80); scroll1.bckg_col = MixColors(sc.work, 0xBBBbbb, 80);
scroll1.frnt_col = MixColors(system.color.work,0xFFFfff,120); scroll1.frnt_col = MixColors(sc.work,0xFFFfff,120);
scroll1.line_col = system.color.work_graph; scroll1.line_col = sc.work_graph;
scroll1.max_area = select_list.count; scroll1.max_area = select_list.count;
scroll1.cur_area = select_list.visible; scroll1.cur_area = select_list.visible;

View File

@ -7,8 +7,8 @@ void DrawTopPanelButton(dword _button_id, _x, _y, signed int _icon_n)
if (!semi_white) { if (!semi_white) {
Libimg_LoadImage(#top_icons, "/sys/icons16.png"); Libimg_LoadImage(#top_icons, "/sys/icons16.png");
semi_white = MixColors(system.color.work, 0xFFFfff, skin_is_dark()*90 + 96); semi_white = MixColors(sc.work, 0xFFFfff, skin_is_dark()*90 + 96);
bg_col_dark = MixColors(system.color.work, system.color.work_graph, 90); bg_col_dark = MixColors(sc.work, sc.work_graph, 90);
bg_col_light = MixColors(semi_white, 0xFFFfff, skin_is_dark()*90 + 10); 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); Libimg_ReplaceColor(top_icons.image, top_icons.w, top_icons.h, 0xffFFFfff, semi_white);
@ -16,7 +16,7 @@ void DrawTopPanelButton(dword _button_id, _x, _y, signed int _icon_n)
} }
DrawWideRectangle(_x+1, _y+1, TSZE, TSZE, 5, semi_white); 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); DefineHiddenButton(_x, _y, TSZE+1, TSZE+1, _button_id);
if (_icon_n==-1) { if (_icon_n==-1) {

View File

@ -14,7 +14,7 @@ dword
work_text, work_text,
work_graph; work_graph;
void get(); void get();
}; } sc;
:void COLORS::get() :void COLORS::get()
{ {
@ -25,9 +25,4 @@ dword
$int 0x40 $int 0x40
} }
:struct SYSTEM
{
COLORS color;
} system;
#endif #endif

View File

@ -125,8 +125,8 @@ void main() {
int DefineWindow(dword wtitle) { int DefineWindow(dword wtitle) {
system.color.get(); sc.get();
DefineAndDrawWindow(GetScreenWidth()-WIN_W/2,GetScreenHeight()-WIN_H/2, WIN_W, WIN_H, 0x73,system.color.work, 0,0); DefineAndDrawWindow(GetScreenWidth()-WIN_W/2,GetScreenHeight()-WIN_H/2, WIN_W, WIN_H, 0x73,sc.work, 0,0);
DrawTitle(wtitle); DrawTitle(wtitle);
GetProcessInfo(#Form, SelfInfo); GetProcessInfo(#Form, SelfInfo);
if (Form.status_window>2) return 0; //rolled_up if (Form.status_window>2) return 0; //rolled_up

View File

@ -177,20 +177,20 @@ void DrawLoginScreen()
panel_x = Form.cwidth - PANEL_W /2; panel_x = Form.cwidth - PANEL_W /2;
panel_y = Form.cheight - PANEL_H /2 - 5; panel_y = Form.cheight - PANEL_H /2 - 5;
DrawBar(0,0, Form.cwidth, Form.cheight, system.color.work); DrawBar(0,0, Form.cwidth, Form.cheight, sc.work);
WriteText(panel_x,panel_y-3,0x80,system.color.work_text,"Your Email:"); WriteText(panel_x,panel_y-3,0x80,sc.work_text,"Your Email:");
DrawEditBoxPos(panel_x+3, panel_y+12, #login_box); DrawEditBoxPos(panel_x+3, panel_y+12, #login_box);
WriteText(panel_x,panel_y+45,0x80,system.color.work_text,"Password:"); WriteText(panel_x,panel_y+45,0x80,sc.work_text,"Password:");
DrawEditBoxPos(panel_x+3, panel_y+60, #pass_box); DrawEditBoxPos(panel_x+3, panel_y+60, #pass_box);
if (!aim) if (!aim)
{ {
DrawCaptButton(panel_x,panel_y+100,100,26,11,system.color.work_button, system.color.work_button_text,"Settings"); DrawCaptButton(panel_x,panel_y+100,100,26,11,sc.button, sc.button_text,"Settings");
DrawCaptButton(panel_x+120,panel_y+100,100,26,12,system.color.work_button, system.color.work_button_text,"Enter >"); DrawCaptButton(panel_x+120,panel_y+100,100,26,12,sc.button, sc.button_text,"Enter >");
} }
else DrawCaptButton(panel_x+120,panel_y+100,100,26,12,system.color.work_button, system.color.work_button_text,"Stop"); else DrawCaptButton(panel_x+120,panel_y+100,100,26,12,sc.button, sc.button_text,"Stop");
SetLoginStatus(cur_st_text); SetLoginStatus(cur_st_text);
} }
@ -217,6 +217,6 @@ void GetSettings()
void SetLoginStatus(dword text1) void SetLoginStatus(dword text1)
{ {
if (text1) WriteText(10, Form.cheight-22, 0x80, system.color.work_text, text1); if (text1) WriteText(10, Form.cheight-22, 0x80, sc.work_text, text1);
cur_st_text = text1; cur_st_text = text1;
} }

View File

@ -66,7 +66,7 @@ void MailBoxNetworkProcess() {
break; break;
case SEND_NLIST: case SEND_NLIST:
WriteText(5, Form.cheight-11, 0x80, system.color.work_text, "Send LIST, awaiting answer..."); WriteText(5, Form.cheight-11, 0x80, sc.work_text, "Send LIST, awaiting answer...");
request_len = GetRequest("LIST", NULL); request_len = GetRequest("LIST", NULL);
Send(socketnum, #request, request_len, 0); Send(socketnum, #request, request_len, 0);
if (EAX == 0xffffffff) {debugln("Error while sending LIST. Retry..."); break;} if (EAX == 0xffffffff) {debugln("Error while sending LIST. Retry..."); break;}
@ -238,12 +238,12 @@ void MailBoxLoop() {
if (id==CHANGE_CHARSET) if (id==CHANGE_CHARSET)
{ {
DefineButton(0,0,Form.cwidth,Form.cheight, CLOSE_CHANGE_CHARSET+BT_HIDE+BT_NOFRAME); DefineButton(0,0,Form.cwidth,Form.cheight, CLOSE_CHANGE_CHARSET+BT_HIDE+BT_NOFRAME);
DrawRectangle(Form.cwidth-100, Form.cheight-status_bar_h- 70, 70, 82, system.color.work_graph); DrawRectangle(Form.cwidth-100, Form.cheight-status_bar_h- 70, 70, 82, sc.work_graph);
DrawRectangle3D(Form.cwidth-99, Form.cheight-status_bar_h- 69, 68, 80, 0xFFFfff, system.color.work); DrawRectangle3D(Form.cwidth-99, Form.cheight-status_bar_h- 69, 68, 80, 0xFFFfff, sc.work);
for (id=0; id<5; id++) for (id=0; id<5; id++)
{ {
if (cur_charset==id+1) { line_col=system.color.work_button; text_col=system.color.work_button_text; } if (cur_charset==id+1) { line_col=sc.button; text_col=sc.button_text; }
else { line_col=system.color.work; text_col=system.color.work_text; } else { line_col=sc.work; text_col=sc.work_text; }
DrawBar(Form.cwidth-98, id*16+Form.cheight-status_bar_h- 68, 67, 16, line_col); DrawBar(Form.cwidth-98, id*16+Form.cheight-status_bar_h- 68, 67, 16, line_col);
DrawCaptButton(Form.cwidth-100, id*16+Form.cheight-status_bar_h- 68, 70,16, 10+id+BT_HIDE, DrawCaptButton(Form.cwidth-100, id*16+Form.cheight-status_bar_h- 68, 70,16, 10+id+BT_HIDE,
0, text_col, charsets[id+1]); 0, text_col, charsets[id+1]);
@ -265,8 +265,8 @@ void MailBoxLoop() {
case evReDraw: _MB_DRAW: case evReDraw: _MB_DRAW:
if !(DefineWindow(MAILBOX_HEADER)) break; if !(DefineWindow(MAILBOX_HEADER)) break;
scroll1.bckg_col = scroll_wv.bckg_col = 0xBBBbbb; scroll1.bckg_col = scroll_wv.bckg_col = 0xBBBbbb;
scroll1.frnt_col = scroll_wv.frnt_col = system.color.work; scroll1.frnt_col = scroll_wv.frnt_col = sc.work;
scroll1.line_col = scroll_wv.line_col = system.color.work_graph; scroll1.line_col = scroll_wv.line_col = sc.work_graph;
DrawToolbar(); DrawToolbar();
DrawMailBox(); DrawMailBox();
@ -295,12 +295,12 @@ void DrawToolbar() {
int toolbar_w = BUT_Y + BUT_H + BUT_Y + 3; int toolbar_w = BUT_Y + BUT_H + BUT_Y + 3;
mail_list.SetSizes(0, toolbar_w, Form.cwidth - scroll1.size_x - 1, mail_list.h, 18); mail_list.SetSizes(0, toolbar_w, Form.cwidth - scroll1.size_x - 1, mail_list.h, 18);
DrawBar(0,0, Form.cwidth,toolbar_w-3, system.color.work); DrawBar(0,0, Form.cwidth,toolbar_w-3, sc.work);
DrawCaptButton(10 , BUT_Y, BUT_W, BUT_H, GET_MAIL, system.color.work_button, system.color.work_button_text,"Get mail"); DrawCaptButton(10 , BUT_Y, BUT_W, BUT_H, GET_MAIL, sc.button, sc.button_text,"Get mail");
DrawCaptButton(BUT_W+ 20, BUT_Y, BUT_W+10, BUT_H, SAVE_LETTER, system.color.work_button, system.color.work_button_text,"Save letter"); DrawCaptButton(BUT_W+ 20, BUT_Y, BUT_W+10, BUT_H, SAVE_LETTER, sc.button, sc.button_text,"Save letter");
DrawCaptButton(Form.cwidth-BUT_W - 10, BUT_Y, BUT_W, BUT_H, EXIT_MAIL, system.color.work_button, system.color.work_button_text,"< Exit"); DrawCaptButton(Form.cwidth-BUT_W - 10, BUT_Y, BUT_W, BUT_H, EXIT_MAIL, sc.button, sc.button_text,"< Exit");
DrawBar(0, mail_list.y-3, mail_list.w,1, system.color.work_graph); DrawBar(0, mail_list.y-3, mail_list.w,1, sc.work_graph);
DrawBar(0, mail_list.y-2, mail_list.w,1, 0xdfdfdf); DrawBar(0, mail_list.y-2, mail_list.w,1, 0xdfdfdf);
DrawBar(0, mail_list.y-1, mail_list.w,1, 0xf0f0f0); DrawBar(0, mail_list.y-1, mail_list.w,1, 0xf0f0f0);
} }
@ -332,22 +332,22 @@ void DrawMailList() {
void DrawLetterInfo() { void DrawLetterInfo() {
int lt_y = mail_list.y+mail_list.h; int lt_y = mail_list.y+mail_list.h;
DrawBar(0, lt_y, mail_list.w, 1, system.color.work_graph); DrawBar(0, lt_y, mail_list.w, 1, sc.work_graph);
DrawBar(0, lt_y+1, Form.cwidth, 1, LBUMP); DrawBar(0, lt_y+1, Form.cwidth, 1, LBUMP);
DrawBar(0, lt_y+2, Form.cwidth, LIST_INFO_H-4, system.color.work); DrawBar(0, lt_y+2, Form.cwidth, LIST_INFO_H-4, sc.work);
WriteText(mail_list.w-30/2, lt_y, 0x80, 0x888888, "= = ="); WriteText(mail_list.w-30/2, lt_y, 0x80, 0x888888, "= = =");
WriteText(mail_list.w-30/2, lt_y+1, 0x80, 0xEeeeee, "= = ="); WriteText(mail_list.w-30/2, lt_y+1, 0x80, 0xEeeeee, "= = =");
DrawBar(0, lt_y+LIST_INFO_H-2, Form.cwidth, 1, system.color.work_graph); //bottom DrawBar(0, lt_y+LIST_INFO_H-2, Form.cwidth, 1, sc.work_graph); //bottom
DrawBar(0, lt_y+LIST_INFO_H-1, Form.cwidth, 1, 0xdfdfdf); DrawBar(0, lt_y+LIST_INFO_H-1, Form.cwidth, 1, 0xdfdfdf);
DrawBar(0, lt_y+LIST_INFO_H , Form.cwidth, 1, 0xf0f0f0); DrawBar(0, lt_y+LIST_INFO_H , Form.cwidth, 1, 0xf0f0f0);
WriteTextB(10, lt_y+8 , 0x80, system.color.work_text, "From:"); WriteTextB(10, lt_y+8 , 0x80, sc.work_text, "From:");
WriteText (45, lt_y+8 , 0x80, system.color.work_text, #from); WriteText (45, lt_y+8 , 0x80, sc.work_text, #from);
WriteTextB(10, lt_y+20, 0x80, system.color.work_text, "To:"); WriteTextB(10, lt_y+20, 0x80, sc.work_text, "To:");
WriteText (45, lt_y+20, 0x80, system.color.work_text, #to); WriteText (45, lt_y+20, 0x80, sc.work_text, #to);
WriteTextB(10, lt_y+32, 0x80, system.color.work_text, "Date:"); WriteTextB(10, lt_y+32, 0x80, sc.work_text, "Date:");
WriteText (45, lt_y+32, 0x80, system.color.work_text, #date); WriteText (45, lt_y+32, 0x80, sc.work_text, #date);
WriteTextB(10, lt_y+44, 0x80, system.color.work_text, "Subj:"); WriteTextB(10, lt_y+44, 0x80, sc.work_text, "Subj:");
WriteText (45, lt_y+44, 0x80, system.color.work_text, #subj); WriteText (45, lt_y+44, 0x80, sc.work_text, #subj);
} }
@ -382,20 +382,20 @@ void DrawScroller1() {
void DrawStatusBar() { void DrawStatusBar() {
int st_y = Form.cheight -status_bar_h; int st_y = Form.cheight -status_bar_h;
DrawBar(0, st_y, Form.cwidth, status_bar_h, system.color.work); DrawBar(0, st_y, Form.cwidth, status_bar_h, sc.work);
if (aim) { if (aim) {
SetMailBoxStatus(cur_st_percent, cur_st_text); SetMailBoxStatus(cur_st_percent, cur_st_text);
DrawCaptButton(240, st_y+1, 36, status_bar_h-3, STOP_LOADING, system.color.work_button, system.color.work_button_text,"Stop"); DrawCaptButton(240, st_y+1, 36, status_bar_h-3, STOP_LOADING, sc.button, sc.button_text,"Stop");
} }
DrawCaptButton(Form.cwidth - 100, st_y+1, 70, status_bar_h-2, CHANGE_CHARSET+BT_HIDE, DrawCaptButton(Form.cwidth - 100, st_y+1, 70, status_bar_h-2, CHANGE_CHARSET+BT_HIDE,
system.color.work, system.color.work_text,cur_charset*10+#charsets); sc.work, sc.work_text,cur_charset*10+#charsets);
} }
void SetMailBoxStatus(dword percent1, text1) { void SetMailBoxStatus(dword percent1, text1) {
DrawProgressBar(3, Form.cheight -status_bar_h + 1, 220, 12, system.color.work, 0xC3C3C3, 0x54B1D6, system.color.work_text, percent1); DrawProgressBar(3, Form.cheight -status_bar_h + 1, 220, 12, sc.work, 0xC3C3C3, 0x54B1D6, sc.work_text, percent1);
WriteText(3, Form.cheight -status_bar_h + 1, 0x80, system.color.work_text, text1); WriteText(3, Form.cheight -status_bar_h + 1, 0x80, sc.work_text, text1);
cur_st_percent = percent1; cur_st_percent = percent1;
cur_st_text = text1; cur_st_text = text1;
} }

View File

@ -79,7 +79,7 @@ void SettingsDialog()
case evReDraw: _OPT_WIN: case evReDraw: _OPT_WIN:
if !(DefineWindow(OPTIONS_HEADER)) break; if !(DefineWindow(OPTIONS_HEADER)) break;
DrawBar(0,0, Form.cwidth, Form.cheight, system.color.work); DrawBar(0,0, Form.cwidth, Form.cheight, sc.work);
DrawOptionsWindow(); DrawOptionsWindow();
break; break;
} }
@ -91,14 +91,14 @@ void DrawOptionsWindow()
int i; int i;
incn y; incn y;
y.n=0; y.n=0;
DrawBar(0, Form.cheight - 40, Form.cwidth, 1, system.color.work_graph); DrawBar(0, Form.cheight - 40, Form.cwidth, 1, sc.work_graph);
DrawBar(0, Form.cheight - 40+1, Form.cwidth, 1, LBUMP); DrawBar(0, Form.cheight - 40+1, Form.cwidth, 1, LBUMP);
DrawCaptButton(Form.cwidth-79, Form.cheight-32, 70, 25, 19, system.color.work_button, system.color.work_button_text,"Apply"); DrawCaptButton(Form.cwidth-79, Form.cheight-32, 70, 25, 19, sc.button, sc.button_text,"Apply");
WriteText(ELEM_X, y.inc(20), 0x81, system.color.work_text, "Network settings"); WriteText(ELEM_X, y.inc(20), 0x81, sc.work_text, "Network settings");
automatic.draw(ELEM_X, y.inc(65)); automatic.draw(ELEM_X, y.inc(65));
for (i=0; i<4; i++) { for (i=0; i<4; i++) {
WriteTextWithBg(ELEM_X+40, i*35+POP_server_box.top + 3, 0xD0, system.color.work_text, text1[i], system.color.work); WriteTextWithBg(ELEM_X+40, i*35+POP_server_box.top + 3, 0xD0, sc.work_text, text1[i], sc.work);
} }
DrawEditBox(#POP_server_box); DrawEditBox(#POP_server_box);
DrawEditBox(#POP_server_port_box); DrawEditBox(#POP_server_port_box);

View File

@ -100,7 +100,7 @@ void main()
break; break;
case evReDraw: case evReDraw:
system.color.get(); sc.get();
DefineAndDrawWindow(215,100,CELL_SIZE+4*10 + 4 + 9,PANEL_Y+4+PANEL_H+skin_height, DefineAndDrawWindow(215,100,CELL_SIZE+4*10 + 4 + 9,PANEL_Y+4+PANEL_H+skin_height,
0x34,0xC0C0C0,"Memory Blocks",0); 0x34,0xC0C0C0,"Memory Blocks",0);
GetProcessInfo(#Form, SelfInfo); GetProcessInfo(#Form, SelfInfo);
@ -187,17 +187,17 @@ void Draw_Pressed_Block(dword x, y)
void Draw_Panel() void Draw_Panel()
{ {
DrawBar(0, PANEL_Y, Form.cwidth, 1, system.color.work_dark); DrawBar(0, PANEL_Y, Form.cwidth, 1, sc.work_dark);
DrawBar(0, PANEL_Y+1, Form.cwidth, 1, system.color.work_light); DrawBar(0, PANEL_Y+1, Form.cwidth, 1, sc.work_light);
DrawBar(0, PANEL_Y+2, Form.cwidth, PANEL_H-2, system.color.work); DrawBar(0, PANEL_Y+2, Form.cwidth, PANEL_H-2, sc.work);
DrawStandartCaptButton(9, PANEL_Y+5, 5, LABEL_NEW_GAME); DrawStandartCaptButton(9, PANEL_Y+5, 5, LABEL_NEW_GAME);
Draw_Count(); Draw_Count();
} }
void Draw_Count() void Draw_Count()
{ {
DrawBar(Form.cwidth-32,PANEL_Y + 12,30,12,system.color.work); DrawBar(Form.cwidth-32,PANEL_Y + 12,30,12,sc.work);
WriteNumber(Form.cwidth-32, PANEL_Y + 12, 0x90, system.color.work_text, 3, count); WriteNumber(Form.cwidth-32, PANEL_Y + 12, 0x90, sc.work_text, 3, count);
} }

View File

@ -141,7 +141,7 @@ void main()
case evReDraw: case evReDraw:
DefineAndDrawWindow(win_x, win_y, menu1.w+4, menu1.h+4, 0x01, 0, 0, 0x01fffFFF); DefineAndDrawWindow(win_x, win_y, menu1.w+4, menu1.h+4, 0x01, 0, 0, 0x01fffFFF);
system.color.get(); sc.get();
Draw3DPopup(0,0,menu1.w+2,menu1.h+2); Draw3DPopup(0,0,menu1.w+2,menu1.h+2);
draw_list(); draw_list();
} }
@ -188,10 +188,10 @@ void draw_list()
static bool colors_set; static bool colors_set;
if (!colors_set) { if (!colors_set) {
colors_set = true; colors_set = true;
inactive_background_color = MixColors(system.color.work, 0xFFFfff,230); inactive_background_color = MixColors(sc.work, 0xFFFfff,230);
active_background_color = MixColors(system.color.work_button, system.color.work,230); active_background_color = MixColors(sc.button, sc.work,230);
active_top_border_color = MixColors(system.color.work_graph, system.color.work_button,240); active_top_border_color = MixColors(sc.work_graph, sc.button,240);
inactive_text_shadow_color = MixColors(system.color.work,0xFFFfff,120); inactive_text_shadow_color = MixColors(sc.work,0xFFFfff,120);
skin_dark = skin_is_dark(); skin_dark = skin_is_dark();
} }
@ -199,22 +199,22 @@ void draw_list()
{ {
if (streq(names.get(i), "-")) { if (streq(names.get(i), "-")) {
DrawBar(menu1.x, item_y+0, menu1.w, 1, inactive_background_color); DrawBar(menu1.x, item_y+0, menu1.w, 1, inactive_background_color);
DrawBar(menu1.x-1, item_y+1, menu1.w+1, 1, system.color.work_dark); DrawBar(menu1.x-1, item_y+1, menu1.w+1, 1, sc.work_dark);
DrawBar(menu1.x, item_y+2, menu1.w, 1, system.color.work_light); DrawBar(menu1.x, item_y+2, menu1.w, 1, sc.work_light);
DrawBar(menu1.x, item_y+3, menu1.w, 1, inactive_background_color); DrawBar(menu1.x, item_y+3, menu1.w, 1, inactive_background_color);
//DrawBar(menu1.x, item_y+0, menu1.w, 4, inactive_background_color); //DrawBar(menu1.x, item_y+0, menu1.w, 4, inactive_background_color);
//DrawBar(13, item_y+1, menu1.w-24, 1, system.color.work_dark); //DrawBar(13, item_y+1, menu1.w-24, 1, sc.work_dark);
//DrawBar(13, item_y+2, menu1.w-24, 1, system.color.work_light); //DrawBar(13, item_y+2, menu1.w-24, 1, sc.work_light);
item_y += SEP_H; item_y += SEP_H;
} else { } else {
if (item_i==menu1.cur_y) { if (item_i==menu1.cur_y) {
hotkey_color = name_color = system.color.work_button_text; hotkey_color = name_color = sc.button_text;
DrawBar(menu1.x, item_y+1, menu1.w, ITEM_H-2, active_background_color); DrawBar(menu1.x, item_y+1, menu1.w, ITEM_H-2, active_background_color);
DrawBar(menu1.x, item_y, menu1.w, 1, active_top_border_color); DrawBar(menu1.x, item_y, menu1.w, 1, active_top_border_color);
DrawBar(menu1.x, item_y+ITEM_H-1, menu1.w, 1, system.color.work_light); DrawBar(menu1.x, item_y+ITEM_H-1, menu1.w, 1, sc.work_light);
} else { } else {
name_color = system.color.work_text; name_color = sc.work_text;
hotkey_color = system.color.work_graph; hotkey_color = sc.work_graph;
DrawBar(menu1.x, item_y, menu1.w, ITEM_H, inactive_background_color); DrawBar(menu1.x, item_y, menu1.w, ITEM_H, inactive_background_color);
if (!skin_dark) WriteText(13+1, item_y + menu1.text_y +1, 0x80, if (!skin_dark) WriteText(13+1, item_y + menu1.text_y +1, 0x80,
inactive_text_shadow_color, names.get(i)); inactive_text_shadow_color, names.get(i));

View File

@ -99,8 +99,8 @@ void main() {
break; break;
case evReDraw: case evReDraw:
system.color.get(); sc.get();
DefineAndDrawWindow(430, 150, 424, 343+skin_height,0x34,system.color.work,WINDOW_TITLE,0); DefineAndDrawWindow(430, 150, 424, 343+skin_height,0x34,sc.work,WINDOW_TITLE,0);
GetProcessInfo(#Form, SelfInfo); GetProcessInfo(#Form, SelfInfo);
if (Form.status_window>2) break; if (Form.status_window>2) break;
mouse_frame.w = - FRAME_X * 2 + Form.cwidth; mouse_frame.w = - FRAME_X * 2 + Form.cwidth;

View File

@ -105,7 +105,7 @@ void main()
case evReDraw: case evReDraw:
SetAppColors(); SetAppColors();
DefineAndDrawWindow(screen.width-window_width/2,screen.height-window_height/2,window_width,window_height,0x74,system.color.work,"",0); DefineAndDrawWindow(screen.width-window_width/2,screen.height-window_height/2,window_width,window_height,0x74,sc.work,"",0);
GetProcessInfo(#Form, SelfInfo); GetProcessInfo(#Form, SelfInfo);
if (Form.status_window>2) { if (Form.status_window>2) {
DrawTitle(#window_title); DrawTitle(#window_title);
@ -127,16 +127,16 @@ void main()
void SetAppColors() void SetAppColors()
{ {
dword bg_col, old_list_bg_color; dword bg_col, old_list_bg_color;
system.color.get(); sc.get();
old_list_bg_color = swc.list_bg; old_list_bg_color = swc.list_bg;
bg_col = system.color.work; bg_col = sc.work;
if (skin_is_dark()) if (skin_is_dark())
{ {
//dark colors //dark colors
swc.list_bg = system.color.work; swc.list_bg = sc.work;
swc.text = system.color.work_text; swc.text = sc.work_text;
swc.dark = system.color.work_dark; swc.dark = sc.work_dark;
swc.light = system.color.work_light; swc.light = sc.work_light;
} else { } else {
//light colors //light colors
swc.list_bg = 0xF3F3F3; swc.list_bg = 0xF3F3F3;
@ -242,10 +242,10 @@ byte process_sections(dword sec_name, f_name)
void DrawTopBar() void DrawTopBar()
{ {
DrawBar(0,0,Form.cwidth, list.y-2, system.color.work); DrawBar(0,0,Form.cwidth, list.y-2, sc.work);
DrawBar(0,list.y-2, Form.cwidth, 1, MixColors(system.color.work, system.color.work_graph, 180)); DrawBar(0,list.y-2, Form.cwidth, 1, MixColors(sc.work, sc.work_graph, 180));
DrawBar(0,list.y-1, Form.cwidth, 1, system.color.work_graph); DrawBar(0,list.y-1, Form.cwidth, 1, sc.work_graph);
kfont.WriteIntoWindowCenter(0,5, Form.cwidth, list.y, system.color.work, system.color.work_text, 16, #window_title); kfont.WriteIntoWindowCenter(0,5, Form.cwidth, list.y, sc.work, sc.work_text, 16, #window_title);
} }
void EventIconClick(dword appid) void EventIconClick(dword appid)

View File

@ -75,9 +75,9 @@ void General__Main()
GetFreeRAM()/1024, GetFreeRAM()/1024,
"M" "M"
); );
DrawBar(ram.x+ram.w-96, ram.y-25, 96, 20, system.color.work); DrawBar(ram.x+ram.w-96, ram.y-25, 96, 20, sc.work);
sprintf(#param, "%i KiB", GetTotalRAM()-GetFreeRAM()); sprintf(#param, "%i KiB", GetTotalRAM()-GetFreeRAM());
WriteText(ram.x+ram.w-calc(strlen(#param)*8), ram.y-25, 0x90, system.color.work_text, #param); WriteText(ram.x+ram.w-calc(strlen(#param)*8), ram.y-25, 0x90, sc.work_text, #param);
//MonitorRd(); //MonitorRd();
dir_size.get("/rd/1"); dir_size.get("/rd/1");
@ -111,9 +111,9 @@ void General__Main()
void DrawBlockHeader(dword _x, _y, _icon, _title, _subtitle) void DrawBlockHeader(dword _x, _y, _icon, _title, _subtitle)
{ {
#define ICONGAP 45 #define ICONGAP 45
WriteTextB(_x+ICONGAP, _y, 0x90, system.color.work_text, _title); WriteTextB(_x+ICONGAP, _y, 0x90, sc.work_text, _title);
DrawIcon32(_x, _y, system.color.work, _icon); DrawIcon32(_x, _y, sc.work, _icon);
WriteText(_x+ICONGAP, _y+20, 0x90, system.color.work_text, _subtitle); WriteText(_x+ICONGAP, _y+20, 0x90, sc.work_text, _subtitle);
} }
dword GetCpuLoad(dword max_h) dword GetCpuLoad(dword max_h)
@ -164,9 +164,9 @@ void MonitorCpu()
cpu_stack[pos] = GetCpuLoad(cpu.h); cpu_stack[pos] = GetCpuLoad(cpu.h);
if (cpu_stack[pos]<=2) || (cpu_stack[pos]>cpu.h) cpu_stack[pos]=2; if (cpu_stack[pos]<=2) || (cpu_stack[pos]>cpu.h) cpu_stack[pos]=2;
DrawBar(cpu.x+cpu.w-30, cpu.y-25, 30, 20, system.color.work); DrawBar(cpu.x+cpu.w-30, cpu.y-25, 30, 20, sc.work);
sprintf(#param, "%i%%", cpu_stack[pos]); sprintf(#param, "%i%%", cpu_stack[pos]);
WriteText(cpu.x+cpu.w-calc(strlen(#param)*8), cpu.y-25, 0x90, system.color.work_text, #param); WriteText(cpu.x+cpu.w-calc(strlen(#param)*8), cpu.y-25, 0x90, sc.work_text, #param);
for (i=0; i<WIN_CONTENT_W; i+=2) { for (i=0; i<WIN_CONTENT_W; i+=2) {
DrawBar(i+cpu.x, cpu.y, 1, cpu.h-cpu_stack[i], PROGRESS_BG); DrawBar(i+cpu.x, cpu.y, 1, cpu.h-cpu_stack[i], PROGRESS_BG);

View File

@ -75,16 +75,16 @@ void Processes__Main()
WIN_CONTENT_H-BOTPANEL_H-TAB_HEIGHT, false); WIN_CONTENT_H-BOTPANEL_H-TAB_HEIGHT, false);
SelectList_DrawBorder(); SelectList_DrawBorder();
//DrawWideRectangle(0, 0, Form.cwidth, Form.cheight, 4, system.color.work); //DrawWideRectangle(0, 0, Form.cwidth, Form.cheight, 4, sc.work);
DrawBar(select_list.x-2, select_list.y+select_list.h+2, DrawBar(select_list.x-2, select_list.y+select_list.h+2,
select_list.w+scroll1.size_x+4, BOTPANEL_H, system.color.work); select_list.w+scroll1.size_x+4, BOTPANEL_H, sc.work);
DrawCaptButton(Form.cwidth-110-WIN_PAD, DrawCaptButton(Form.cwidth-110-WIN_PAD,
select_list.y+select_list.h+5, select_list.y+select_list.h+5,
110,25,BTN_ID_KILL_PROCESS,0xF38181, 0xFFFfff, T_END_PROCESS); 110,25,BTN_ID_KILL_PROCESS,0xF38181, 0xFFFfff, T_END_PROCESS);
DrawCaptButton(Form.cwidth-230-WIN_PAD, DrawCaptButton(Form.cwidth-230-WIN_PAD,
select_list.y+select_list.h+5, select_list.y+select_list.h+5,
110,25,BTN_ID_SHOW_PROCESS_INFO, 110,25,BTN_ID_SHOW_PROCESS_INFO,
system.color.work_button, system.color.work_button_text, T_DETAILS); sc.button, sc.button_text, T_DETAILS);
show_system.draw(select_list.x + 3, select_list.y+select_list.h+10); show_system.draw(select_list.x + 3, select_list.y+select_list.h+10);
default: default:
SelectList_LineChanged(); SelectList_LineChanged();

View File

@ -61,9 +61,9 @@ void main()
int Sysmon__DefineAndDrawWindow() int Sysmon__DefineAndDrawWindow()
{ {
system.color.get(); sc.get();
DefineAndDrawWindow(screen.width - WIN_CONTENT_H - 200, 100, WIN_CONTENT_W + WIN_PAD + WIN_PAD +9, DefineAndDrawWindow(screen.width - WIN_CONTENT_H - 200, 100, WIN_CONTENT_W + WIN_PAD + WIN_PAD +9,
WIN_CONTENT_H + TAB_HEIGHT + skin_height + 4, 0x34, system.color.work, "System Monitor",0); WIN_CONTENT_H + TAB_HEIGHT + skin_height + 4, 0x34, sc.work, "System Monitor",0);
GetProcessInfo(#Form, SelfInfo); GetProcessInfo(#Form, SelfInfo);
if (Form.status_window>2) return false; if (Form.status_window>2) return false;
//if (Form.width < 300) { MoveSize(OLD,OLD,300,OLD); break; } //if (Form.width < 300) { MoveSize(OLD,OLD,300,OLD); break; }

View File

@ -141,15 +141,15 @@ void Main_Window()
} }
break; break;
case evReDraw: case evReDraw:
system.color.get(); sc.get();
DefineAndDrawWindow(170,150,405,290,0x74,system.color.work,"Virtual Disk Manager 0.69",0); DefineAndDrawWindow(170,150,405,290,0x74,sc.work,"Virtual Disk Manager 0.69",0);
GetProcessInfo(#Form, SelfInfo); GetProcessInfo(#Form, SelfInfo);
if (Form.status_window>2) break; if (Form.status_window>2) break;
DrawBar(0,0, Form.cwidth,TOPPANELH, system.color.work); DrawBar(0,0, Form.cwidth,TOPPANELH, sc.work);
DrawBar(0,TOPPANELH, Form.cwidth,1, system.color.work_graph); DrawBar(0,TOPPANELH, Form.cwidth,1, sc.work_graph);
WriteText(6, 9, 0x90, system.color.work_text, SIZE_TEXT); WriteText(6, 9, 0x90, sc.work_text, SIZE_TEXT);
DrawRectangle(edit_disk_size.left-1, edit_disk_size.top-1, edit_disk_size.width+2, 23,system.color.work_graph); DrawRectangle(edit_disk_size.left-1, edit_disk_size.top-1, edit_disk_size.width+2, 23,sc.work_graph);
edit_box_draw stdcall (#edit_disk_size); edit_box_draw stdcall (#edit_disk_size);
x = 6 + DrawStandartCaptButton(6, 36, 10, T_ADD_DISK); x = 6 + DrawStandartCaptButton(6, 36, 10, T_ADD_DISK);
DrawStandartCaptButton(x, 36, 11, T_DELETE_DISK); DrawStandartCaptButton(x, 36, 11, T_DELETE_DISK);
@ -230,10 +230,10 @@ void DrawTmpDisks()
byte i; byte i;
DrawBar(0,TOPPANELH+1, Form.cwidth,Form.cheight-TOPPANELH-BOTPANELH-2, 0xFFFFFF); DrawBar(0,TOPPANELH+1, Form.cwidth,Form.cheight-TOPPANELH-BOTPANELH-2, 0xFFFFFF);
DrawBar(0,Form.cheight-BOTPANELH-1, Form.cwidth,1, system.color.work_graph); DrawBar(0,Form.cheight-BOTPANELH-1, Form.cwidth,1, sc.work_graph);
DrawBar(0,Form.cheight-BOTPANELH, Form.cwidth,BOTPANELH, system.color.work); DrawBar(0,Form.cheight-BOTPANELH, Form.cwidth,BOTPANELH, sc.work);
sprintf(#free_ram_text, FREE_RAM_TEXT, GetFreeRAM()/1024); sprintf(#free_ram_text, FREE_RAM_TEXT, GetFreeRAM()/1024);
WriteText(10, Form.cheight-20, 0x90, system.color.work_text, #free_ram_text); WriteText(10, Form.cheight-20, 0x90, sc.work_text, #free_ram_text);
if (disk_num==0) if (disk_num==0)
{ {
WriteText(17,TOPPANELH+15, 0x90, 0x777777, INTRO_TEXT_1); WriteText(17,TOPPANELH+15, 0x90, 0x777777, INTRO_TEXT_1);

View File

@ -417,14 +417,14 @@ void draw_window()
incn x; incn x;
DefineAndDrawWindow(Form.left,Form.top,Form.width,Form.height,0x73,0,#title,0); DefineAndDrawWindow(Form.left,Form.top,Form.width,Form.height,0x73,0,#title,0);
GetProcessInfo(#Form, SelfInfo); GetProcessInfo(#Form, SelfInfo);
system.color.get(); sc.get();
if (Form.status_window>2) return; if (Form.status_window>2) return;
if (Form.width < 200) { MoveSize(OLD,OLD,200,OLD); return; } if (Form.width < 200) { MoveSize(OLD,OLD,200,OLD); return; }
if (Form.height < 200) { MoveSize(OLD,OLD,OLD,200); return; } if (Form.height < 200) { MoveSize(OLD,OLD,OLD,200); return; }
DrawBar(0, 0, Form.cwidth, TOOLBAR_H - 1, system.color.work); DrawBar(0, 0, Form.cwidth, TOOLBAR_H - 1, sc.work);
DrawBar(0, TOOLBAR_H - 1, Form.cwidth, 1, system.color.work_graph); DrawBar(0, TOOLBAR_H - 1, Form.cwidth, 1, sc.work_graph);
x.n = 0; x.n = 0;
DrawToolbarButton(OPEN_FILE, x.inc(8)); DrawToolbarButton(OPEN_FILE, x.inc(8));
@ -460,8 +460,8 @@ void DrawToolbarButton(char image_id, int x)
{ {
DefineButton(x+1, 6, TOOLBAR_ICON_WIDTH, TOOLBAR_ICON_HEIGHT, 10+image_id + BT_HIDE, 0); DefineButton(x+1, 6, TOOLBAR_ICON_WIDTH, TOOLBAR_ICON_HEIGHT, 10+image_id + BT_HIDE, 0);
//img_draw stdcall(skin.image, x, 5, TOOLBAR_ICON_WIDTH, TOOLBAR_ICON_HEIGHT, TOOLBAR_ICON_WIDTH-1*image_id, 0); //img_draw stdcall(skin.image, x, 5, TOOLBAR_ICON_WIDTH, TOOLBAR_ICON_HEIGHT, TOOLBAR_ICON_WIDTH-1*image_id, 0);
DrawOvalBorder(x, 5, TOOLBAR_ICON_WIDTH, TOOLBAR_ICON_HEIGHT, system.color.work_graph, DrawOvalBorder(x, 5, TOOLBAR_ICON_WIDTH, TOOLBAR_ICON_HEIGHT, sc.work_graph,
system.color.work_graph,system.color.work_graph, system.color.work_dark); sc.work_graph,sc.work_graph, sc.work_dark);
img_draw stdcall(skin.image, x+1, 5+1, TOOLBAR_ICON_WIDTH, TOOLBAR_ICON_HEIGHT, TOOLBAR_ICON_WIDTH*image_id, 0); img_draw stdcall(skin.image, x+1, 5+1, TOOLBAR_ICON_WIDTH, TOOLBAR_ICON_HEIGHT, TOOLBAR_ICON_WIDTH*image_id, 0);
} }

View File

@ -383,7 +383,7 @@ proc load_settings ;//////////////////////////////////////////////////////////
mov [auto_braces],al mov [auto_braces],al
invoke ini.get_int,ini_path,ini_sec_options,ini_options_auto_indent,1 invoke ini.get_int,ini_path,ini_sec_options,ini_options_auto_indent,1
mov [auto_indent],al mov [auto_indent],al
invoke ini.get_int,ini_path,ini_sec_options,ini_options_optim_save,1 invoke ini.get_int,ini_path,ini_sec_options,ini_options_optim_save,0
mov [optim_save],al mov [optim_save],al
invoke ini.get_int,ini_path,ini_sec_options,ini_options_line_nums,0 invoke ini.get_int,ini_path,ini_sec_options,ini_options_line_nums,0
mov [line_nums],al mov [line_nums],al