yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
music_instrument_editor_panel.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_MUSIC_PANELS_MUSIC_INSTRUMENT_EDITOR_PANEL_H_
2#define YAZE_APP_EDITOR_MUSIC_PANELS_MUSIC_INSTRUMENT_EDITOR_PANEL_H_
3
4#include <functional>
5#include <string>
6
11
12namespace yaze {
13namespace editor {
14
22 public:
24 music::InstrumentEditorView* instrument_view)
25 : music_bank_(music_bank), instrument_view_(instrument_view) {}
26
27 // ==========================================================================
28 // EditorPanel Identity
29 // ==========================================================================
30
31 std::string GetId() const override { return "music.instrument_editor"; }
32 std::string GetDisplayName() const override { return "Instrument Editor"; }
33 std::string GetIcon() const override { return ICON_MD_SPEAKER; }
34 std::string GetEditorCategory() const override { return "Music"; }
35 int GetPriority() const override { return 20; }
36
37 // ==========================================================================
38 // EditorPanel Drawing
39 // ==========================================================================
40
41 void Draw(bool* p_open) override {
43 ImGui::TextDisabled("Music bank not loaded");
44 return;
45 }
46
48 }
49
50 // ==========================================================================
51 // Callback Setters
52 // ==========================================================================
53
54 void SetOnEditCallback(std::function<void()> callback) {
56 }
57
58 void SetOnPreviewCallback(std::function<void(int)> callback) {
60 }
61
62 private:
65};
66
67} // namespace editor
68} // namespace yaze
69
70#endif // YAZE_APP_EDITOR_MUSIC_PANELS_MUSIC_INSTRUMENT_EDITOR_PANEL_H_
Base interface for all logical panel components.
EditorPanel wrapper for the instrument editor.
std::string GetId() const override
Unique identifier for this panel.
int GetPriority() const override
Get display priority for menu ordering.
std::string GetEditorCategory() const override
Editor category this panel belongs to.
void Draw(bool *p_open) override
Draw the panel content.
void SetOnPreviewCallback(std::function< void(int)> callback)
void SetOnEditCallback(std::function< void()> callback)
std::string GetDisplayName() const override
Human-readable name shown in menus and title bars.
std::string GetIcon() const override
Material Design icon for this panel.
MusicInstrumentEditorPanel(zelda3::music::MusicBank *music_bank, music::InstrumentEditorView *instrument_view)
Editor for SNES instruments (ADSR, Gain, Samples).
void SetOnEditCallback(std::function< void()> callback)
Set callback for when edits occur (to trigger undo save).
void Draw(MusicBank &bank)
Draw the instrument editor.
void SetOnPreviewCallback(std::function< void(int)> callback)
Set callback for instrument preview.
Manages the collection of songs, instruments, and samples from a ROM.
Definition music_bank.h:27
#define ICON_MD_SPEAKER
Definition icons.h:1812