CMM: bigger fonts for various programs (gift to punk_joker:)

git-svn-id: svn://kolibrios.org@6197 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2016-02-11 13:46:53 +00:00
parent 20ace41f1f
commit d7af065a2b
5 changed files with 167 additions and 119 deletions

View File

@ -64,10 +64,10 @@ void settings_dialog()
break; break;
case evReDraw: case evReDraw:
DefineAndDrawWindow(Form.left + Form.width/2-10, Form.top + Form.height/2 - 75, 370, 243+GetSkinHeight(),0x34,system.color.work,TITLE_SETT); DefineAndDrawWindow(Form.left + Form.width/2-10, Form.top + Form.height/2 - 75, 370, 258+GetSkinHeight(),0x34,system.color.work,TITLE_SETT);
DrawSettingsCheckBoxes(); DrawSettingsCheckBoxes();
DrawFlatButton(9, 166, strlen(SAVE_PATH_AS_DEFAULT)+3*8, 24, 6, SAVE_PATH_AS_DEFAULT); DrawFlatButton(9, 180, strlen(SAVE_PATH_AS_DEFAULT)+3*8, 24, 6, SAVE_PATH_AS_DEFAULT);
DrawFlatButton(9, 200, strlen(EDIT_FILE_ASSOCIATIONS)+3*8, 24, 5, EDIT_FILE_ASSOCIATIONS); DrawFlatButton(9, 216, strlen(EDIT_FILE_ASSOCIATIONS)+3*8, 24, 5, EDIT_FILE_ASSOCIATIONS);
} }
} }
} }
@ -82,12 +82,12 @@ void ExitSettings()
void DrawSettingsCheckBoxes() void DrawSettingsCheckBoxes()
{ {
CheckBox(10, 11, 20, SHOW_DEVICE_CLASS, show_dev_name); CheckBox(10, 13, 20, SHOW_DEVICE_CLASS, show_dev_name);
CheckBox(10, 33, 21, SHOW_REAL_NAMES, real_files_names_case); CheckBox(10, 37, 21, SHOW_REAL_NAMES, real_files_names_case);
CheckBox(10, 55, 22, NOTIFY_COPY_END, info_after_copy); CheckBox(10, 61, 22, NOTIFY_COPY_END, info_after_copy);
CheckBox(10, 77, 24, USE_TWO_PANELS, two_panels); CheckBox(10, 85, 24, USE_TWO_PANELS, two_panels);
MoreLessBox(10, 105, 25, 26, files.item_h, LIST_LINE_HEIGHT); MoreLessBox(10, 115, 25, 26, files.item_h, LIST_LINE_HEIGHT);
if (label.font) MoreLessBox(10, 132, 30, 31, label.size.pt, FONT_SIZE_LABEL); if (label.font) MoreLessBox(10, 144, 30, 31, label.size.pt, FONT_SIZE_LABEL);
} }

View File

