void Panel::_update() { GUIElement::_update(); Vector2 posPix = getPositionPixels(); Vector2 sclPix = getScalePixels(); mRect->setPosition(posPix.x, posPix.y); mRect->setScale(sclPix.x, sclPix.y); }
float OverheadPlayer::angleToMouse() { Vector2f mouse = application->localMouseCoords(); Vector2f direction = mouse - getPositionPixels(); return std::atan2f(direction.y,direction.x); }