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 padding = 12;
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;
}
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);
GetProcessInfo(#Form, SelfInfo);
DrawBar(0, 0, Form.cwidth, TOPPANELH-1, system.color.work);
DrawBar(0, TOPPANELH-1, Form.cwidth, 1, system.color.work_dark);
DrawBar(0, Form.cheight-BOTPANELH, Form.cwidth, BOTPANELH, system.color.work);
DrawBar(0, 0, Form.cwidth, TOPPANELH-1, sc.work);
DrawBar(0, TOPPANELH-1, Form.cwidth, 1, sc.work_dark);
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_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.height < 200) { MoveSize(OLD,OLD,OLD,200); return; }
system.color.get();
sc.get();
list.SetSizes(0, TOOLBAR_H, Form.cwidth-scroll.size_x-1,
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};
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);
if (_status_text) {
status_text.start_x = 7;
status_text.start_y = Form.cheight - STATUSBAR_H + 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;
PathShow_prepare stdcall(#status_text);
PathShow_draw stdcall(#status_text);

View File

@ -103,16 +103,16 @@ void draw_window()
{
incn y;
y.n=0;
system.color.get();
DefineAndDrawWindow(screen.width-570/2, 100, 570, 300+skin_height, 0x34, system.color.work, WINDOW_TITLE_TEXT,0);
sc.get();
DefineAndDrawWindow(screen.width-570/2, 100, 570, 300+skin_height, 0x34, sc.work, WINDOW_TITLE_TEXT,0);
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);
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();
}

View File

@ -181,8 +181,8 @@ void main()
void draw_window()
{
system.color.get();
DefineAndDrawWindow(screen.width-600/2,80,630,504+skin_height,0x34,system.color.work,WINDOW_HEADER,0);
sc.get();
DefineAndDrawWindow(screen.width-600/2,80,630,504+skin_height,0x34,sc.work,WINDOW_HEADER,0);
GetProcessInfo(#Form, SelfInfo);
IF (Form.status_window>=2) return;
DrawWindowContent();
@ -193,7 +193,7 @@ void DrawWindowContent()
int id;
int list_w;
system.color.get();
sc.get();
if (tabs.active_tab == SKINS) list_w=250; else list_w=350;
@ -222,7 +222,7 @@ void DrawWindowContent()
SelectList_Draw();
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)
{
@ -278,8 +278,8 @@ void SelectList_DrawLine(dword 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);
WriteText(select_list.x+12,yyy+select_list.text_y,select_list.font_type,system.color.work_button_text, #temp_filename);
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,sc.button_text, #temp_filename);
}
else
{

View File

@ -13,9 +13,9 @@ void DrawUiElementsPreview(dword x,y,h)
incn y2;
y2.n = y;
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);
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);
DrawStandartCaptButton(x, y+h-40, GetFreeButtonId(), "Button1");
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)
{
dword c_inactive = MixColors(system.color.work_graph, system.color.work, 128);
dword c_active = MixColors(system.color.work_graph, 0, 128);
dword c_inactive = MixColors(sc.work_graph, sc.work, 128);
dword c_active = MixColors(sc.work_graph, 0, 128);
ESI = edit_box_pointer;
ESI.edit_box.left = x;
ESI.edit_box.top = y;

View File

@ -146,8 +146,8 @@ void main()
break;
case evReDraw:
system.color.get();
DefineAndDrawWindow(130, 150, 465, 398 + skin_height, 0x34, system.color.work, WINDOW_TITLE, 0);
sc.get();
DefineAndDrawWindow(130, 150, 465, 398 + skin_height, 0x34, sc.work, WINDOW_TITLE, 0);
GetProcessInfo(#Form, SelfInfo);
if (Form.status_window>2) break;
DrawWindowContent();
@ -170,7 +170,7 @@ void DrawWindowContent()
y.n = frame_y;
DefineButton(22, y.inc(18), PIMG_W-1, PIMG_H-1, 100 + BT_HIDE, 0);
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));
tbClock.draw(win_center_x, y.n);
tbSoftenDown.draw(22, y.inc(24));
@ -188,7 +188,7 @@ void DrawWindowContent()
frame_y = calc(y.inc(20));
DefineButton(22, y.inc(18), PIMG_W-1, PIMG_H-1, 200 + BT_HIDE, 0);
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));
dkAshow.draw(win_center_x, y.n);
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);
GetProcessInfo(#Form, SelfInfo);
ProcessMenuClick();
system.color.get();
sc.get();
if (Form.status_window>2) break;
if (Form.height<120) { MoveSize(OLD,OLD,OLD,120); break; }
if (Form.width<280) { MoveSize(OLD,OLD,280,OLD); break; }
@ -307,19 +307,19 @@ void draw_window()
int i;
SetElementSizes();
DrawBar(0,0, Form.cwidth,PADDING, system.color.work);
DrawBar(0,PADDING+TSZE+1, Form.cwidth,PADDING-1, system.color.work);
DrawBar(0,TOOLBAR_H-2, Form.cwidth,1, MixColors(system.color.work_dark, system.color.work, 180));
DrawBar(0,TOOLBAR_H-1, Form.cwidth,1, system.color.work_graph);
DrawBar(0, PADDING, address_box.left-2, 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, system.color.work);
DrawBar(0,0, Form.cwidth,PADDING, sc.work);
DrawBar(0,PADDING+TSZE+1, Form.cwidth,PADDING-1, sc.work);
DrawBar(0,TOOLBAR_H-2, Form.cwidth,1, MixColors(sc.work_dark, sc.work, 180));
DrawBar(0,TOOLBAR_H-1, Form.cwidth,1, sc.work_graph);
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, sc.work);
DrawTopPanelButton(BACK_BUTTON, PADDING-1, PADDING, 30);
DrawTopPanelButton(FORWARD_BUTTON, PADDING+TSZE+PADDING-2, PADDING, 31);
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,
WB1.list.h-1, scroll_wv.bckg_col);
@ -859,12 +859,12 @@ void EventUpdateBrowser()
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_y = Form.cheight - STATUSBAR_H + 4;
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(0,Form.cheight - STATUSBAR_H+1, Form.cwidth,STATUSBAR_H-1, 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, sc.work);
if (_status_text) {
status_text.text_pointer = _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,
60, 12, CHANGE_ENCODING);
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()
{
int imgxoff;
DrawOvalBorder(address_box.left-2, address_box.top-3, address_box.width+18, 24, system.color.work_graph,
system.color.work_graph, system.color.work_graph, system.color.work_dark);
DrawOvalBorder(address_box.left-2, address_box.top-3, address_box.width+18, 24, sc.work_graph,
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-1, address_box.width+18, 1, 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;
SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER + EVM_STACK);
system.color.get();
pb.frame_color = system.color.work_dark;
sc.get();
pb.frame_color = sc.work_dark;
filepath[0] = NULL;
@ -66,7 +66,7 @@ void Downloader()
break;
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);
if (DL_Form.status_window>2) break;
if (DL_Form.height<120) MoveSize(OLD,OLD,OLD,120);
@ -111,7 +111,7 @@ void DL_Draw_Window()
{
int but_x = 0;
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(302);
DeleteButton(305);
@ -130,7 +130,7 @@ void DL_Draw_Window()
DrawStandartCaptButton(DL_Form.width - 190, but_y, 302, STOP_DOWNLOADING);
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.offset=0;
DrawEditBox(#ed);
@ -188,8 +188,8 @@ void DrawDownloading()
{
char bytes_received[70];
sprintf(#bytes_received, KB_RECEIVED, ConvertSizeToKb(downloader.httpd.content_received) );
DrawBar(CONX, pb.top + 22, pb.width, 16, system.color.work);
WriteText(CONX, pb.top + 22, 0x90, system.color.work_text, #bytes_received);
DrawBar(CONX, pb.top + 22, pb.width, 16, sc.work);
WriteText(CONX, pb.top + 22, 0x90, sc.work_text, #bytes_received);
//CalculateSpeed();
progressbar_draw stdcall(#pb);
}

View File

@ -84,25 +84,25 @@ void DrawTab(int _id)
if (_id==tab.active) {
tab.save_state();
bgcol = system.color.work_light;
border_bottom_color = system.color.work_light;
bgcol = sc.work_light;
border_bottom_color = sc.work_light;
} else {
bgcol=system.color.work;
border_bottom_color = system.color.work_graph;
bgcol=sc.work;
border_bottom_color = sc.work_graph;
}
if (data[_id].header) {
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);
}
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_H-1, tab_w-1, 1, border_bottom_color);
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);
DrawBar(xxx+tab_w-CLOSE_S-3, TOOLBAR_H+3, CLOSE_S, CLOSE_S, system.color.work_dark);
WriteText(xxx+tab_w-CLOSE_S+1, TOOLBAR_H+5, 0x80, system.color.work_light, "x");
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, sc.work_light, "x");
}
void DrawActiveTab()
@ -113,17 +113,17 @@ void DrawActiveTab()
int DrawNewTabButton()
{
dword btn_light = MixColors(system.color.work_button, 0xFFFfff, 220);
dword btn_dark = MixColors(system.color.work_button, 0, 180);
dword btn_light = MixColors(sc.button, 0xFFFfff, 220);
dword btn_dark = MixColors(sc.button, 0, 180);
int xxx = tab.count * tab_w;
if (tab.count < TABS_MAX) {
DrawBar(xxx, TOOLBAR_H, 1, TAB_H, system.color.work_graph);
DrawBar(xxx+1, TOOLBAR_H, TAB_H, TAB_H-1, system.color.work_button);
DrawBar(xxx, TOOLBAR_H, 1, TAB_H, sc.work_graph);
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);
PutPixel(xxx+1+TAB_H, TOOLBAR_H, btn_dark);
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;
} else {
return xxx;
@ -136,8 +136,8 @@ void DrawTabsBar()
tab_w = GetTabWidth();
for (i=0; i<tab.count; i++) DrawTab(i);
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+TAB_H-1, Form.cwidth-i, 1, system.color.work_graph);
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, sc.work_graph);
}
void EventTabClose(int _id)

