78 lines
3.5 KiB
C++
78 lines
3.5 KiB
C++
|
#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:
|
||
|
static bool MoveMouse(Point P);
|
||
|
static bool MoveMouse(Box B);
|
||
|
|
||
|
static bool Scroll(ScrollDirection Direction);
|
||
|
static bool Scroll(Point P, ScrollDirection Direction);
|
||
|
static bool Scroll(Box B, ScrollDirection Direction);
|
||
|
static bool ScrollUntil(ScrollDirection Direction, std::int32_t Duration, const std::function<bool()>& Func);
|
||
|
|
||
|
static bool Click(Button Button = BUTTON_LEFT);
|
||
|
|
||
|
static bool Click(Point P, Button Button = BUTTON_LEFT);
|
||
|
static bool Click(Point P, const std::string& Action, const std::string& Target = "");
|
||
|
static bool Click(Point P, const std::vector<std::string>& PossibleActions, const std::vector<std::string>& PossibleTargets = {""});
|
||
|
|
||
|
static bool Click(Box B, Button Button = BUTTON_LEFT);
|
||
|
static bool Click(Box B, const std::string& Action, const std::string& Target = "");
|
||
|
static bool Click(Box B, const std::vector<std::string>& PossibleActions, const std::vector<std::string>& PossibleTargets = {""});
|
||
|
|
||
|
static bool Click(Widget W, Button Button = BUTTON_LEFT);
|
||
|
static bool Click(Widget W, const std::string& Action, const std::string& Target = "");
|
||
|
static bool Click(Widget W, const std::vector<std::string>& PossibleActions, const std::vector<std::string>& PossibleTargets = {""});
|
||
|
|
||
|
static bool Click(Convex C, Button Button = BUTTON_LEFT);
|
||
|
static bool Click(Convex C, const std::string& Action, const std::string& Target = "");
|
||
|
static bool Click(Convex C, const std::vector<std::string>& PossibleActions, const std::vector<std::string>& PossibleTargets = {""});
|
||
|
|
||
|
static bool Click(GroundItem G, Button Button = BUTTON_LEFT);
|
||
|
static bool Click(GroundItem G, const std::string& Action);
|
||
|
static bool Click(GroundItem G, const std::vector<std::string>& PossibleActions);
|
||
|
|
||
|
static bool Click(NPC N, Button Button = BUTTON_LEFT);
|
||
|
static bool Click(NPC N, const std::string& Action);
|
||
|
static bool Click(NPC N, const std::vector<std::string>& PossibleActions);
|
||
|
|
||
|
static bool Click(Player P, Button Button = BUTTON_LEFT);
|
||
|
static bool Click(Player P, const std::string& Action);
|
||
|
static bool Click(Player P, const std::vector<std::string>& PossibleActions);
|
||
|
|
||
|
static bool Click(GameModel G, Button Button = BUTTON_LEFT);
|
||
|
static bool Click(GameModel G, const std::string& Action);
|
||
|
static bool Click(GameModel G, const std::vector<std::string>& PossibleActions);
|
||
|
|
||
|
static bool Click(GroundModel G, Button Button = BUTTON_LEFT);
|
||
|
static bool Click(GroundModel G, const std::string& Action);
|
||
|
static bool Click(GroundModel G, const std::vector<std::string>& PossibleActions);
|
||
|
|
||
|
static bool Click(WallModel W, Button Button = BUTTON_LEFT);
|
||
|
static bool Click(WallModel W, const std::string& Action);
|
||
|
static bool Click(WallModel W, const std::vector<std::string>& PossibleActions);
|
||
|
|
||
|
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
|