You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
project-kyoku/src/gui/widgets/bpmslider.cpp

39 lines
783 B
C++

#include "bpmslider.h"
BPMSlider::BPMSlider(const std::shared_ptr<sf::Font> &font)
{
_bpm_value.setFont(*font);
}
void BPMSlider::input(const sf::Event& event)
{
Widget::input(event);
}
void BPMSlider::update(const sf::Time& dt)
{
Widget::update(dt);
}
void BPMSlider::draw(sf::RenderTarget& target, sf::RenderStates states) const
{
Widget::draw(target, states);
}
void BPMSlider::setRect(const sf::FloatRect& rect)
{
_slider_background.setPosition(rect.left, rect.top);
_slider_background.setSize({rect.width, rect.height});
}
void BPMSlider::setPosition(const sf::Vector2f& position)
{
_slider_background.setPosition(position);
}
bool BPMSlider::isUnderMouse(int mouse_x, int mouse_y) const
{
return mouse_x == mouse_y; // just to compile
}