static int spec_x;
static int spec_y;
static int _drag_x = 300;
static int _drag_y = 300;
static bool _dragging = false;
bool _click = false;
if (GetAsyncKeyState(VK_LBUTTON))
_click = true;
Vector2D _mouse_pos = m_surface()->GetMousePosition();
if (_dragging && !_click)
_dragging = false;
if (_dragging && _click)
{
spectators_pos.x = _mouse_pos.x - _drag_x;
spectators_pos.y = _mouse_pos.y - _drag_y;
spec_x = spectators_pos.x;
spec_y = spectators_pos.y;
}
int spec_width = 160;
int spec_height = 22.5;
if ((m_surface()->MouseInRegion(g_cfg.esp.keybinds_pos_x, g_cfg.esp.keybinds_pos_y, spec_width, spec_height)))
{
_dragging = true;
_drag_x = _mouse_pos.x - g_cfg.esp.keybinds_pos_x;
_drag_y = _mouse_pos.y - g_cfg.esp.keybinds_pos_y;
}