View File

@ -77,7 +77,7 @@ void main()
break;
case evReDraw:
system.color.get();
sc.get();
DefineAndDrawWindow(screen.width-700/2,80,700,454+skin_height,0x73,0xE4DFE1,WINDOW_HEADER,0);
GetProcessInfo(#Form, SelfInfo);
IF (Form.status_window>=2) break;
@ -103,14 +103,14 @@ void main()
void DrawWindowContent()
{
int button_x = select_list.x;
DrawBar(0,0, Form.cwidth, PANEL_TOP_H, system.color.work);
DrawBar(0,Form.cheight-PANEL_BOTTOM_H, Form.cwidth, PANEL_BOTTOM_H, 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, 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, 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, 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_ALL_SLOTS, T_DELETE_ALL_SLOTS);
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+select_list.w - 88-14, select_list.y - 23, select_list.font_type, system.color.work_text, T_COLUMN_VIEW);
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, sc.work_text, T_COLUMN_VIEW);
ClipViewSelectListDraw();
SelectList_DrawBorder();
}

View File

@ -136,9 +136,9 @@ void main()
break;
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);
system.color.get();
sc.get();
if (Form.status_window>2) break;
if (Form.height<120) { MoveSize(OLD,OLD,OLD,120); break; }
if (Form.width<280) { MoveSize(OLD,OLD,280,OLD); break; }
@ -166,12 +166,12 @@ void SetElementSizes()
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-1, Form.cwidth,1, system.color.work_graph);
DrawRectangle(address_box.left-3, address_box.top-3, address_box.width+4, 25,system.color.work_graph);
DrawBar(0,Form.cheight - STATUSBAR_H, Form.cwidth,STATUSBAR_H, system.color.work);
DrawBar(0,Form.cheight - STATUSBAR_H, 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,sc.work_graph);
DrawBar(0,Form.cheight - STATUSBAR_H, Form.cwidth,STATUSBAR_H, sc.work);
DrawBar(0,Form.cheight - STATUSBAR_H, Form.cwidth,1, sc.work_graph);
DrawEditBoxWebView();
if (!WB1.header) {
OpenPage(#current_path);

View File

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

View File

@ -95,8 +95,8 @@ void gui()
void draw_window()
{
system.color.get();
DefineAndDrawWindow(215, 100, WIN_W+9, 170 + skin_height, 0x34, system.color.work, #window_title,0);
sc.get();
DefineAndDrawWindow(215, 100, WIN_W+9, 170 + skin_height, 0x34, sc.work, #window_title,0);
//GetProcessInfo(#Form, SelfInfo);
if (READY==state) {
DrawFileBox(#src_box, T_FIRST, BID_SRC_OPEN);
@ -105,9 +105,9 @@ void draw_window()
}
#ifdef COPYING
if (COPYING==state) {
pr.frame_color = system.color.work_graph;
DrawRectangle3D(PR_LEFT-1, PR_TOP-1, PR_W+1, PR_H+1, system.color.work_dark,
system.color.work_light);
pr.frame_color = sc.work_graph;
DrawRectangle3D(PR_LEFT-1, PR_TOP-1, PR_W+1, PR_H+1, sc.work_dark,
sc.work_light);
DrawProgress();
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;
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);
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;
DrawStandartCaptButton(30, y.inc(10), BUTTON_ID_ASSEPT_RISK, T_ASSEPT_RISK);
}
@ -153,15 +153,15 @@ void Draw_DriverListWindow()
SelectList_DrawBorder();
//RIGHT FRAME
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;
DrawIcon32(right_frame_x, PADDING, system.color.work, icon_n);
WriteTextB(right_frame_x+44, PADDING+3, 0x81, system.color.work_text, ini_sections.get(select_list.cur_y));
WriteText(right_frame_x+44, PADDING+23, 0x80, system.color.work_text, #cur_version);
DrawIcon32(right_frame_x, PADDING, sc.work, icon_n);
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, sc.work_text, #cur_version);
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);
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)
@ -172,8 +172,8 @@ void SelectList_DrawLine(dword 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);
WriteText(select_list.x+12,yyy+select_list.text_y,select_list.font_type,system.color.work_button_text, ini_sections.get(i));
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,sc.button_text, ini_sections.get(i));
}
else
{
@ -214,8 +214,8 @@ void Event_ProcessButtonId(int id)
void Event_DrawWindow()
{
system.color.get();
DefineAndDrawWindow(215, 100, 600, 400, 0x33, system.color.work, WINDOW_TITLE,0);
sc.get();
DefineAndDrawWindow(215, 100, 600, 400, 0x33, sc.work, WINDOW_TITLE,0);
GetProcessInfo(#Form, SelfInfo);
if (Form.status_window>2) return;
if (Form.width < 450) { MoveSize(OLD,OLD,450,OLD); return; }

View File

@ -126,14 +126,14 @@ void DrawWindow()
{
int i;
system.color.get();
sc.get();
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);
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);
for (i=0; i<=2; i++) DrawBar(PD+170+30, i*5+PD+9, 15, 2, system.color.work_button_text);
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, sc.button_text);
delay.draw(PD, SETTINGS_Y);
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.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)
{
pause(8);
@ -246,12 +246,12 @@ void main()
List_ReDraw();
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.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)
{
pause(8);
@ -259,7 +259,7 @@ void main()
List_ReDraw();
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
@ -514,21 +514,21 @@ void draw_window()
if ( two_panels.checked) && (Form.width < 573) { MoveSize(OLD,OLD,573,OLD); return; }
GetProcessInfo(#Form, SelfInfo);
SetAppColors();
ESDWORD[#toolbar_pal] = col.work;
ESDWORD[#toolbar_pal+4] = MixColors(0, col.work, 35);
ESDWORD[#toolbar_pal] = sc.work;
ESDWORD[#toolbar_pal+4] = MixColors(0, sc.work, 35);
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=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+6);
DrawDot(Form.cwidth-17,12+12);
DefineHiddenButton(Form.cwidth-24,7,20,25,51+BT_NOFRAME); //dots
//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
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);
strcpy(#active_path, #path);
DrawStatusBar();
@ -549,9 +549,9 @@ void DrawList()
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==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);
DrawBar(files.x+files.w,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,col.graph);
WriteText(sorting_arrow_x,files.y-12,0x80, sc.work_text, sorting_arrow_t);
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,sc.work_graph);
}
void DrawStatusBar()
@ -560,13 +560,13 @@ void DrawStatusBar()
int go_up_folder_exists=0;
if (!show_status_bar.checked) return;
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);
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) {
sprintf(#status_bar_str, T_STATUS_SELECTED, selected_count);
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;
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)
{
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
{
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,190,0x80,system.color.work_text,#file_name);
WriteText(strlen(#file_name)*3+110+dform_x+2,190,0x80,sc.work_text,"?");
WriteText(-strlen(#file_name)*3+110+dform_x,190,0x80,sc.work_text,#file_name);
}
else
{

View File

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

View File

@ -4,9 +4,9 @@ void DrawPathBar()
{
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);
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);
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");
@ -46,7 +46,7 @@ void DrawBreadCrumbs()
//DrawFavButton(btn.x);
//btn.x+=20;
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)
{
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]);
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);
WriteText(-strlen(text)*8+w/2+x,h/2+y-7,0x90,system.color.work_text,text);
DrawBar(x, y+h+1, w+1, 1, system.color.work_light);
WriteText(-strlen(text)*8+w/2+x,h/2+y-7,0x90,sc.work_text,text);
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; //äëÿ áîëüøîãî ñïèñêà
}
//slider
DrawRectangle(sc_x,sc_slider_y,16,sc_slider_h,col.graph);
DrawRectangle3D(sc_x+1,sc_slider_y+1,14,sc_slider_h-2, system.color.work_light , system.color.work_dark);
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, 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[i]);
sc_center = sc_slider_h / 2 + sc_slider_y;
DrawBar(sc_x+4, sc_center-3, 8, 1, col.graph);
DrawBar(sc_x+4+1, sc_center-2, 8, 1, system.color.work_light);
DrawBar(sc_x+4, sc_center-3, 8, 1, sc.work_graph);
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+1, sc_center+1, 10, 1, system.color.work_light);
DrawBar(sc_x+3, sc_center, 10, 1, sc.work_graph);
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+1, sc_center+4, 8, 1, system.color.work_light);
DrawBar(sc_x+4, sc_center+3, 8, 1, sc.work_graph);
DrawBar(sc_x+4+1, sc_center+4, 8, 1, sc.work_light);
//area before slider
if (sc_slider_y > sc_y + 1)
@ -55,12 +55,12 @@ void Scroll() {
void DrawFlatButtonSmall(dword x,y,width,height,id,text)
{
DrawRectangle(x,y,width,height,col.graph);
DrawRectangle3D(x+1,y+1,width-2,height-2, system.color.work_light, system.color.work_dark);
PutPixel(x+width-1, y+1, system.color.work_dark);
DrawRectangle(x,y,width,height,sc.work_graph);
DrawRectangle3D(x+1,y+1,width-2,height-2, sc.work_light, sc.work_dark);
PutPixel(x+width-1, y+1, sc.work_dark);
DrawFilledBar(x+2, y+2, width-3, height-3);
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)
@ -71,15 +71,15 @@ void DrawEolitePopup(dword b1_text, b2_text)
{
int but_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);
DrawStandartCaptButton(popin_x+23 + but_x, 215, POPUP_BTN2, b2_text);
}
void DrawDot(dword x,y) {
dword col_pxl = MixColors(col.graph, col.work, 60);
DrawBar(x+1,y,2,4,col.graph);
DrawBar(x,y+1,4,2,col.graph);
dword col_pxl = MixColors(sc.work_graph, sc.work, 60);
DrawBar(x+1,y,2,4,sc.work_graph);
DrawBar(x,y+1,4,2,sc.work_graph);
PutPixel(x,y,col_pxl);
PutPixel(x+3,y,col_pxl);
PutPixel(x,y+3,col_pxl);

View File

@ -161,9 +161,8 @@ void _SystemDiscs::Draw()
{
strcat(#disc_name, #dev_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); }
else
{
WriteText(draw_x+29,draw_y+5,0x80,0,#disc_name);
} else {
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);
}
@ -214,9 +213,9 @@ void Tip(int y, dword caption, id, arrow)
DrawFilledBarInner(17, y+1, 160, 16);
DrawBar(17,y+17,160,1,0x7E87A3);
} 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+17,160,1,col.graph);
DrawBar(17,y+17,160,1,sc.work_graph);
}
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

View File

@ -33,7 +33,7 @@ void DisplayOperationForm()
title = T_DELETE_WINDOW_TITLE;
copy_bar.progress_color = 0xF17A65;
}
copy_bar.frame_color = system.color.work_graph;
copy_bar.frame_color = sc.work_graph;
switch(CheckEvent())
{
case evButton:
@ -42,12 +42,12 @@ void DisplayOperationForm()
break;
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);
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();
}
}
@ -65,8 +65,8 @@ void Operation_Draw_Progress(dword filename) {
return;
}
DisplayOperationForm();
DrawBar(PR_LEFT, PR_TOP-20, WIN_DIALOG_W-PR_LEFT, 15, system.color.work);
WriteText(PR_LEFT, PR_TOP-20, 0x90, system.color.work_text, filename);
DrawBar(PR_LEFT, PR_TOP-20, WIN_DIALOG_W-PR_LEFT, 15, sc.work);
WriteText(PR_LEFT, PR_TOP-20, 0x90, sc.work_text, filename);
progressbar_draw stdcall (#copy_bar);
progressbar_progress stdcall (#copy_bar);
@ -74,6 +74,6 @@ void Operation_Draw_Progress(dword filename) {
//pause(1);
//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,
sprintf(#param, "%i/%i", copy_bar.value, copy_bar.max), system.color.work);
WriteTextWithBg(PR_LEFT, PR_TOP+PR_H+5, 0xD0, sc.work_text,
sprintf(#param, "%i/%i", copy_bar.value, copy_bar.max), sc.work);
}

View File

@ -140,7 +140,7 @@ void SetProperties(int mode)
void ShowConfirmQuestionPopin()
{
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(65, 117, 0x90, 0x000000, QUEST_2);
DrawStandartCaptButton(62,138,B_SETINGS_APPLY_SUBFOLDER,T_YES);
@ -272,24 +272,24 @@ void DrawPropertiesWindow()
dword element_size;
incn y;
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);
DrawStandartCaptButton(pform.cwidth - 96, pform.cheight-34, B_CLOSE, T_CLOSE);
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);
WriteText(10, 97, 0x90, system.color.work_text, PR_T_SIZE);
WriteText(10, 97, 0x90, sc.work_text, PR_T_SIZE);
if (selected_count)
{
PropertiesDrawIcon(NULL, "<lot>");
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);
WriteText(120, 97, 0x90, system.color.work_text, #element_size_label);
WriteText(120, 97, 0x90, sc.work_text, #element_size_label);
}
else
{
@ -301,24 +301,24 @@ void DrawPropertiesWindow()
if (ext1) ext1 += #file_name2;
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);
if (!itdir) element_size = file_info_general.sizelo;
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);
WriteText(120, 116, 0x90, system.color.work_text, #folder_info);
WriteText(120, 116, 0x90, sc.work_text, #folder_info);
element_size = dir_size.bytes;
}
WriteTextLines(10, 136, 0x90, system.color.work_text, CREATED_OPENED_MODIFIED, 20);
DrawDate(120, 136, system.color.work_text, #file_info_general.datecreate);
DrawDate(120, 156, system.color.work_text, #file_info_general.datelastaccess);
DrawDate(120, 176, system.color.work_text, #file_info_general.datelastedit);
WriteTextLines(10, 136, 0x90, sc.work_text, CREATED_OPENED_MODIFIED, 20);
DrawDate(120, 136, sc.work_text, #file_info_general.datecreate);
DrawDate(120, 156, sc.work_text, #file_info_general.datelastaccess);
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);
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);
y.n = 212; //212 => attributes_frame.y

View File

@ -108,7 +108,7 @@ void settings_dialog()
case evReDraw:
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);
DrawSettingsCheckBoxes();
}
@ -225,28 +225,26 @@ void LoadIcons()
void SetAppColors()
{
int i;
dword bg_col, old_list_bg_color;
system.color.get();
if (col.work == system.color.work) return;
old_list_bg_color = col.list_bg;
bg_col = system.color.work;
static dword bg_col;
dword old_list_bg_color = col.list_bg;
sc.get();
if (bg_col == sc.work) return;
bg_col = sc.work;
if (skin_is_dark())
{
//use dark colors
col.def = false;
col.list_bg = system.color.work;
col.list_gb_text = system.color.work_text;
col.list_bg = sc.work;
col.list_gb_text = sc.work_text;
col.list_text_hidden = 0xA6A6B7;
col.list_vert_line = system.color.work_graph;
col.work = system.color.work;
col.graph = system.color.work_graph;
col.lpanel = MixColors(system.color.work_graph, system.color.work, 65);
col.selec = col.selec_active = system.color.work_button;
col.selec_text = system.color.work_button_text;
system.color.work_dark = MixColors(0, system.color.work, 35);
if (col.list_bg==col.selec) col.selec = system.color.work_graph; //for fucking skins
col.slider_bg_big = MixColors(0xCED0D0, system.color.work, 35);
col.odd_line = MixColors(0xFFFfff, system.color.work, 15);
col.list_vert_line = sc.work_graph;
col.lpanel = MixColors(sc.work_graph, sc.work, 65);
col.selec = col.selec_active = sc.button;
col.selec_text = sc.button_text;
sc.work_dark = MixColors(0, sc.work, 35);
if (col.list_bg==col.selec) col.selec = sc.work_graph; //for fucking skins
col.slider_bg_big = MixColors(0xCED0D0, sc.work, 35);
col.odd_line = MixColors(0xFFFfff, sc.work, 15);
}
else
{
@ -256,18 +254,16 @@ void SetAppColors()
col.list_gb_text = 0x000000;
col.list_text_hidden = 0xA6A6B7;
col.list_vert_line = 0xDDD7CF;
col.work = system.color.work;
col.graph = system.color.work_graph;
col.lpanel = 0x00699C;
col.selec = col.selec_active = 0x94AECE;
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.odd_line = 0xF1F1F1;
}
col.selec_inactive = MixColors(0xBBBbbb, col.list_bg, 65);
col.slider_bg_left = MixColors(col.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);
col.slider_bg_left = MixColors(sc.work_graph, col.slider_bg_big, 10);
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();
}

View File

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

View File

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

View File

@ -47,12 +47,12 @@ void main()
void draw_window()
{
system.color.get();
DefineAndDrawWindow(215, 100, 350, 300, 0x34, system.color.work, "Network testing utility",0);
sc.get();
DefineAndDrawWindow(215, 100, 350, 300, 0x34, sc.work, "Network testing utility",0);
button.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, 60, #EventRunCmmDownloader, SCAN_CODE_F2, "C-- Downloader [F2]");
AddEvent(10, 120, #EventRunNetStat, SCAN_CODE_F3, "NetStat [F3]");

View File

@ -44,12 +44,12 @@ int id;
if (GetKeys()==27) ExitProcess();
break;
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);
_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,60, 110,30,DRAW2_BTN,system.color.work_button,system.color.work_button_text,"Draw 2");
DrawCaptButton(280,100,110,30,SETBG_BTN,system.color.work_button,system.color.work_button_text,"Background");
DrawCaptButton(280,20, 110,30,DRAW1_BTN,sc.button,sc.button_text,"Draw 1");
DrawCaptButton(280,60, 110,30,DRAW2_BTN,sc.button,sc.button_text,"Draw 2");
DrawCaptButton(280,100,110,30,SETBG_BTN,sc.button,sc.button_text,"Background");
}
}

View File

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

View File

@ -157,16 +157,16 @@ void main()
Libimg_LoadImage(#top_icons, "/sys/icons16.png");
Libimg_LoadImage(#left_icons, "/sys/icons16.png");
system.color.get();
bg_col = system.color.work;
sc.get();
bg_col = sc.work;
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, 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, 0xffCACBD6, MixColors(system.color.work, 0, 200));
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(sc.work, 0, 200));
//fix line and rectandle color for dark skins
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)
{
DrawWideRectangle(_x, 4, 22, 22, 3, semi_white);
PutPixel(_x,4,system.color.work);
PutPixel(_x,4+21,system.color.work);
PutPixel(_x+21,4,system.color.work);
PutPixel(_x+21,4+21,system.color.work);
PutPixel(_x,4,sc.work);
PutPixel(_x,4+21,sc.work);
PutPixel(_x+21,4,sc.work);
PutPixel(_x+21,4+21,sc.work);
DefineHiddenButton(_x, 4, 21, 21, button.add(_event));
img_draw stdcall(top_icons.image, _x+3, 7, 16, 16, 0, _icon_n*16);
if (_hotkey) key.add_n(_hotkey, _event);
@ -301,19 +301,19 @@ int DrawFlatPanelButton(dword _id, _x, _y, _text)
#define P 10
int w = strlen(_text)*6 + P + P;
DrawBar(_x, _y, w, 22, semi_white);
PutPixel(_x,_y,system.color.work);
PutPixel(_x,_y+21,system.color.work);
PutPixel(_x+w-1,_y,system.color.work);
PutPixel(_x+w-1,_y+21,system.color.work);
PutPixel(_x,_y,sc.work);
PutPixel(_x,_y+21,sc.work);
PutPixel(_x+w-1,_y,sc.work);
PutPixel(_x+w-1,_y+21,sc.work);
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;
}
void DrawLeftPanelButton(dword _event, _hotkey, _y, _icon_n)
{
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));
img_draw stdcall(left_icons.image, x+3, _y+3, 16, 16, 0, _icon_n*16);
key.add_n(_hotkey, _event);
@ -329,8 +329,8 @@ void DrawStatusBar()
calc(strlen(#param)*8)+6,
18,
button.add(#EventCanvasResize),
system.color.work_button,
system.color.work_button_text,
sc.button,
sc.button_text,
#param
);
}
@ -343,7 +343,7 @@ void DrawWindow()
#define BLOCK_SPACE 10
incn tx;
incn ty;
system.color.get();
sc.get();
DefineAndDrawWindow(115+random(100), 50+random(100), 700, 540, 0x73, NULL, T_TITLE, 0);
GetProcessInfo(#Form, SelfInfo);
if (Form.status_window>2) return;
@ -354,8 +354,8 @@ void DrawWindow()
right_bar.x = Form.cwidth - right_bar.w;
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, TOPBAR_H-1, Form.cwidth, 1, system.color.work_graph);
DrawBar(0, 0, Form.cwidth, TOPBAR_H-1, sc.work);
DrawBar(0, TOPBAR_H-1, Form.cwidth, 1, sc.work_graph);
tx.n = 5-GAPH;
DrawTopPanelButton(#EventCreateNewIcon, ECTRL + SCAN_CODE_KEY_N, tx.inc(GAPH), 2);
@ -378,7 +378,7 @@ void DrawWindow()
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;
@ -395,19 +395,19 @@ void DrawWindow()
button.add_n(1, #EventExitIconEdit);
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);
DrawColorPallets();
DrawPreview();
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();
}
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);
}
@ -437,7 +437,7 @@ void DrawEditArea()
left_side = canvas.x-wrapper.x-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)
{
@ -468,7 +468,7 @@ void DrawActiveColor(dword iny)
DrawBar(right_bar.x+CELL+5+2, outy+2, CELL-4, CELL-4, color2);
//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();
}
@ -510,7 +510,7 @@ void DrawCurrentColorGradient()
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]);
}
DrawGradientMarker(old_marker_pos, system.color.work);
DrawGradientMarker(old_marker_pos, sc.work);
old_marker_pos = DrawGradientMarker(lmax, 0xFFFfff * bg_dark);
}
@ -620,7 +620,7 @@ void ShowWindow_TestIcon()
DrawImageWithBg(0, 0, 0x000000);
DrawImageWithBg(1, 0, 0xFFFfff);
DrawImageWithBg(0, 1, GetPixelColorFromScreen(0, 0));
DrawImageWithBg(1, 1, system.color.work);
DrawImageWithBg(1, 1, sc.work);
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);
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);
if (mouse.key&MOUSE_LEFT) EventSetActiveColor(1, tool_color);
if (mouse.key&MOUSE_RIGHT) EventSetActiveColor(2, tool_color);

