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.

32 lines
749 B
C++

#include "holdmanager.h"
#include "classicarrownote.h"
#include <algorithm>
#include <iostream>
void HoldManager::emplace(ClassicArrowNote *note)
{
_notes_on_hold.emplace_back(note);
}
void HoldManager::checkRelease(kku::SystemEvent::Key::Code released_key)
{
bool key_match = std::any_of(_notes_on_hold.begin(), _notes_on_hold.end(),
[released_key](const auto &note)
{ return note->isPressedAs(released_key); });
if (key_match)
_notes_on_hold.clear();
}
void HoldManager::drawHoldBar()
{
if (_notes_on_hold.empty())
return;
/* taking proxy sprites for notes on hold
* and drawing on centered bar */
// _graphics_manager-> . . .
}