forked from MrBesen/lolautoaccept
51 lines
897 B
C++
51 lines
897 B
C++
#pragma once
|
|
|
|
#include "scaleableinputs.h"
|
|
#include "screen.h"
|
|
#include "matcher.h"
|
|
|
|
#include <xinputsimulator.h>
|
|
|
|
class LolAutoAccept {
|
|
private:
|
|
ScreenShot* screen = nullptr;
|
|
Matcher acceptmatcher;
|
|
Matcher arrowmatcher;
|
|
Matcher banmatcher;
|
|
Matcher::Match lastacceptmatch;
|
|
XInputSimulator& sim;
|
|
|
|
ScaleableInputs inputs;
|
|
|
|
std::string prepick;
|
|
std::string ban;
|
|
std::string pick;
|
|
|
|
bool shouldrun = false;
|
|
|
|
enum class State {
|
|
LOBBY,
|
|
PREPICK,
|
|
BAN,
|
|
PICK,
|
|
GAME
|
|
};
|
|
|
|
State state = State::LOBBY;
|
|
|
|
void checkForGame();
|
|
void checkForBan();
|
|
void performClick(uint32_t nr);
|
|
void enterSearch(const std::string& text);
|
|
void pickFirst(const std::string& search);
|
|
public:
|
|
LolAutoAccept();
|
|
|
|
void setPrePick(const std::string& prePick);
|
|
void setBan(const std::string& ban);
|
|
void setPick(const std::string& pick);
|
|
|
|
bool init(); // returns true on success
|
|
void run();
|
|
void stop();
|
|
}; |