View File

@ -77,9 +77,9 @@ void main()
#define WINH 300
void draw_window()
{
system.color.get();
sc.get();
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();
if (install_complete) DrawInstallComplete(); else DrawIntro();
}
@ -87,15 +87,15 @@ void draw_window()
void DrawIntro()
{
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,
0x0092D8, 0xFFFfff, T_INSTALL);
}
void DrawInstallComplete()
{
DrawIcon32(WINW-32/2, 140, system.color.work, 49);
WriteTextCenter(0,185, WINW, system.color.work_text, T_COMPLETE);
DrawIcon32(WINW-32/2, 140, sc.work, 49);
WriteTextCenter(0,185, WINW, sc.work_text, T_COMPLETE);
DrawCaptButton(WINW-110/2, WINH-70, 110, 28, CLOSE_BTN,
0x0092D8, 0xFFFfff, T_EXIT);
}

View File

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

View File

@ -13,4 +13,24 @@
word year;
};
:void DrawDate(dword x, y, color, in_date)
{
EDI = in_date;
EAX = 47;
EBX = 2<<16;
EDX = x<<16+y;
ESI = 0x90<<24+color;
ECX = EDI.date.day;
$int 0x40;
EDX += 20<<16;
ECX = EDI.date.month;
$int 0x40;
EDX += 20<<16;
EBX = 4<<16;
ECX = EDI.date.year;
$int 0x40;
DrawBar(x+17,y+10,2,2,color);
DrawBar(x+37,y+10,2,2,color);
}
#endif

