Fix runtime failures after sfml-bridge merge
This commit is contained in:
parent
381e4442ae
commit
5b5b2c2aa1
|
@ -141,6 +141,9 @@ private:
|
|||
|
||||
inline void updateTopNote(const microsec& music_offset) noexcept
|
||||
{
|
||||
if (isExpired(_top_note))
|
||||
return;
|
||||
|
||||
const auto& top_note = *_top_note;
|
||||
|
||||
bool already_played = top_note->getPerfectOffset() < music_offset
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
BPMCalculatorWidget::BPMCalculatorWidget(const std::shared_ptr<BPMCalculator>& bpm_calculator, const std::shared_ptr<kku::CoreFactory>& factory) :
|
||||
Window(factory, "BPM Calculation"),
|
||||
_bpm_calculator(bpm_calculator),
|
||||
_slider(std::make_shared<BPMSlider>()),
|
||||
_slider(std::make_shared<BPMSlider>(factory)),
|
||||
_core_factory(factory),
|
||||
_ticked(false)
|
||||
{
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
#include "bpmslider.h"
|
||||
|
||||
BPMSlider::BPMSlider()
|
||||
BPMSlider::BPMSlider(const std::shared_ptr<kku::CoreFactory> &factory)
|
||||
{
|
||||
_slider_background = factory->getRectangle();
|
||||
_slider_tick = factory->getRectangle();
|
||||
|
||||
_slider_background->setColor(kku::Color{0, 0, 0, 255});
|
||||
_slider_tick->setColor(kku::Color{255, 0, 0, 255});
|
||||
}
|
||||
|
|
|
@ -2,11 +2,12 @@
|
|||
|
||||
#include "widget.h"
|
||||
#include "core/rectangle.h"
|
||||
#include "core/corefactory.h"
|
||||
|
||||
class BPMSlider : public Widget
|
||||
{
|
||||
public:
|
||||
explicit BPMSlider();
|
||||
explicit BPMSlider(const std::shared_ptr<kku::CoreFactory>& factory);
|
||||
|
||||
virtual void input(const kku::SystemEvent& event) override;
|
||||
virtual void update(const kku::microsec& dt) override;
|
||||
|
|
|
@ -6,6 +6,8 @@ CascadeMenuButton::CascadeMenuButton(const std::string& text, const std::shared_
|
|||
{
|
||||
_color_idle = kku::Color{230, 230, 230, 255};
|
||||
_color_hover = kku::Color{84, 158, 253, 255};
|
||||
|
||||
_button_content = factory->getRectangle();
|
||||
_button_content->setColor(_color_idle);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue