2021-10-05 14:48:28 -04:00
|
|
|
#pragma once
|
|
|
|
|
2021-11-02 13:47:42 -04:00
|
|
|
#include <memory>
|
2021-11-24 13:21:30 -05:00
|
|
|
|
2021-10-05 14:48:28 -04:00
|
|
|
#include "core/editor.h"
|
2021-11-02 13:47:42 -04:00
|
|
|
#include "core/timeline.h"
|
2021-11-24 13:21:30 -05:00
|
|
|
|
2021-12-28 13:04:50 -05:00
|
|
|
#include "game/classicnote.h"
|
|
|
|
#include "classicmode/classicactions.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-28 13:04:50 -05:00
|
|
|
explicit ClassicEditor(const std::shared_ptr<Timeline<ClassicNote>>& timeline,
|
|
|
|
const std::shared_ptr<ClassicGraphicsManager>& graphics_manager);
|
2021-11-02 13:47:42 -04:00
|
|
|
|
|
|
|
virtual void input(PlayerInput&& inputdata) override;
|
2021-12-03 14:21:27 -05:00
|
|
|
virtual void update(UpdateData&& updatedata) override;
|
2021-12-28 13:04:50 -05:00
|
|
|
virtual void display() const override;
|
2021-12-08 13:00:47 -05:00
|
|
|
virtual void recalculate(const microsec& timestamp) override;
|
2021-11-02 13:47:42 -04:00
|
|
|
|
2021-11-24 13:21:30 -05:00
|
|
|
void selectNoteType(Type type) noexcept;
|
|
|
|
|
2021-11-02 13:47:42 -04:00
|
|
|
private:
|
2021-12-09 02:55:53 -05:00
|
|
|
inline microsec adjustOffset(microsec offset) const noexcept;
|
|
|
|
|
2021-11-24 13:21:30 -05:00
|
|
|
Context _context;
|
2021-10-05 14:48:28 -04:00
|
|
|
|
2021-12-28 13:04:50 -05:00
|
|
|
const std::shared_ptr<Timeline<ClassicNote>> _timeline;
|
|
|
|
const std::shared_ptr<ClassicGraphicsManager> _graphics_manager;
|
2021-11-24 13:21:30 -05:00
|
|
|
|
|
|
|
Type _selected_type;
|
2021-12-03 14:21:27 -05:00
|
|
|
microsec _current_time;
|
2021-12-06 14:18:04 -05:00
|
|
|
microsec _scroll_step;
|
2021-10-05 14:48:28 -04:00
|
|
|
};
|