View File

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

View File

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

View File

@ -49,27 +49,27 @@
check_values();
x=_x; y=_y;
DrawRectangle(x, y, VALUE_FIELD_W+1, SIZE, system.color.work_graph);
DrawRectangle(x, y, VALUE_FIELD_W+1, SIZE, sc.work_graph);
DrawRectangle3D(x+1, y+1, VALUE_FIELD_W-2, SIZE-2, 0xDDDddd, 0xffffff);
if (disabled)
{
DrawRectangle(x+1, y+1, VALUE_FIELD_W-2, SIZE-2, 0xffffff);
DrawBar(x+2, y+2, VALUE_FIELD_W-3, SIZE-3, 0xCCCccc);
text_col = system.color.work_graph;
text_col = sc.work_graph;
}
else
{
DrawBar(x+2, y+2, VALUE_FIELD_W-3, SIZE-3, 0xffffff);
text_col = system.color.work_text;
text_col = sc.work_text;
}
WriteText( -strlen(value_text)+3*8 + x+6, SIZE / 2 + y -6, 0x90, 0x333333, value_text);
DrawCaptButton(VALUE_FIELD_W + x + 1, y, SIZE, SIZE, id_inc, system.color.work_button, system.color.work_button_text, "+");
DrawCaptButton(VALUE_FIELD_W + x + SIZE, y, SIZE, SIZE, id_dec, system.color.work_button, system.color.work_button_text, "-");
WriteTextWithBg(x+VALUE_FIELD_W+SIZE+SIZE+10, SIZE / 2 + y -7, 0xD0, text_col, text, system.color.work);
DrawRectangle3D(x-1,y-1,VALUE_FIELD_W+SIZE+SIZE+2,SIZE+2,system.color.work_dark,system.color.work_light);
DrawCaptButton(VALUE_FIELD_W + x + 1, y, SIZE, SIZE, id_inc, sc.button, sc.button_text, "+");
DrawCaptButton(VALUE_FIELD_W + x + SIZE, y, SIZE, SIZE, id_dec, sc.button, sc.button_text, "-");
WriteTextWithBg(x+VALUE_FIELD_W+SIZE+SIZE+10, SIZE / 2 + y -7, 0xD0, text_col, text, sc.work);
DrawRectangle3D(x-1,y-1,VALUE_FIELD_W+SIZE+SIZE+2,SIZE+2,sc.work_dark,sc.work_light);
}
:void more_less_box::redraw()

