forked from KolibriOS/kolibrios
CMM: lib/copyf.h fix typo, mouse_cfg decrease window redraw
git-svn-id: svn://kolibrios.org@5642 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
110a703c5e
commit
93060a3349
@ -116,7 +116,7 @@
|
|||||||
"▌Х╗║╙═ #8: ╜╔╓╝АБ═Б╝Г╜╝ ╛╔АБ═ ╜═ ╓╗А╙╔",
|
"▌Х╗║╙═ #8: ╜╔╓╝АБ═Б╝Г╜╝ ╛╔АБ═ ╜═ ╓╗А╙╔",
|
||||||
"▌Х╗║╙═ #9: Б═║╚╗Ф═ FAT Ю═╖ЮЦХ╔╜═",
|
"▌Х╗║╙═ #9: Б═║╚╗Ф═ FAT Ю═╖ЮЦХ╔╜═",
|
||||||
"▌Х╗║╙═ #10: ╓╝АБЦ╞ ╖═╞Ю╔И╔╜",
|
"▌Х╗║╙═ #10: ╓╝АБЦ╞ ╖═╞Ю╔И╔╜",
|
||||||
"<EFBFBD>訡<EFBFBD><EFBFBD> #11: <20>訡<EFBFBD><E8A8A1> <20><><EFBFBD>னᢠ",
|
"庤ā獱 #11: <20>ā獱 汜忄<E6B19C>徕<EFBFBD>",
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0,
|
0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0,
|
0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
"▌Х╗║╙═ #30: ╜╔╓╝АБ═Б╝Г╜╝ ╞═╛ОБ╗",
|
"▌Х╗║╙═ #30: ╜╔╓╝АБ═Б╝Г╜╝ ╞═╛ОБ╗",
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
?define POINTER_DELAY "‡ ¤¥à¦ª 㪠§ â¥«ï ¬ëè¨"
|
?define POINTER_DELAY "‡ ¤¥à¦ª 㪠§ â¥«ï ¬ëè¨"
|
||||||
?define MOUSE_EMULATION "<EFBFBD>¬ã«ïæ¨ï ã¯à ¢«¥¨ï 㪠§ ⥫¥¬ ç¥à¥§ ª« ¢¨ âãàã"
|
?define MOUSE_EMULATION "<EFBFBD>¬ã«ïæ¨ï ã¯à ¢«¥¨ï 㪠§ ⥫¥¬ ç¥à¥§ ª« ¢¨ âãàã"
|
||||||
?define MADMOUSE "‘ªà®§ë¥ ¤«ï ªãàá®à áâ®à®ë íªà "
|
?define MADMOUSE "‘ªà®§ë¥ ¤«ï ªãàá®à áâ®à®ë íªà "
|
||||||
//?define MADMOUSE_DESCRIPTION "'When cursor reaches screen side switch it to inverce side' -I"
|
|
||||||
#else
|
#else
|
||||||
?define WINDOW_TITLE "Mouse testing and configuration"
|
?define WINDOW_TITLE "Mouse testing and configuration"
|
||||||
?define CHECK_MOUSE_1 "Click on this area to"
|
?define CHECK_MOUSE_1 "Click on this area to"
|
||||||
@ -32,10 +31,10 @@
|
|||||||
?define POINTER_DELAY "Mouse pointer delay"
|
?define POINTER_DELAY "Mouse pointer delay"
|
||||||
?define MOUSE_EMULATION "Enable mouse emulation using keyboard NumPad"
|
?define MOUSE_EMULATION "Enable mouse emulation using keyboard NumPad"
|
||||||
?define MADMOUSE "Through screen sides for pointer"
|
?define MADMOUSE "Through screen sides for pointer"
|
||||||
//?define MADMOUSE_DESCRIPTION "'When cursor reaches screen side switch it to inverce side' -I"
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
frame mouse_frame = { 0, 000, 14, 130, 14, 0x000111, 0xFFFfff, 0, 0, 0, 0, 6, 0x000111, 0xCCCccc };
|
frame mouse_frame = { 0, 000, 14, 130, 14, 0x000111, 0xFFFfff, 0, 0, 0, 0, 6, 0x000111, 0xCCCccc };
|
||||||
|
char pos_x = 22;
|
||||||
|
|
||||||
|
|
||||||
unsigned char panels_img_data[] = FROM "mouse_image.raw";
|
unsigned char panels_img_data[] = FROM "mouse_image.raw";
|
||||||
@ -121,7 +120,7 @@ void main() {
|
|||||||
mouse_cfg.pointer_delay--;
|
mouse_cfg.pointer_delay--;
|
||||||
SetMouseDelay(mouse_cfg.pointer_delay);
|
SetMouseDelay(mouse_cfg.pointer_delay);
|
||||||
}
|
}
|
||||||
DrawWindowContent();
|
DrawControls();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case evKey:
|
case evKey:
|
||||||
@ -133,32 +132,17 @@ void main() {
|
|||||||
DefineAndDrawWindow(430, 150, 360, 280+GetSkinHeight(),0x34,sc.work,WINDOW_TITLE);
|
DefineAndDrawWindow(430, 150, 360, 280+GetSkinHeight(),0x34,sc.work,WINDOW_TITLE);
|
||||||
GetProcessInfo(#Form, SelfInfo);
|
GetProcessInfo(#Form, SelfInfo);
|
||||||
if (Form.status_window>2) break;
|
if (Form.status_window>2) break;
|
||||||
mouse_frame.size_x = - mouse_frame.start_x * 2 + Form.cwidth;
|
SetFrameColors();
|
||||||
mouse_frame.font_color = sc.work_text;
|
DefineButton(mouse_frame.start_x+2, mouse_frame.start_y+2, mouse_frame.size_x-4,
|
||||||
mouse_frame.font_backgr_color = sc.work;
|
mouse_frame.size_y-4, 99+BT_NOFRAME, 0xF0F2F3); //needed to handle mouse_up and refresh mouse image
|
||||||
mouse_frame.ext_col = sc.work_graph;
|
frame_draw stdcall (#mouse_frame);
|
||||||
DrawWindowContent();
|
WriteTextB(pos_x + 110, mouse_frame.start_y + 25, 0x90, 0x2C343C, CHECK_MOUSE_1);
|
||||||
|
WriteTextB(pos_x + 110, mouse_frame.start_y + 45, 0x90, 0x2C343C, CHECK_MOUSE_2);
|
||||||
|
DrawMouseImage();
|
||||||
|
DrawControls();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DrawWindowContent() {
|
|
||||||
char pos_x = 22;
|
|
||||||
|
|
||||||
DefineButton(mouse_frame.start_x, mouse_frame.start_y, mouse_frame.size_x, mouse_frame.size_y, 99+BT_NOFRAME, 0xF0F2F3); //needed to handle mouse_up and refresh mouse image
|
|
||||||
frame_draw stdcall (#mouse_frame);
|
|
||||||
DrawMouseImage();
|
|
||||||
WriteTextB(pos_x + 110, mouse_frame.start_y + 25, 0x90, 0x2C343C, CHECK_MOUSE_1);
|
|
||||||
WriteTextB(pos_x + 110, mouse_frame.start_y + 45, 0x90, 0x2C343C, CHECK_MOUSE_2);
|
|
||||||
|
|
||||||
PanelCfg_MoreLessBox(pos_x, mouse_frame.start_y + 142, 120, 121, mouse_cfg.pointer_speed, POINTER_SPEED);
|
|
||||||
PanelCfg_MoreLessBox(pos_x, mouse_frame.start_y + 170, 122, 123, mouse_cfg.pointer_delay, POINTER_DELAY);
|
|
||||||
|
|
||||||
PanelCfg_CheckBox(pos_x, mouse_frame.start_y + 202, 100, MOUSE_EMULATION, mouse_cfg.emulation);
|
|
||||||
PanelCfg_CheckBox(pos_x, mouse_frame.start_y + 226, 101, MADMOUSE, mouse_cfg.madmouse);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void PanelCfg_CheckBox(dword x, y, id, text, byte value) {
|
void PanelCfg_CheckBox(dword x, y, id, text, byte value) {
|
||||||
CheckBox(x, y, 14, 14, id, text, sc.work_graph, sc.work_text, value);
|
CheckBox(x, y, 14, 14, id, text, sc.work_graph, sc.work_text, value);
|
||||||
}
|
}
|
||||||
@ -169,7 +153,22 @@ void PanelCfg_MoreLessBox(dword x, y, id_more, id_less; byte value; dword text)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void DrawMouseImage() {
|
void DrawMouseImage() {
|
||||||
_PutImage(mouse_frame.start_x+30, mouse_frame.start_y + 15, panels_img.w, panels_img.h, mouse_cfg.button_clicked * panels_img.w * panels_img.h * 3 + panels_img.data);
|
_PutImage(mouse_frame.start_x+30, mouse_frame.start_y + 15, panels_img.w, panels_img.h,
|
||||||
|
mouse_cfg.button_clicked * panels_img.w * panels_img.h * 3 + panels_img.data);
|
||||||
|
}
|
||||||
|
|
||||||
|
void DrawControls() {
|
||||||
|
PanelCfg_MoreLessBox(pos_x, mouse_frame.start_y + 142, 120, 121, mouse_cfg.pointer_speed, POINTER_SPEED);
|
||||||
|
PanelCfg_MoreLessBox(pos_x, mouse_frame.start_y + 170, 122, 123, mouse_cfg.pointer_delay, POINTER_DELAY);
|
||||||
|
PanelCfg_CheckBox(pos_x, mouse_frame.start_y + 202, 100, MOUSE_EMULATION, mouse_cfg.emulation);
|
||||||
|
PanelCfg_CheckBox(pos_x, mouse_frame.start_y + 226, 101, MADMOUSE, mouse_cfg.madmouse);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetFrameColors() {
|
||||||
|
mouse_frame.size_x = - mouse_frame.start_x * 2 + Form.cwidth;
|
||||||
|
mouse_frame.font_color = sc.work_text;
|
||||||
|
mouse_frame.font_backgr_color = sc.work;
|
||||||
|
mouse_frame.ext_col = sc.work_graph;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LoadCfg() {
|
void LoadCfg() {
|
||||||
|
Loading…
Reference in New Issue
Block a user