void InputMouse::Impl::SetPos( int x , int y ) const { if( SetMousePoint( x , y ) == FunctionFailure ) { exit( DxLib_Failure ); } }
// ---------------------------------------------------- // Mouse::SetMousePosition // ---------------------------------------------------- void Mouse::SetPosition(int X, int Y) { // マウス位置を指定の位置に移動させる SetMousePoint( X, Y); // あらかじめ取得した位置も変更する GetInstance()._MouseLocation.X = X; GetInstance()._MouseLocation.Y = Y; // 終了 return; }
void ChessPiece::FocusEvent(MouseEvent event) { isSelected = true; //cout << "mouse X: " << event.getX() << endl; //cout << "mouse Y: " << event.getY() << endl; cout << "Focus event on: " << LocationsToString(loc) << endl; Vec2f temp = GetCenterBoxPoint(); //cout << "Center point of selected peice X: " << temp.x << " Y: " << temp.y << endl; previousTopLeftPoint = GetTopLeftBoxPoint(); SetMousePoint(event.getX(), event.getY()); }