View File

@ -23,8 +23,8 @@
:void sensor::draw_wrapper()
{
DrawRectangle(x-1, y-1, w+1, h+1, system.color.work_graph);
DrawRectangle3D(x-2, y-2, w+3, h+3, system.color.work_dark, system.color.work_light);
DrawRectangle(x-1, y-1, w+1, h+1, sc.work_graph);
DrawRectangle3D(x-2, y-2, w+3, h+3, sc.work_dark, sc.work_light);
}
:void sensor::draw_progress(dword progress_w, active_value, bg_value, mesure)
@ -34,7 +34,7 @@
DrawBar(x, y, w-progress_w, 1, MixColors(PROGRESS_ACTIVE, PROGRESS_BG, 200));
DrawBar(x, y+1, w-progress_w, h-2, PROGRESS_ACTIVE);
DrawBar(x, y+h-1, w-progress_w, 1, MixColors(PROGRESS_ACTIVE, system.color.work_graph, 200));
DrawBar(x, y+h-1, w-progress_w, 1, MixColors(PROGRESS_ACTIVE, sc.work_graph, 200));
sprintf(#param, "%i%s", active_value, mesure);
WriteText(w-progress_w- calc(strlen(#param)*8) /2 + x, h/2-7+y, 0x90, PROGRESS_BG, #param);

View File

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

View File

@ -519,6 +519,7 @@ inline fastcall dword SetWindowLayerBehaviour(EDX, ESI)
:void PutPaletteImage(dword inbuf,w,h,x,y,bits,pal)
{
if (h<1) || (w<0) return;
EAX = 65;
EBX = inbuf;
ECX = w<<16+h;
@ -641,26 +642,6 @@ inline fastcall dword GetStartTime()
:byte skin_height;
:void DrawDate(dword x, y, color, in_date)
{
EDI = in_date;
EAX = 47;
EBX = 2<<16;
EDX = x<<16+y;
ESI = 0x90<<24+color;
ECX = EDI.date.day;
$int 0x40;
EDX += 20<<16;
ECX = EDI.date.month;
$int 0x40;
EDX += 20<<16;
EBX = 4<<16;
ECX = EDI.date.year;
$int 0x40;
DrawBar(x+17,y+10,2,2,color);
DrawBar(x+37,y+10,2,2,color);
}
dword __generator; // random number generator init
//The initialization of the initial data before running
@ -670,7 +651,7 @@ void ______INIT______()
screen.width = GetScreenWidth()+1;
screen.height = GetScreenHeight()+1;
__generator = GetStartTime();
mem_init();
//mem_init();
main();
}
______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 };
:void DrawFrame(dword x,y,w,h,text)
{
frame123.font_color = system.color.work_text;
frame123.ext_col = system.color.work_graph;
frame123.int_col = system.color.work_light;
frame123.font_backgr_color = system.color.work;
frame123.font_color = sc.work_text;
frame123.ext_col = sc.work_graph;
frame123.int_col = sc.work_light;
frame123.font_backgr_color = sc.work;
frame123.start_x = x;
frame123.start_y = y;

View File

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

View File

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

View File

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

View File

@ -125,8 +125,8 @@ void main() {
int DefineWindow(dword wtitle) {
system.color.get();
DefineAndDrawWindow(GetScreenWidth()-WIN_W/2,GetScreenHeight()-WIN_H/2, WIN_W, WIN_H, 0x73,system.color.work, 0,0);
sc.get();
DefineAndDrawWindow(GetScreenWidth()-WIN_W/2,GetScreenHeight()-WIN_H/2, WIN_W, WIN_H, 0x73,sc.work, 0,0);
DrawTitle(wtitle);
GetProcessInfo(#Form, SelfInfo);
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_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);
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);
if (!aim)
{
DrawCaptButton(panel_x,panel_y+100,100,26,11,system.color.work_button, system.color.work_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,panel_y+100,100,26,11,sc.button, sc.button_text,"Settings");
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);
}
@ -217,6 +217,6 @@ void GetSettings()
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;
}

View File

@ -66,7 +66,7 @@ void MailBoxNetworkProcess() {
break;
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);
Send(socketnum, #request, request_len, 0);
if (EAX == 0xffffffff) {debugln("Error while sending LIST. Retry..."); break;}
@ -238,12 +238,12 @@ void MailBoxLoop() {
if (id==CHANGE_CHARSET)
{
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);
DrawRectangle3D(Form.cwidth-99, Form.cheight-status_bar_h- 69, 68, 80, 0xFFFfff, system.color.work);
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, sc.work);
for (id=0; id<5; id++)
{
if (cur_charset==id+1) { line_col=system.color.work_button; text_col=system.color.work_button_text; }
else { line_col=system.color.work; text_col=system.color.work_text; }
if (cur_charset==id+1) { line_col=sc.button; text_col=sc.button_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);
DrawCaptButton(Form.cwidth-100, id*16+Form.cheight-status_bar_h- 68, 70,16, 10+id+BT_HIDE,
0, text_col, charsets[id+1]);
@ -265,8 +265,8 @@ void MailBoxLoop() {
case evReDraw: _MB_DRAW:
if !(DefineWindow(MAILBOX_HEADER)) break;
scroll1.bckg_col = scroll_wv.bckg_col = 0xBBBbbb;
scroll1.frnt_col = scroll_wv.frnt_col = system.color.work;
scroll1.line_col = scroll_wv.line_col = system.color.work_graph;
scroll1.frnt_col = scroll_wv.frnt_col = sc.work;
scroll1.line_col = scroll_wv.line_col = sc.work_graph;
DrawToolbar();
DrawMailBox();
@ -295,12 +295,12 @@ void DrawToolbar() {
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);
DrawBar(0,0, Form.cwidth,toolbar_w-3, system.color.work);
DrawCaptButton(10 , BUT_Y, BUT_W, BUT_H, GET_MAIL, system.color.work_button, system.color.work_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(Form.cwidth-BUT_W - 10, BUT_Y, BUT_W, BUT_H, EXIT_MAIL, system.color.work_button, system.color.work_button_text,"< Exit");
DrawBar(0,0, Form.cwidth,toolbar_w-3, sc.work);
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, sc.button, sc.button_text,"Save letter");
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-1, mail_list.w,1, 0xf0f0f0);
}
@ -332,22 +332,22 @@ void DrawMailList() {
void DrawLetterInfo() {
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+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+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 , Form.cwidth, 1, 0xf0f0f0);
WriteTextB(10, lt_y+8 , 0x80, system.color.work_text, "From:");
WriteText (45, lt_y+8 , 0x80, system.color.work_text, #from);
WriteTextB(10, lt_y+20, 0x80, system.color.work_text, "To:");
WriteText (45, lt_y+20, 0x80, system.color.work_text, #to);
WriteTextB(10, lt_y+32, 0x80, system.color.work_text, "Date:");
WriteText (45, lt_y+32, 0x80, system.color.work_text, #date);
WriteTextB(10, lt_y+44, 0x80, system.color.work_text, "Subj:");
WriteText (45, lt_y+44, 0x80, system.color.work_text, #subj);
WriteTextB(10, lt_y+8 , 0x80, sc.work_text, "From:");
WriteText (45, lt_y+8 , 0x80, sc.work_text, #from);
WriteTextB(10, lt_y+20, 0x80, sc.work_text, "To:");
WriteText (45, lt_y+20, 0x80, sc.work_text, #to);
WriteTextB(10, lt_y+32, 0x80, sc.work_text, "Date:");
WriteText (45, lt_y+32, 0x80, sc.work_text, #date);
WriteTextB(10, lt_y+44, 0x80, sc.work_text, "Subj:");
WriteText (45, lt_y+44, 0x80, sc.work_text, #subj);
}
@ -382,20 +382,20 @@ void DrawScroller1() {
void DrawStatusBar() {
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) {
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,
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) {
DrawProgressBar(3, Form.cheight -status_bar_h + 1, 220, 12, system.color.work, 0xC3C3C3, 0x54B1D6, system.color.work_text, percent1);
WriteText(3, Form.cheight -status_bar_h + 1, 0x80, system.color.work_text, text1);
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, sc.work_text, text1);
cur_st_percent = percent1;
cur_st_text = text1;
}

View File

@ -79,7 +79,7 @@ void SettingsDialog()
case evReDraw: _OPT_WIN:
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();
break;
}
@ -91,14 +91,14 @@ void DrawOptionsWindow()
int i;
incn y;
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);
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));
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_port_box);

View File

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

View File

@ -141,7 +141,7 @@ void main()
case evReDraw:
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);
draw_list();
}
@ -188,10 +188,10 @@ void draw_list()
static bool colors_set;
if (!colors_set) {
colors_set = true;
inactive_background_color = MixColors(system.color.work, 0xFFFfff,230);
active_background_color = MixColors(system.color.work_button, system.color.work,230);
active_top_border_color = MixColors(system.color.work_graph, system.color.work_button,240);
inactive_text_shadow_color = MixColors(system.color.work,0xFFFfff,120);
inactive_background_color = MixColors(sc.work, 0xFFFfff,230);
active_background_color = MixColors(sc.button, sc.work,230);
active_top_border_color = MixColors(sc.work_graph, sc.button,240);
inactive_text_shadow_color = MixColors(sc.work,0xFFFfff,120);
skin_dark = skin_is_dark();
}
@ -199,22 +199,22 @@ void draw_list()
{
if (streq(names.get(i), "-")) {
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, item_y+2, menu1.w, 1, system.color.work_light);
DrawBar(menu1.x-1, item_y+1, menu1.w+1, 1, sc.work_dark);
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+0, menu1.w, 4, inactive_background_color);
//DrawBar(13, item_y+1, menu1.w-24, 1, system.color.work_dark);
//DrawBar(13, item_y+2, menu1.w-24, 1, system.color.work_light);
//DrawBar(13, item_y+1, menu1.w-24, 1, sc.work_dark);
//DrawBar(13, item_y+2, menu1.w-24, 1, sc.work_light);
item_y += SEP_H;
} else {
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, 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 {
name_color = system.color.work_text;
hotkey_color = system.color.work_graph;
name_color = sc.work_text;
hotkey_color = sc.work_graph;
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,
inactive_text_shadow_color, names.get(i));

View File

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

View File

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

View File

@ -75,9 +75,9 @@ void General__Main()
GetFreeRAM()/1024,
"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());
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();
dir_size.get("/rd/1");
@ -111,9 +111,9 @@ void General__Main()
void DrawBlockHeader(dword _x, _y, _icon, _title, _subtitle)
{
#define ICONGAP 45
WriteTextB(_x+ICONGAP, _y, 0x90, system.color.work_text, _title);
DrawIcon32(_x, _y, system.color.work, _icon);
WriteText(_x+ICONGAP, _y+20, 0x90, system.color.work_text, _subtitle);
WriteTextB(_x+ICONGAP, _y, 0x90, sc.work_text, _title);
DrawIcon32(_x, _y, sc.work, _icon);
WriteText(_x+ICONGAP, _y+20, 0x90, sc.work_text, _subtitle);
}
dword GetCpuLoad(dword max_h)
@ -164,9 +164,9 @@ void MonitorCpu()
cpu_stack[pos] = GetCpuLoad(cpu.h);
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]);
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) {
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);
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,
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,
select_list.y+select_list.h+5,
110,25,BTN_ID_KILL_PROCESS,0xF38181, 0xFFFfff, T_END_PROCESS);
DrawCaptButton(Form.cwidth-230-WIN_PAD,
select_list.y+select_list.h+5,
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);
default:
SelectList_LineChanged();

View File

@ -61,9 +61,9 @@ void main()
int Sysmon__DefineAndDrawWindow()
{
system.color.get();
sc.get();
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);
if (Form.status_window>2) return false;
//if (Form.width < 300) { MoveSize(OLD,OLD,300,OLD); break; }

View File

@ -141,15 +141,15 @@ void Main_Window()
}
break;
case evReDraw:
system.color.get();
DefineAndDrawWindow(170,150,405,290,0x74,system.color.work,"Virtual Disk Manager 0.69",0);
sc.get();
DefineAndDrawWindow(170,150,405,290,0x74,sc.work,"Virtual Disk Manager 0.69",0);
GetProcessInfo(#Form, SelfInfo);
if (Form.status_window>2) break;
DrawBar(0,0, Form.cwidth,TOPPANELH, system.color.work);
DrawBar(0,TOPPANELH, Form.cwidth,1, system.color.work_graph);
WriteText(6, 9, 0x90, system.color.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);
DrawBar(0,0, Form.cwidth,TOPPANELH, sc.work);
DrawBar(0,TOPPANELH, Form.cwidth,1, sc.work_graph);
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,sc.work_graph);
edit_box_draw stdcall (#edit_disk_size);
x = 6 + DrawStandartCaptButton(6, 36, 10, T_ADD_DISK);
DrawStandartCaptButton(x, 36, 11, T_DELETE_DISK);
@ -230,10 +230,10 @@ void DrawTmpDisks()
byte i;
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, Form.cwidth,BOTPANELH, system.color.work);
DrawBar(0,Form.cheight-BOTPANELH-1, Form.cwidth,1, sc.work_graph);
DrawBar(0,Form.cheight-BOTPANELH, Form.cwidth,BOTPANELH, sc.work);
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)
{
WriteText(17,TOPPANELH+15, 0x90, 0x777777, INTRO_TEXT_1);

View File

@ -417,14 +417,14 @@ void draw_window()
incn x;
DefineAndDrawWindow(Form.left,Form.top,Form.width,Form.height,0x73,0,#title,0);
GetProcessInfo(#Form, SelfInfo);
system.color.get();
sc.get();
if (Form.status_window>2) return;
if (Form.width < 200) { MoveSize(OLD,OLD,200,OLD); return; }
if (Form.height < 200) { MoveSize(OLD,OLD,OLD,200); return; }
DrawBar(0, 0, Form.cwidth, TOOLBAR_H - 1, system.color.work);
DrawBar(0, TOOLBAR_H - 1, Form.cwidth, 1, system.color.work_graph);
DrawBar(0, 0, Form.cwidth, TOOLBAR_H - 1, sc.work);
DrawBar(0, TOOLBAR_H - 1, Form.cwidth, 1, sc.work_graph);
x.n = 0;
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);
//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,
system.color.work_graph,system.color.work_graph, system.color.work_dark);
DrawOvalBorder(x, 5, TOOLBAR_ICON_WIDTH, TOOLBAR_ICON_HEIGHT, sc.work_graph,
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);
}

View File

@ -383,7 +383,7 @@ proc load_settings ;//////////////////////////////////////////////////////////
mov [auto_braces],al
invoke ini.get_int,ini_path,ini_sec_options,ini_options_auto_indent,1
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
invoke ini.get_int,ini_path,ini_sec_options,ini_options_line_nums,0
mov [line_nums],al