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