Update OverworldEditor class and remove unused TilePreset
This commit is contained in:
@@ -56,7 +56,7 @@ void OverworldEditor::Update() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void OverworldEditor::DrawToolset() {
|
void OverworldEditor::DrawToolset() {
|
||||||
if (ImGui::BeginTable("Toolset", 16, toolset_table_flags, ImVec2(0, 0))) {
|
if (ImGui::BeginTable("Toolset", 17, toolset_table_flags, ImVec2(0, 0))) {
|
||||||
ImGui::TableSetupColumn("#undoTool");
|
ImGui::TableSetupColumn("#undoTool");
|
||||||
ImGui::TableSetupColumn("#redoTool");
|
ImGui::TableSetupColumn("#redoTool");
|
||||||
ImGui::TableSetupColumn("#drawTool");
|
ImGui::TableSetupColumn("#drawTool");
|
||||||
@@ -129,6 +129,17 @@ void OverworldEditor::DrawToolset() {
|
|||||||
overworld_.Load(rom_, allGfx16Ptr);
|
overworld_.Load(rom_, allGfx16Ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImGui::TableNextColumn();
|
||||||
|
ImGui::Text("Palette:");
|
||||||
|
for (int i = 0; i < 8; i++) {
|
||||||
|
std::string id = "##PaletteColor" + std::to_string(i);
|
||||||
|
ImGui::SameLine();
|
||||||
|
ImGui::ColorEdit4(id.c_str(), ¤t_palette_[i].x,
|
||||||
|
ImGuiColorEditFlags_NoInputs |
|
||||||
|
ImGuiColorEditFlags_DisplayRGB |
|
||||||
|
ImGuiColorEditFlags_DisplayHex);
|
||||||
|
}
|
||||||
|
|
||||||
ImGui::EndTable();
|
ImGui::EndTable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -274,16 +285,6 @@ void OverworldEditor::DrawOverworldCanvas() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void OverworldEditor::DrawTileSelector() {
|
void OverworldEditor::DrawTileSelector() {
|
||||||
ImGui::Text("Palette:");
|
|
||||||
for (int i = 0; i < 8; i++) {
|
|
||||||
std::string id = "##PaletteColor" + std::to_string(i);
|
|
||||||
ImGui::SameLine();
|
|
||||||
ImGui::ColorEdit4(id.c_str(), ¤t_palette_[i].x,
|
|
||||||
ImGuiColorEditFlags_NoInputs |
|
|
||||||
ImGuiColorEditFlags_DisplayRGB |
|
|
||||||
ImGuiColorEditFlags_DisplayHex);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ImGui::BeginTabBar("##TabBar", ImGuiTabBarFlags_FittingPolicyScroll)) {
|
if (ImGui::BeginTabBar("##TabBar", ImGuiTabBarFlags_FittingPolicyScroll)) {
|
||||||
if (ImGui::BeginTabItem("Tile16")) {
|
if (ImGui::BeginTabItem("Tile16")) {
|
||||||
bool child_is_visible =
|
bool child_is_visible =
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ class OverworldEditor {
|
|||||||
|
|
||||||
zelda3::Overworld overworld_;
|
zelda3::Overworld overworld_;
|
||||||
gfx::SNESPalette palette_;
|
gfx::SNESPalette palette_;
|
||||||
gfx::TilePreset current_set_;
|
|
||||||
|
|
||||||
rom::ROM rom_;
|
rom::ROM rom_;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user