inherit virtual Editor for all editor classes
This commit is contained in:
@@ -12,7 +12,7 @@ namespace yaze {
|
||||
namespace app {
|
||||
namespace editor {
|
||||
|
||||
void MusicEditor::Update() {
|
||||
absl::Status MusicEditor::Update() {
|
||||
if (ImGui::BeginTable("MusicEditorColumns", 2, music_editor_flags_,
|
||||
ImVec2(0, 0))) {
|
||||
ImGui::TableSetupColumn("Assembly");
|
||||
@@ -30,6 +30,8 @@ void MusicEditor::Update() {
|
||||
|
||||
ImGui::EndTable();
|
||||
}
|
||||
|
||||
return absl::OkStatus();
|
||||
}
|
||||
|
||||
void MusicEditor::DrawChannels() {
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
#include "absl/strings/str_format.h"
|
||||
#include "app/editor/code/assembly_editor.h"
|
||||
#include "app/editor/utils/editor.h"
|
||||
#include "app/gui/canvas.h"
|
||||
#include "app/gui/icons.h"
|
||||
#include "app/gui/input.h"
|
||||
@@ -58,9 +59,17 @@ static constexpr absl::string_view kSongNotes[] = {
|
||||
* @class MusicEditor
|
||||
* @brief A class for editing music data in a Rom.
|
||||
*/
|
||||
class MusicEditor : public SharedRom {
|
||||
class MusicEditor : public SharedRom, public Editor {
|
||||
public:
|
||||
void Update();
|
||||
MusicEditor() { type_ = EditorType::kMusic; }
|
||||
|
||||
absl::Status Update() override;
|
||||
|
||||
absl::Status Cut() override { return absl::OkStatus(); }
|
||||
absl::Status Copy() override { return absl::OkStatus(); }
|
||||
absl::Status Paste() override { return absl::OkStatus(); }
|
||||
absl::Status Undo() override { return absl::OkStatus(); }
|
||||
absl::Status Redo() override { return absl::OkStatus(); }
|
||||
|
||||
private:
|
||||
void DrawChannels();
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <imgui/imgui.h>
|
||||
|
||||
#include "absl/status/status.h"
|
||||
#include "app/editor/utils/editor.h"
|
||||
#include "app/gfx/snes_palette.h"
|
||||
#include "app/gui/canvas.h"
|
||||
#include "app/gui/icons.h"
|
||||
@@ -81,9 +82,18 @@ class PaletteEditorHistory {
|
||||
* @class PaletteEditor
|
||||
* @brief Allows the user to view and edit in game palettes.
|
||||
*/
|
||||
class PaletteEditor : public SharedRom {
|
||||
class PaletteEditor : public SharedRom, public Editor {
|
||||
public:
|
||||
absl::Status Update();
|
||||
PaletteEditor() { type_ = EditorType::kPalette; }
|
||||
|
||||
absl::Status Update() override;
|
||||
|
||||
absl::Status Cut() override { return absl::OkStatus(); }
|
||||
absl::Status Copy() override { return absl::OkStatus(); }
|
||||
absl::Status Paste() override { return absl::OkStatus(); }
|
||||
absl::Status Undo() override { return absl::OkStatus(); }
|
||||
absl::Status Redo() override { return absl::OkStatus(); }
|
||||
|
||||
void DisplayCategoryTable();
|
||||
absl::Status DrawPaletteGroups();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user