static Vector2D tl(700, 50); // 700,50
static bool _dragging = false;
bool _click = false;
static int drag_x = 50;
static int drag_y = 50;
if (hooks::menu_open && GetAsyncKeyState(VK_LBUTTON))
_click = true;
Vector2D _mouse_pos = hooks::mouse_pos;
if (hooks::menu_open)
{
if (_dragging && !_click)
_dragging = false;
if (_dragging && _click)
{
tl.x = _mouse_pos.x - drag_x;
tl.y = _mouse_pos.y - drag_y;
}
if (mouse_pointer(Vector2D(tl.x, tl.y), Vector2D(250, 20)))
{
_dragging = true;
drag_x = _mouse_pos.x - tl.x;
drag_y = _mouse_pos.y - tl.y;
}
}
g_cfg.menu.x = tl.x;
g_cfg.menu.y = tl.y;
const auto pos = Vector2D(g_cfg.menu.x, g_cfg.menu.y);