#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
namespace dj {
bool axj(long long key) {
return (GetKeyState(key) < 0) ? (true) : (false);
}
struct hl {
long long h,l;
};
void de(int x) {
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),x);
}
bool ax(long long key) {
return (GetKeyState(key) < 0) ? (true) : (false);
}
hl wz(bool x = 1, bool n = 1) {
HANDLE hOutput = GetStdHandle(STD_OUTPUT_HANDLE);
HWND h = GetForegroundWindow();
CONSOLE_FONT_INFO consoleCurrentFont;
hl hl;
POINT p;
if (x) {
GetCursorPos(&p);
ScreenToClient(h, &p);
} else {
GetCursorPos(&p);
}
if (n) {
GetCurrentConsoleFont(hOutput, FALSE, &consoleCurrentFont);
p.x /= consoleCurrentFont.dwFontSize.X;
p.y /= consoleCurrentFont.dwFontSize.Y;
}
hl.h = p.y + 1;
hl.l = p.x + 1;
return hl;
}
void ycbj() {
HANDLE hStdin = GetStdHandle(STD_INPUT_HANDLE);
DWORD mode;
GetConsoleMode(hStdin, &mode);
mode &= ~ENABLE_QUICK_EDIT_MODE;
SetConsoleMode(hStdin, mode);
return;
}
void ycgb() {
CONSOLE_CURSOR_INFO cursor;
cursor.bVisible = FALSE;
cursor.dwSize = sizeof(cursor);
HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleCursorInfo(handle, &cursor);
return;
}
inline void ydgb(long long h, long long l) {
COORD pos = { l - 1,h - 1 };
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleCursorPosition(hOut, pos);
return;
}
bool pdbj(int y,int x,int x1,int x2,int ys,string zt) {
ycgb();
ycbj();
hl z=wz(1,1);
bool a=0;
if(z.h==y&&z.l>=x1&&z.l<=x2) {
ydgb(y,x);
de(ys*16);
cout<<zt;
de(ys);
if(axj(VK_LBUTTON)) {
a=1;
}
} else {
ydgb(y,x);
de(ys);
cout<<zt;
}
de(15);
return a;
}
};
using namespace dj;
int f=200,a,b,ans,k,x,water;
void gs(string x) {
int a=x.size();
for(int i=0; i<=a; ++i) {
Sleep(100);
cout<<x[i];
}
}
int main(){
gs("欢迎来到Mod笔谈");
while(1){
if(pdbj(2,1,1,10,7,"好")){
cout<<"好"<<endl;
return 0;
}
if(pdbj(3,1,1,10,7,"不好")){
cout<<"C"<<endl;
return 0;
}
}
}