project-kyoku/modes/classicmode/editor/classiceditor.h

36 lines
781 B
C
Raw Normal View History

2021-10-05 14:48:28 -04:00
#pragma once
2021-11-02 13:47:42 -04:00
#include <memory>
2021-10-05 14:48:28 -04:00
#include "core/editor.h"
2021-11-02 13:47:42 -04:00
#include "core/timeline.h"
#include "mockclassicnote.h"
2021-11-02 13:47:42 -04:00
class ClassicGraphicsManager;
2021-10-05 14:48:28 -04:00
class ClassicEditor : public Editor
{
public:
2021-12-21 12:07:19 -05:00
explicit ClassicEditor();
2021-11-02 13:47:42 -04:00
virtual void input(PlayerInput&& inputdata) override;
virtual void update(UpdateData&& updatedata) override;
2021-11-02 13:47:42 -04:00
virtual void draw() const override;
virtual void recalculate(const microsec& timestamp) override;
2021-11-02 13:47:42 -04:00
void selectNoteType(Type type) noexcept;
2021-11-02 13:47:42 -04:00
private:
inline microsec adjustOffset(microsec offset) const noexcept;
Context _context;
2021-10-05 14:48:28 -04:00
2021-11-02 13:47:42 -04:00
std::shared_ptr<ClassicGraphicsManager> _graphics_manager;
Timeline<MockClassicNote> _timeline;
Type _selected_type;
microsec _current_time;
2021-12-06 14:18:04 -05:00
microsec _scroll_step;
2021-10-05 14:48:28 -04:00
};