yaze
0.3.2
Link to the Past ROM Editor
Loading...
Searching...
No Matches
music_assembly_panel.h
Go to the documentation of this file.
1
#ifndef YAZE_APP_EDITOR_MUSIC_PANELS_MUSIC_ASSEMBLY_PANEL_H_
2
#define YAZE_APP_EDITOR_MUSIC_PANELS_MUSIC_ASSEMBLY_PANEL_H_
3
4
#include <string>
5
6
#include "
app/editor/code/assembly_editor.h
"
7
#include "
app/editor/system/workspace/editor_panel.h
"
8
#include "
app/gui/core/icons.h
"
9
10
namespace
yaze
{
11
namespace
editor {
12
17
class
MusicAssemblyPanel
:
public
WindowContent
{
18
public
:
19
explicit
MusicAssemblyPanel
(
AssemblyEditor
* assembly_editor)
20
:
assembly_editor_
(assembly_editor) {}
21
22
// ==========================================================================
23
// WindowContent Identity
24
// ==========================================================================
25
26
std::string
GetId
()
const override
{
return
"music.assembly"
; }
27
std::string
GetDisplayName
()
const override
{
return
"Assembly View"
; }
28
std::string
GetIcon
()
const override
{
return
ICON_MD_CODE
; }
29
std::string
GetEditorCategory
()
const override
{
return
"Music"
; }
30
int
GetPriority
()
const override
{
return
30; }
31
32
// ==========================================================================
33
// WindowContent Drawing
34
// ==========================================================================
35
36
void
Draw
(
bool
* p_open)
override
{
37
if
(!
assembly_editor_
) {
38
ImGui::TextDisabled(
"Assembly editor not available"
);
39
return
;
40
}
41
42
assembly_editor_
->
InlineUpdate
();
43
}
44
45
private
:
46
AssemblyEditor
*
assembly_editor_
=
nullptr
;
47
};
48
49
}
// namespace editor
50
}
// namespace yaze
51
52
#endif
// YAZE_APP_EDITOR_MUSIC_PANELS_MUSIC_ASSEMBLY_PANEL_H_
assembly_editor.h
yaze::editor::AssemblyEditor
Text editor for modifying assembly code.
Definition
assembly_editor.h:45
yaze::editor::AssemblyEditor::InlineUpdate
void InlineUpdate()
Definition
assembly_editor.cc:2022
yaze::editor::MusicAssemblyPanel
WindowContent wrapper for the assembly editor view in Music context.
Definition
music_assembly_panel.h:17
yaze::editor::MusicAssemblyPanel::MusicAssemblyPanel
MusicAssemblyPanel(AssemblyEditor *assembly_editor)
Definition
music_assembly_panel.h:19
yaze::editor::MusicAssemblyPanel::GetId
std::string GetId() const override
Unique identifier for this panel.
Definition
music_assembly_panel.h:26
yaze::editor::MusicAssemblyPanel::Draw
void Draw(bool *p_open) override
Draw the panel content.
Definition
music_assembly_panel.h:36
yaze::editor::MusicAssemblyPanel::assembly_editor_
AssemblyEditor * assembly_editor_
Definition
music_assembly_panel.h:46
yaze::editor::MusicAssemblyPanel::GetPriority
int GetPriority() const override
Get display priority for menu ordering.
Definition
music_assembly_panel.h:30
yaze::editor::MusicAssemblyPanel::GetEditorCategory
std::string GetEditorCategory() const override
Editor category this panel belongs to.
Definition
music_assembly_panel.h:29
yaze::editor::MusicAssemblyPanel::GetIcon
std::string GetIcon() const override
Material Design icon for this panel.
Definition
music_assembly_panel.h:28
yaze::editor::MusicAssemblyPanel::GetDisplayName
std::string GetDisplayName() const override
Human-readable name shown in menus and title bars.
Definition
music_assembly_panel.h:27
yaze::editor::WindowContent
Base interface for all logical window content components.
Definition
editor_panel.h:89
icons.h
ICON_MD_CODE
#define ICON_MD_CODE
Definition
icons.h:434
yaze
Definition
patch_export_usage.cc:8
editor_panel.h
src
app
editor
music
ui
window
music_assembly_panel.h
Generated by
1.10.0