include music editor and rearrange tabs
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
#include "app/core/constants.h"
|
#include "app/core/constants.h"
|
||||||
#include "app/editor/assembly_editor.h"
|
#include "app/editor/assembly_editor.h"
|
||||||
#include "app/editor/dungeon_editor.h"
|
#include "app/editor/dungeon_editor.h"
|
||||||
|
#include "app/editor/music_editor.h"
|
||||||
#include "app/editor/overworld_editor.h"
|
#include "app/editor/overworld_editor.h"
|
||||||
#include "app/gfx/snes_palette.h"
|
#include "app/gfx/snes_palette.h"
|
||||||
#include "app/gfx/snes_tile.h"
|
#include "app/gfx/snes_tile.h"
|
||||||
@@ -88,9 +89,10 @@ void MasterEditor::UpdateScreen() {
|
|||||||
TAB_BAR("##TabBar")
|
TAB_BAR("##TabBar")
|
||||||
DrawOverworldEditor();
|
DrawOverworldEditor();
|
||||||
DrawDungeonEditor();
|
DrawDungeonEditor();
|
||||||
DrawPaletteEditor();
|
DrawMusicEditor();
|
||||||
DrawSpriteEditor();
|
DrawSpriteEditor();
|
||||||
DrawScreenEditor();
|
DrawScreenEditor();
|
||||||
|
DrawPaletteEditor();
|
||||||
END_TAB_BAR()
|
END_TAB_BAR()
|
||||||
|
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
@@ -209,6 +211,7 @@ void MasterEditor::DrawViewMenu() {
|
|||||||
static bool show_memory_editor = false;
|
static bool show_memory_editor = false;
|
||||||
static bool show_asm_editor = false;
|
static bool show_asm_editor = false;
|
||||||
static bool show_imgui_demo = false;
|
static bool show_imgui_demo = false;
|
||||||
|
static bool show_memory_viewer = false;
|
||||||
|
|
||||||
if (show_imgui_metrics) {
|
if (show_imgui_metrics) {
|
||||||
ImGui::ShowMetricsWindow(&show_imgui_metrics);
|
ImGui::ShowMetricsWindow(&show_imgui_metrics);
|
||||||
@@ -233,9 +236,33 @@ void MasterEditor::DrawViewMenu() {
|
|||||||
ImGui::End();
|
ImGui::End();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (show_memory_viewer) {
|
||||||
|
ImGui::Begin("Memory Viewer (ImGui)", &show_memory_viewer);
|
||||||
|
|
||||||
|
const float TEXT_BASE_HEIGHT = ImGui::GetTextLineHeightWithSpacing();
|
||||||
|
static ImGuiTableFlags flags =
|
||||||
|
ImGuiTableFlags_Borders | ImGuiTableFlags_Resizable |
|
||||||
|
ImGuiTableFlags_ContextMenuInBody | ImGuiTableFlags_RowBg |
|
||||||
|
ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_NoHostExtendX;
|
||||||
|
if (auto outer_size = ImVec2(0.0f, TEXT_BASE_HEIGHT * 5.5f);
|
||||||
|
ImGui::BeginTable("table1", 3, flags, outer_size)) {
|
||||||
|
for (int row = 0; row < 10; row++) {
|
||||||
|
ImGui::TableNextRow();
|
||||||
|
for (int column = 0; column < 3; column++) {
|
||||||
|
ImGui::TableNextColumn();
|
||||||
|
ImGui::Text("Cell %d,%d", column, row);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ImGui::EndTable();
|
||||||
|
}
|
||||||
|
|
||||||
|
ImGui::End();
|
||||||
|
}
|
||||||
|
|
||||||
if (ImGui::BeginMenu("View")) {
|
if (ImGui::BeginMenu("View")) {
|
||||||
ImGui::MenuItem("HEX Editor", nullptr, &show_memory_editor);
|
ImGui::MenuItem("HEX Editor", nullptr, &show_memory_editor);
|
||||||
ImGui::MenuItem("ASM Editor", nullptr, &show_asm_editor);
|
ImGui::MenuItem("ASM Editor", nullptr, &show_asm_editor);
|
||||||
|
ImGui::MenuItem("Memory Viewer", nullptr, &show_memory_viewer);
|
||||||
ImGui::MenuItem("ImGui Demo", nullptr, &show_imgui_demo);
|
ImGui::MenuItem("ImGui Demo", nullptr, &show_imgui_demo);
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
if (ImGui::BeginMenu("GUI Tools")) {
|
if (ImGui::BeginMenu("GUI Tools")) {
|
||||||
@@ -279,6 +306,12 @@ void MasterEditor::DrawScreenEditor() {
|
|||||||
END_TAB_ITEM()
|
END_TAB_ITEM()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MasterEditor::DrawMusicEditor() {
|
||||||
|
TAB_ITEM("Music")
|
||||||
|
music_editor_.Update();
|
||||||
|
END_TAB_ITEM()
|
||||||
|
}
|
||||||
|
|
||||||
void MasterEditor::DrawSpriteEditor() {
|
void MasterEditor::DrawSpriteEditor() {
|
||||||
TAB_ITEM("Sprites")
|
TAB_ITEM("Sprites")
|
||||||
END_TAB_ITEM()
|
END_TAB_ITEM()
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
#include "app/core/constants.h"
|
#include "app/core/constants.h"
|
||||||
#include "app/editor/assembly_editor.h"
|
#include "app/editor/assembly_editor.h"
|
||||||
#include "app/editor/dungeon_editor.h"
|
#include "app/editor/dungeon_editor.h"
|
||||||
|
#include "app/editor/music_editor.h"
|
||||||
#include "app/editor/overworld_editor.h"
|
#include "app/editor/overworld_editor.h"
|
||||||
#include "app/editor/palette_editor.h"
|
#include "app/editor/palette_editor.h"
|
||||||
#include "app/editor/screen_editor.h"
|
#include "app/editor/screen_editor.h"
|
||||||
@@ -45,6 +46,7 @@ class MasterEditor {
|
|||||||
void DrawOverworldEditor();
|
void DrawOverworldEditor();
|
||||||
void DrawDungeonEditor();
|
void DrawDungeonEditor();
|
||||||
void DrawPaletteEditor();
|
void DrawPaletteEditor();
|
||||||
|
void DrawMusicEditor();
|
||||||
void DrawScreenEditor();
|
void DrawScreenEditor();
|
||||||
void DrawSpriteEditor();
|
void DrawSpriteEditor();
|
||||||
|
|
||||||
@@ -59,6 +61,7 @@ class MasterEditor {
|
|||||||
OverworldEditor overworld_editor_;
|
OverworldEditor overworld_editor_;
|
||||||
PaletteEditor palette_editor_;
|
PaletteEditor palette_editor_;
|
||||||
ScreenEditor screen_editor_;
|
ScreenEditor screen_editor_;
|
||||||
|
MusicEditor music_editor_;
|
||||||
ROM rom_;
|
ROM rom_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user