-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathClick_Drawer.cpp
62 lines (58 loc) · 1.45 KB
/
Click_Drawer.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#include <bits/stdc++.h>
#include <windows.h>
#include <winuser.h>
#include"MyLibrary.h"
using namespace std;
POINT point2;
POINT point;
CONSOLE_SCREEN_BUFFER_INFO csbi;
HWND pHwnd = ::GetForegroundWindow();
int showLicense(){
SetColorAndBackground(11,0);
cout<<"---------------Click Drawer---------------"<<endl;
cout<<"-By: rch2010 (github: github.com/rch2010) "<<endl;
cout<<" "<<endl;
cout<<"-Usage: Left/Right Key: Switch Colors "<<endl;
cout<<"-Double-Click F11 Key: Exit Full Screen "<<endl;
cout<<"--------------Have a nice day-------------"<<endl;
system("pause&&cls");
}
int main() {
int nowx,nowy;
int color=4;
full_screen();
showLicense();
while(1) {
Go:
if(KEY_DOWN(VK_LEFT)){
Sleep(60);
if(color<=0)goto next;
color--;
gotoxy(0,0);
SetColorAndBackground(15,0);
cout<<"Color: ";
SetColorAndBackground(15,color);
cout<<"["<<color<<"]";
}next:
if(KEY_DOWN(VK_RIGHT)){
Sleep(60);
if(color>=15)goto nextt;
color++;
gotoxy(0,0);
SetColorAndBackground(15,0);
cout<<"Color: ";
SetColorAndBackground(15,color);
cout<<"["<<color<<"]";
}nextt:
GetCursorPos(&point);
nowx=point.x;nowy=point.y;
gotoxy(nowx/10,nowy/5);
SetColorAndBackground(15,0);
cout<<"";
if(KEY_DOWN(VK_LBUTTON)){
SetColorAndBackground(15,color);
cout<<" ";
}
}
return 0;
}