AlpacaLibrary/Include/Game/Tools/Interact.hpp

47 lines
1.6 KiB
C++
Raw Normal View History

2017-12-25 23:49:48 +00:00
#ifndef INTERACT_HPP_INCLUDED
#define INTERACT_HPP_INCLUDED
#include "../../Core/Input.hpp"
#include "../../Core/Internal.hpp"
#include <functional>
#include <string>
#include <cstdint>
/** @addtogroup Tools
* @{ */
class Interact
{
public:
2018-05-10 01:08:38 +00:00
static bool MoveMouse(const Point& P);
static bool MoveMouse(const Box& B);
2017-12-25 23:49:48 +00:00
2018-05-10 01:08:38 +00:00
static bool Click(const Button& B = BUTTON_LEFT);
2017-12-25 23:49:48 +00:00
2018-05-10 01:08:38 +00:00
static bool Click(const Point& P, const Button& B = BUTTON_LEFT);
static bool Click(const Point& P, const std::string& Option);
2018-05-15 03:41:51 +00:00
static bool Click(const Point& P, const std::vector<std::string>& Options);
2017-12-25 23:49:48 +00:00
2018-05-10 01:08:38 +00:00
static bool Click(const Box& B, const Button& Button = BUTTON_LEFT);
static bool Click(const Box& B, const std::string& Option);
2018-05-15 03:41:51 +00:00
static bool Click(const Box& B, const std::vector<std::string>& Options);
2017-12-25 23:49:48 +00:00
2018-05-10 01:08:38 +00:00
static bool Click(const Convex& C, const Button& B = BUTTON_LEFT);
static bool Click(const Convex& C, const std::string& Option);
2018-05-15 03:41:51 +00:00
static bool Click(const Convex& C, const std::vector<std::string>& Options);
2017-12-25 23:49:48 +00:00
2018-05-10 01:08:38 +00:00
static bool Scroll(const ScrollDirection& Direction);
static bool ScrollUntil(const ScrollDirection& Direction, std::int32_t Duration, const std::function<bool()>& Func);
2017-12-25 23:49:48 +00:00
static bool UpKey(std::int32_t Key);
static bool DownKey(std::int32_t Key);
bool ReleaseKey(std::int32_t Key);
bool HoldKey(std::int32_t Key, std::uint32_t Duration);
static bool TypeKey(std::int32_t Key);
static bool TypeString(const std::string& String, bool PressEnter = false);
};
/** @} */
#endif // INTERACT_HPP_INCLUDED