78 lines
3.7 KiB
C++
78 lines
3.7 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(Internal::Widget W, Button Button = BUTTON_LEFT);
|
|
static bool Click(Internal::Widget W, const std::string& Action, const std::string& Target = "");
|
|
static bool Click(Internal::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(Internal::GroundItem G, Button Button = BUTTON_LEFT);
|
|
static bool Click(Internal::GroundItem G, const std::string& Action);
|
|
static bool Click(Internal::GroundItem G, const std::vector<std::string>& PossibleActions);
|
|
|
|
static bool Click(Internal::NPC N, Button Button = BUTTON_LEFT);
|
|
static bool Click(Internal::NPC N, const std::string& Action);
|
|
static bool Click(Internal::NPC N, const std::vector<std::string>& PossibleActions);
|
|
|
|
static bool Click(Internal::Player P, Button Button = BUTTON_LEFT);
|
|
static bool Click(Internal::Player P, const std::string& Action);
|
|
static bool Click(Internal::Player P, const std::vector<std::string>& PossibleActions);
|
|
|
|
static bool Click(Internal::GameObject G, Button Button = BUTTON_LEFT);
|
|
static bool Click(Internal::GameObject G, const std::string& Action);
|
|
static bool Click(Internal::GameObject G, const std::vector<std::string>& PossibleActions);
|
|
|
|
static bool Click(Internal::GroundObject G, Button Button = BUTTON_LEFT);
|
|
static bool Click(Internal::GroundObject G, const std::string& Action);
|
|
static bool Click(Internal::GroundObject G, const std::vector<std::string>& PossibleActions);
|
|
|
|
static bool Click(Internal::WallObject W, Button Button = BUTTON_LEFT);
|
|
static bool Click(Internal::WallObject W, const std::string& Action);
|
|
static bool Click(Internal::WallObject 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
|