@ -26,14 +26,15 @@ void main()
if (btn==4) label.smooth ^=1; if (btn==4) label.smooth ^=1;
goto _DRAW_WINDOW_CONTENT; goto _DRAW_WINDOW_CONTENT;
case evReDraw: case evReDraw:
system.color.get();
DefineAndDrawWindow(215,100,500,320,0x74,0xFFFFFF,#title); DefineAndDrawWindow(215,100,500,320,0x74,0xFFFFFF,#title);
GetProcessInfo(#Form, SelfInfo); GetProcessInfo(#Form, SelfInfo);
if (Form.status_window>2) break; if (Form.status_window>2) break;
_DRAW_WINDOW_CONTENT: _DRAW_WINDOW_CONTENT:
DrawBar(0, 0, Form.cwidth, PANELH, 0xCCCccc); DrawBar(0, 0, Form.cwidth, PANELH, system.color.work);
CheckBox(10, 8, 2, "Bold", label.bold); CheckBox(10, 8, 2, "Bold", label.bold);
CheckBox(70, 8, 3, "Italic", label.italic); CheckBox(83, 8, 3, "Italic", label.italic);
CheckBox(140, 8, 4, "Smooth", label.smooth); CheckBox(170, 8, 4, "Smooth", label.smooth);
label.raw_size = free(label.raw); label.raw_size = free(label.raw);
if (!label.font) if (!label.font)
{ {

View File

@ -67,11 +67,46 @@
} }
} }
unsigned char checkbox_flag[507] = {
0xFC, 0xD4, 0x04, 0xFC, 0xD4, 0x04, 0xFC, 0xD4, 0x04, 0xFC, 0xD4, 0x04, 0xFC, 0xD4, 0x04, 0xFC,
0xD4, 0x04, 0xFC, 0xD4, 0x04, 0xFC, 0xD4, 0x04, 0xFC, 0xD4, 0x04, 0xFC, 0xD4, 0x04, 0xFC, 0xD4,
0x04, 0xFC, 0xD4, 0x04, 0xFC, 0xC8, 0x04, 0xFC, 0xDC, 0x04, 0xFC, 0xC8, 0x04, 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x04, 0xF9, 0x98, 0x04, 0xFA, 0x9F, 0x04, 0xFC, 0xA9,
0x04, 0xFC, 0xA9, 0x04, 0xFC, 0xA9, 0x04, 0xFA, 0x9F, 0x04, 0xFA, 0x9F, 0x04, 0xFC, 0xC8, 0x04,
0xFC, 0xA9, 0x04, 0xFC, 0xA9, 0x04, 0xFA, 0x9F, 0x04, 0xF9, 0x98, 0x04, 0xF9, 0x98, 0x04, 0xFA,
0x9F, 0x04, 0xFC, 0xA9, 0x04, 0xFC, 0xA9, 0x04, 0xFC, 0xA9, 0x04, 0xFA, 0x9F, 0x04, 0xFA, 0x9F,
0x04, 0xF9, 0x98, 0x04, 0xFC, 0xB4, 0x04, 0xF9, 0x98, 0x04, 0xF9, 0x98, 0x04, 0xF9, 0x98, 0x04,
0xF9, 0x98, 0x04, 0xF9, 0x98, 0x04, 0xF9, 0x98, 0x04, 0xF9, 0x98, 0x04, 0xF9, 0x98, 0x04, 0xF9,
0x98, 0x04, 0xF9, 0x98, 0x04, 0xF9, 0x98, 0x04, 0xF9, 0x98, 0x04
};
:void CheckBox(dword x,y,bt_id, text, is_checked) :void CheckBox(dword x,y,bt_id, text, is_checked)
{ {
byte w=14, h=14; byte w=14, h=14;
DefineButton(x-1, y-1, strlen(text)*6 + w + 17, h+2, bt_id+BT_HIDE+BT_NOFRAME, 0); DefineButton(x-1, y-1, strlen(text)*8 + w + 17, h+2, bt_id+BT_HIDE+BT_NOFRAME, 0);
WriteText(x+w+8, h / 2 + y -3, 0x80, system.color.work_text, text); WriteText(x+w+8, h / 2 + y -7, 0x90, system.color.work_text, text);
DrawRectangle(x, y, w, h, system.color.work_graph); DrawRectangle(x, y, w, h, system.color.work_graph);
if (is_checked == 0) if (is_checked == 0)
{ {
@ -81,7 +116,7 @@
else if (is_checked == 1) else if (is_checked == 1)
{ {
DrawWideRectangle(x+1, y+1, w-1, h-1, 2, 0xffffff); DrawWideRectangle(x+1, y+1, w-1, h-1, 2, 0xffffff);
DrawBar(x+3, y+3, w-5, h-5, 0x00C000); //0x13A113 _PutImage(x+1, y+1, 13, 13, #checkbox_flag);
} }
else if (is_checked == 2) //not active else if (is_checked == 2) //not active
{ {
@ -103,7 +138,7 @@
DrawCaptButton(VALUE_FIELD_W + x, y, SIZE, SIZE, bt_id_more, system.color.work_button, system.color.work_button_text, "+"); DrawCaptButton(VALUE_FIELD_W + x, y, SIZE, SIZE, bt_id_more, system.color.work_button, system.color.work_button_text, "+");
DrawCaptButton(VALUE_FIELD_W + x + SIZE, y, SIZE, SIZE, bt_id_less, system.color.work_button, system.color.work_button_text, "-"); DrawCaptButton(VALUE_FIELD_W + x + SIZE, y, SIZE, SIZE, bt_id_less, system.color.work_button, system.color.work_button_text, "-");
WriteText(x+VALUE_FIELD_W+SIZE+SIZE+10, SIZE / 2 + y -3, 0x80, system.color.work_text, text); WriteText(x+VALUE_FIELD_W+SIZE+SIZE+10, SIZE / 2 + y -7, 0x90, system.color.work_text, text);
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,system.color.work_dark,system.color.work_light);
} }
@ -216,4 +251,18 @@
ESBYTE[next_word_pointer] = '\n'; ESBYTE[next_word_pointer] = '\n';
} }
//this function increase falue and return it
//useful for list of controls which goes one after one
struct incn
{
dword n;
dword inc(dword _addition);
};
dword incn::inc(dword _addition)
{
n+=_addition;
return n;
}
#endif #endif

View File

@ -21,7 +21,7 @@
?define POINTER_SPEED "‘ª®à®áâì 㪠§ â¥«ï ¬ëè¨" ?define POINTER_SPEED "‘ª®à®áâì 㪠§ â¥«ï ¬ëè¨"
?define ACCELERATION_TEXT "“᪮७¨¥ 㪠§ â¥«ï ¬ëè¨" ?define ACCELERATION_TEXT "“᪮७¨¥ 㪠§ â¥«ï ¬ëè¨"
?define DOUBLE_CLICK_TEXT "‡ ¤¥à¦ª  ¤¢®©­®£® ª«¨ª  ¬ëèìî" ?define DOUBLE_CLICK_TEXT "‡ ¤¥à¦ª  ¤¢®©­®£® ª«¨ª  ¬ëèìî"
?define MOUSE_EMULATION "<EFBFBD>¬ã«ïæ¨ï ã¯à ¢«¥­¨ï 㪠§ â¥«¥¬ ç¥à¥§ ª« ¢¨ âãàã" ?define MOUSE_EMULATION "“¯à ¢«¥­¨¥ 㪠§ â¥«¥¬ ¬ëè¨ ç¥à¥§ ª« ¢¨ âãàã"
?define MADMOUSE "‘ª¢®§­ë¥ ¤«ï ªãàá®à  áâ®à®­ë íªà ­ " ?define MADMOUSE "‘ª¢®§­ë¥ ¤«ï ªãàá®à  áâ®à®­ë íªà ­ "
#else #else
?define WINDOW_TITLE "Mouse testing and configuration" ?define WINDOW_TITLE "Mouse testing and configuration"
@ -141,7 +141,7 @@ void main() {
case evReDraw: case evReDraw:
system.color.get(); system.color.get();
DefineAndDrawWindow(430, 150, 360, 300+GetSkinHeight(),0x34,system.color.work,WINDOW_TITLE); DefineAndDrawWindow(430, 150, 424, 310+GetSkinHeight(),0x34,system.color.work,WINDOW_TITLE);
GetProcessInfo(#Form, SelfInfo); GetProcessInfo(#Form, SelfInfo);
if (Form.status_window>2) break; if (Form.status_window>2) break;
SetFrameColors(); SetFrameColors();
@ -164,10 +164,10 @@ void DrawMouseImage() {
void DrawControls() { void DrawControls() {
DrawBar(pos_x, mouse_frame.start_y + 142, Form.cwidth - pos_x, 120, system.color.work); DrawBar(pos_x, mouse_frame.start_y + 142, Form.cwidth - pos_x, 120, system.color.work);
MoreLessBox(pos_x, mouse_frame.start_y + 142, 120, 121, mouse_cfg.pointer_speed, POINTER_SPEED); MoreLessBox(pos_x, mouse_frame.start_y + 142, 120, 121, mouse_cfg.pointer_speed, POINTER_SPEED);
MoreLessBox(pos_x, mouse_frame.start_y + 170, 122, 123, mouse_cfg.acceleration, ACCELERATION_TEXT); MoreLessBox(pos_x, mouse_frame.start_y + 172, 122, 123, mouse_cfg.acceleration, ACCELERATION_TEXT);
MoreLessBox(pos_x, mouse_frame.start_y + 198, 124, 125, mouse_cfg.double_click_delay, DOUBLE_CLICK_TEXT); MoreLessBox(pos_x, mouse_frame.start_y + 202, 124, 125, mouse_cfg.double_click_delay, DOUBLE_CLICK_TEXT);
CheckBox(pos_x, mouse_frame.start_y + 230, 100, MOUSE_EMULATION, mouse_cfg.emulation); CheckBox(pos_x, mouse_frame.start_y + 236, 100, MOUSE_EMULATION, mouse_cfg.emulation);
CheckBox(pos_x, mouse_frame.start_y + 254, 101, MADMOUSE, mouse_cfg.madmouse); CheckBox(pos_x, mouse_frame.start_y + 262, 101, MADMOUSE, mouse_cfg.madmouse);
} }
void SetFrameColors() { void SetFrameColors() {

View File

@ -55,8 +55,8 @@
#endif #endif
frame taskbar_frame = { 0, 000, 10, 188, 14, 0x000111, 0xFFFfff, 1, TASK_FRAME_T, 0, 0, 6, 0x000111, 0xCCCccc }; frame taskbar_frame = { 0, NULL, 10, NULL, 16, NULL, 0xFFFfff, 1, TASK_FRAME_T, 0, 1, 12, 0x000111, 0xCCCccc };
frame docky_frame = { 0, 000, 10, 73, 217, 0x000111, 0xFFFfff, 1, DOCK_FRAME_T, 0, 0, 6, 0x000111, 0xCCCccc }; frame docky_frame = { 0, NULL, 10, NULL, NULL, NULL, 0xFFFfff, 1, DOCK_FRAME_T, 0, 1, 12, 0x000111, 0xCCCccc };
char taskbar_ini_path[] = "/sys/settings/taskbar.ini"; char taskbar_ini_path[] = "/sys/settings/taskbar.ini";
char taskbar_c_flags[] = "Flags"; char taskbar_c_flags[] = "Flags";
@ -68,17 +68,12 @@ raw_image panels_img = { 37, 27, #panels_img_data };
proc_info Form; proc_info Form;
struct docky_cfg { word dkFsize;
word fsize; byte dkLocation, dkAshow;
byte location, ashow;
} docky_cfg;
struct taskbar_cfg { byte tbAttachment, tbPanelHeight, tbSoftenHeight, tbButtonOffset,
byte Attachment; tbSoftenUp, tbSoftenDown, tbMinLeftButton, tbMinRightButton, tbMenuButton,
byte PanelHeight, SoftenHeight, ButtonOffset; tbRunApplButton, tbClnDeskButton, tbClock, tbCpuUsage, tbChangeLang;
byte SoftenUp, SoftenDown, MinLeftButton, MinRightButton, MenuButton,
RunApplButton, ClnDeskButton, Clock, CpuUsage, ChangeLang;
} taskbar_cfg;
enum { enum {
TASKBAR, TASKBAR,
@ -104,23 +99,23 @@ void main()
//taskbar buttons //taskbar buttons
if (id>=100) && (id<200) if (id>=100) && (id<200)
{ {
if (id==100) taskbar_cfg.Attachment ^= 1; if (id==100) tbAttachment ^= 1;
if (id==105) taskbar_cfg.SoftenUp ^= 1; if (id==105) tbSoftenUp ^= 1;
if (id==106) taskbar_cfg.SoftenDown ^= 1; if (id==106) tbSoftenDown ^= 1;
if (id==107) taskbar_cfg.MinLeftButton ^= 1; if (id==107) tbMinLeftButton ^= 1;
if (id==108) taskbar_cfg.MinRightButton ^= 1; if (id==108) tbMinRightButton ^= 1;
if (id==109) taskbar_cfg.RunApplButton ^= 1; if (id==109) tbRunApplButton ^= 1;
if (id==110) taskbar_cfg.ClnDeskButton ^= 1; if (id==110) tbClnDeskButton ^= 1;
if (id==111) taskbar_cfg.Clock ^= 1; if (id==111) tbClock ^= 1;
if (id==112) taskbar_cfg.CpuUsage ^= 1; if (id==112) tbCpuUsage ^= 1;
if (id==113) taskbar_cfg.ChangeLang ^= 1; if (id==113) tbChangeLang ^= 1;
if (id==114) taskbar_cfg.MenuButton ^= 1; if (id==114) tbMenuButton ^= 1;
if (id==120) taskbar_cfg.PanelHeight++; if (id==120) tbPanelHeight++;
if (id==121) && (taskbar_cfg.PanelHeight>6) taskbar_cfg.PanelHeight--; if (id==121) && (tbPanelHeight>6) tbPanelHeight--;
if (id==122) taskbar_cfg.SoftenHeight++; if (id==122) tbSoftenHeight++;
if (id==123) && (taskbar_cfg.SoftenHeight>0) taskbar_cfg.SoftenHeight--; if (id==123) && (tbSoftenHeight>0) tbSoftenHeight--;
if (id==124) taskbar_cfg.ButtonOffset++; if (id==124) tbButtonOffset++;
if (id==125) && (taskbar_cfg.ButtonOffset>0) taskbar_cfg.ButtonOffset--; if (id==125) && (tbButtonOffset>0) tbButtonOffset--;
DrawWindowContent(TASKBAR); DrawWindowContent(TASKBAR);
SaveCfg(TASKBAR); SaveCfg(TASKBAR);
RestartProcess(TASKBAR); RestartProcess(TASKBAR);
@ -130,12 +125,11 @@ void main()
{ {
if (id==200) if (id==200)
{ {
if (docky_cfg.location==1) docky_cfg.location = 2; dkLocation++;
else if (docky_cfg.location==2) docky_cfg.location = 3; if (dkLocation>3) dkLocation=1;
else if (docky_cfg.location==3) docky_cfg.location = 1;
} }
if (id==201) docky_cfg.fsize ^= 1; if (id==201) dkFsize ^= 1;
if (id==202) docky_cfg.ashow ^= 1; if (id==202) dkAshow ^= 1;
DrawWindowContent(DOCKY); DrawWindowContent(DOCKY);
SaveCfg(DOCKY); SaveCfg(DOCKY);
RestartProcess(DOCKY); RestartProcess(DOCKY);
@ -149,7 +143,7 @@ void main()
case evReDraw: case evReDraw:
system.color.get(); system.color.get();
DefineAndDrawWindow(130, 150, 400, 300+GetSkinHeight(),0x34,system.color.work,WINDOW_TITLE); DefineAndDrawWindow(130, 150, 465, 398+GetSkinHeight(),0x34,system.color.work,WINDOW_TITLE);
GetProcessInfo(#Form, SelfInfo); GetProcessInfo(#Form, SelfInfo);
if (Form.status_window>2) break; if (Form.status_window>2) break;
taskbar_frame.size_x = docky_frame.size_x = - taskbar_frame.start_x * 2 + Form.cwidth; taskbar_frame.size_x = docky_frame.size_x = - taskbar_frame.start_x * 2 + Form.cwidth;
@ -163,86 +157,90 @@ void main()
void DrawWindowContent(byte panel_type) void DrawWindowContent(byte panel_type)
{ {
word win_center_x; word win_center_x = Form.cwidth / 2 + 20;
incn y;
if (panel_type==ALL) || (panel_type==TASKBAR)
{
y.n = taskbar_frame.start_y;
DefineButton(22, y.inc(18), panels_img.w-1, 27-1, 100 + BT_HIDE, 0);
_PutImage(22, y.n, 37, 27, tbAttachment * 37 * 27 * 3 + panels_img.data);
WriteText(68, y.inc(7), 0x90, system.color.work_text, CHANGE_POS);
CheckBox(22, y.inc(35), 105, SOFTEN_UP, tbSoftenUp);
CheckBox(win_center_x, y.n, 111, CLOCK, tbClock);
CheckBox(22, y.inc(24), 106, SOFTEN_DOWN, tbSoftenDown);
CheckBox(win_center_x, y.n, 112, CPU_USAGE, tbCpuUsage);
CheckBox(22, y.inc(24), 107, MIN_LEFT_BUTTON, tbMinLeftButton);
CheckBox(win_center_x, y.n, 113, CHANGE_LANG, tbChangeLang);
CheckBox(22, y.inc(24), 108, MIN_RIGHT_BUTTON, tbMinRightButton);
CheckBox(win_center_x, y.n, 114, MENU_BUTTON, tbMenuButton);
MoreLessBox(22, y.inc(28), 120, 121, tbPanelHeight, PANEL_HEIGHT);
MoreLessBox(22, y.inc(32), 122, 123, tbSoftenHeight, SOFTEN_HEIGHT);
MoreLessBox(22, y.inc(32), 124, 125, tbButtonOffset, BUTTON_OFFSET);
taskbar_frame.size_y = y.inc(32) - taskbar_frame.start_y;
}
if (panel_type==ALL) || (panel_type==DOCKY)
{
docky_frame.start_y = y.inc(20);
DefineButton(22, y.inc(18), panels_img.w-1, 27-1, 200 + BT_HIDE, 0);
_PutImage(22, y.n, 37, 27, dkLocation + 1 * 37 * 27 * 3 + panels_img.data);
WriteText(68, y.inc(7), 0x90, system.color.work_text, CHANGE_POS);
CheckBox(22, y.inc(35), 201, FSIZE, dkFsize);
CheckBox(win_center_x, y.n, 202, ASHOW, dkAshow);
docky_frame.size_y = y.inc(30) - docky_frame.start_y;
}
if (panel_type==ALL) if (panel_type==ALL)
{ {
frame_draw stdcall (#taskbar_frame); frame_draw stdcall (#taskbar_frame);
frame_draw stdcall (#docky_frame); frame_draw stdcall (#docky_frame);
} }
if (panel_type==ALL) || (panel_type==TASKBAR)
{
DefineButton(22, taskbar_frame.start_y + 12, panels_img.w-1, 27-1, 100 + BT_HIDE, 0);
_PutImage(22, taskbar_frame.start_y + 12, 37, 27, taskbar_cfg.Attachment * 37 * 27 * 3 + panels_img.data);
WriteText(68, taskbar_frame.start_y + 20, 0x80, system.color.work_text, CHANGE_POS);
CheckBox(22, taskbar_frame.start_y + 48, 105, SOFTEN_UP, taskbar_cfg.SoftenUp);
CheckBox(22, taskbar_frame.start_y + 68, 106, SOFTEN_DOWN, taskbar_cfg.SoftenDown);
CheckBox(22, taskbar_frame.start_y + 88, 107, MIN_LEFT_BUTTON, taskbar_cfg.MinLeftButton);
CheckBox(22, taskbar_frame.start_y + 108, 108, MIN_RIGHT_BUTTON, taskbar_cfg.MinRightButton);
win_center_x = Form.cwidth / 2;
CheckBox(win_center_x, taskbar_frame.start_y + 48, 111, CLOCK, taskbar_cfg.Clock);
CheckBox(win_center_x, taskbar_frame.start_y + 68, 112, CPU_USAGE, taskbar_cfg.CpuUsage);
CheckBox(win_center_x, taskbar_frame.start_y + 88, 113, CHANGE_LANG, taskbar_cfg.ChangeLang);
CheckBox(win_center_x, taskbar_frame.start_y + 108, 114, MENU_BUTTON, taskbar_cfg.MenuButton);
MoreLessBox(22, taskbar_frame.start_y + 131, 120, 121, taskbar_cfg.PanelHeight, PANEL_HEIGHT);
MoreLessBox(win_center_x, taskbar_frame.start_y + 131, 122, 123, taskbar_cfg.SoftenHeight, SOFTEN_HEIGHT);
MoreLessBox(22, taskbar_frame.start_y + 159, 124, 125, taskbar_cfg.ButtonOffset, BUTTON_OFFSET);
}
if (panel_type==ALL) || (panel_type==DOCKY)
{
DefineButton(22, docky_frame.start_y + 12, panels_img.w-1, 27-1, 200 + BT_HIDE, 0);
_PutImage(22, docky_frame.start_y + 12, 37, 27, docky_cfg.location + 1 * 37 * 27 * 3 + panels_img.data);
WriteText(68, docky_frame.start_y + 20, 0x80, system.color.work_text, CHANGE_POS);
CheckBox(22, docky_frame.start_y + 48, 201, FSIZE, docky_cfg.fsize);
CheckBox(win_center_x, docky_frame.start_y + 48, 202, ASHOW, docky_cfg.ashow);
}
} }
void LoadCfg() void LoadCfg()
{ {
ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "Attachment", 1); taskbar_cfg.Attachment = EAX; ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "Attachment", 1); tbAttachment = EAX;
ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "SoftenUp", 1); taskbar_cfg.SoftenUp = EAX; ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "SoftenUp", 1); tbSoftenUp = EAX;
ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "SoftenDown", 1); taskbar_cfg.SoftenDown = EAX; ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "SoftenDown", 1); tbSoftenDown = EAX;
ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MinLeftButton", 1); taskbar_cfg.MinLeftButton = EAX; ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MinLeftButton", 1); tbMinLeftButton = EAX;
ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MinRightButton", 1); taskbar_cfg.MinRightButton = EAX; ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MinRightButton", 1); tbMinRightButton = EAX;
ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "Clock", 1); taskbar_cfg.Clock = EAX; ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "Clock", 1); tbClock = EAX;
ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "CpuUsage", 1); taskbar_cfg.CpuUsage = EAX; ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "CpuUsage", 1); tbCpuUsage = EAX;
ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "ChangeLang", 1); taskbar_cfg.ChangeLang = EAX; ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "ChangeLang", 1); tbChangeLang = EAX;
ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MenuButton", 1); taskbar_cfg.MenuButton = EAX; ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MenuButton", 1); tbMenuButton = EAX;
ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "PanelHeight", 18); taskbar_cfg.PanelHeight = EAX; ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "PanelHeight", 18); tbPanelHeight = EAX;
ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "SoftenHeight", 4); taskbar_cfg.SoftenHeight = EAX; ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "SoftenHeight", 4); tbSoftenHeight = EAX;
ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "ButtonTopOffset", 3); taskbar_cfg.ButtonOffset = EAX; ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "ButtonTopOffset", 3); tbButtonOffset = EAX;
ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "ButtonBotOffset", 3); taskbar_cfg.ButtonOffset = EAX; ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "ButtonBotOffset", 3); tbButtonOffset = EAX;
ini_get_int stdcall (#docky_ini_path, "@", "location", 0); docky_cfg.location = EAX; ini_get_int stdcall (#docky_ini_path, "@", "location", 0); dkLocation = EAX;
ini_get_int stdcall (#docky_ini_path, "@", "fsize", 0); docky_cfg.fsize = EAX; ini_get_int stdcall (#docky_ini_path, "@", "fsize", 0); dkFsize = EAX;
ini_get_int stdcall (#docky_ini_path, "@", "ashow", 0); docky_cfg.ashow = EAX; ini_get_int stdcall (#docky_ini_path, "@", "ashow", 0); dkAshow = EAX;
} }
void SaveCfg(byte panel_type) void SaveCfg(byte panel_type)
{ {
if (panel_type==TASKBAR) { if (panel_type==TASKBAR) {
ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "Attachment", taskbar_cfg.Attachment); ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "Attachment", tbAttachment);
ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "SoftenUp", taskbar_cfg.SoftenUp); ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "SoftenUp", tbSoftenUp);
ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "SoftenDown", taskbar_cfg.SoftenDown); ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "SoftenDown", tbSoftenDown);
ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MinLeftButton", taskbar_cfg.MinLeftButton); ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MinLeftButton", tbMinLeftButton);
ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MinRightButton", taskbar_cfg.MinRightButton); ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MinRightButton", tbMinRightButton);
ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "RunApplButton", taskbar_cfg.RunApplButton); ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "RunApplButton", tbRunApplButton);
ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "ClnDeskButton", taskbar_cfg.ClnDeskButton); ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "ClnDeskButton", tbClnDeskButton);
ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "Clock", taskbar_cfg.Clock); ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "Clock", tbClock);
ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "CpuUsage", taskbar_cfg.CpuUsage); ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "CpuUsage", tbCpuUsage);
ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "ChangeLang", taskbar_cfg.ChangeLang); ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "ChangeLang", tbChangeLang);
ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MenuButton", taskbar_cfg.MenuButton); ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MenuButton", tbMenuButton);
ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "PanelHeight", taskbar_cfg.PanelHeight); ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "PanelHeight", tbPanelHeight);
ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "SoftenHeight", taskbar_cfg.SoftenHeight); ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "SoftenHeight", tbSoftenHeight);
ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "ButtonTopOffset", taskbar_cfg.ButtonOffset); ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "ButtonTopOffset", tbButtonOffset);
ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "ButtonBottOffset", taskbar_cfg.ButtonOffset); ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "ButtonBottOffset", tbButtonOffset);
} }
if (panel_type==DOCKY) { if (panel_type==DOCKY) {
ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "Attachment", taskbar_cfg.Attachment); ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "Attachment", tbAttachment);
ini_set_int stdcall (#docky_ini_path, "@", "location", docky_cfg.location); ini_set_int stdcall (#docky_ini_path, "@", "location", dkLocation);
ini_set_int stdcall (#docky_ini_path, "@", "fsize", docky_cfg.fsize); ini_set_int stdcall (#docky_ini_path, "@", "fsize", dkFsize);
ini_set_int stdcall (#docky_ini_path, "@", "ashow", docky_cfg.ashow); ini_set_int stdcall (#docky_ini_path, "@", "ashow", dkAshow);
} }
} }