From 039f8c116189e54cb32a711d659ad01d45208ee1 Mon Sep 17 00:00:00 2001 From: daleclack <63892434+daleclack@users.noreply.github.com> Date: Tue, 15 Sep 2020 20:53:34 +0800 Subject: [PATCH] Add ege3.cpp --- ege/ege3.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 ege/ege3.cpp diff --git a/ege/ege3.cpp b/ege/ege3.cpp new file mode 100644 index 0000000..aca0231 --- /dev/null +++ b/ege/ege3.cpp @@ -0,0 +1,20 @@ +#include +#include +using namespace std; +int main(){ + initgraph(480,360); + setfont(18,0,"SimSum"); + mouse_msg msg={0}; + for(;is_run();delay_fps(60)){ + while(mousemsg()){ + msg=getmouse(); + } + cleardevice(); + xyprintf(0,0,"x=%10d y=%10d",msg.x,msg.y); + xyprintf(0,20,"move=%d down=%d up=%d",(int)msg.is_move(),(int)msg.is_down(),(int)msg.is_up()); + xyprintf(0,40,"left=%d right=%d mid=%d",(int)msg.is_left(),(int)msg.is_right(),(int)msg.is_mid()); + xyprintf(0,60,"wheel=%d wheel rotare=%d",(int)msg.is_wheel(),msg.wheel); + } + closegraph(); + return 0; +}