diff --git a/src/engine/vgmOps.cpp b/src/engine/vgmOps.cpp index 9529631a1..0ddf7f602 100644 --- a/src/engine/vgmOps.cpp +++ b/src/engine/vgmOps.cpp @@ -2679,7 +2679,8 @@ SafeWriter* DivEngine::saveVGM(bool* sysToExport, bool loop, int version, bool p w->writeWString(ws,false); // japanese author name w->writeS(0); // date w->writeWString(L"Furnace (chiptune tracker)",false); // ripper - w->writeS(0); // notes + ws=utf8To16(song.notes.c_str()); + w->writeWString(ws,false); // notes int gd3Len=w->tell()-gd3Off-12; diff --git a/src/gui/editControls.cpp b/src/gui/editControls.cpp index 34beff48b..40269259e 100644 --- a/src/gui/editControls.cpp +++ b/src/gui/editControls.cpp @@ -508,7 +508,7 @@ void FurnaceGUI::drawMobileControls() { mobileMenuOpen=false; doAction(GUI_ACTION_SAVE_AS); } - + ImGui::SameLine(); if (ImGui::Button(_("Export"))) { doAction(GUI_ACTION_EXPORT); } @@ -533,6 +533,10 @@ void FurnaceGUI::drawMobileControls() { drawSpeed(true); ImGui::EndTabItem(); } + if (ImGui::BeginTabItem(_("Comments"))) { + drawNotes(true); + ImGui::EndTabItem(); + } ImGui::EndTabBar(); } break; diff --git a/src/gui/gui.h b/src/gui/gui.h index 83d412b7f..72436f071 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -2832,7 +2832,7 @@ class FurnaceGUI { void drawMemory(); void drawCompatFlags(); void drawPiano(); - void drawNotes(); + void drawNotes(bool asChild=false); void drawChannels(); void drawPatManager(); void drawSysManager(); diff --git a/src/gui/songNotes.cpp b/src/gui/songNotes.cpp index cf55b7aef..15ecb2a82 100644 --- a/src/gui/songNotes.cpp +++ b/src/gui/songNotes.cpp @@ -22,18 +22,23 @@ // NOTE: please don't ask me to enable text wrap. // Dear ImGui doesn't have that feature. D: -void FurnaceGUI::drawNotes() { +void FurnaceGUI::drawNotes(bool asChild) { if (nextWindow==GUI_WINDOW_NOTES) { notesOpen=true; ImGui::SetNextWindowFocus(); nextWindow=GUI_WINDOW_NOTHING; } - if (!notesOpen) return; - if (ImGui::Begin("Song Comments",¬esOpen,globalWinFlags,_("Song Comments"))) { + if (!notesOpen && !asChild) return; + bool began=asChild?ImGui::BeginChild("Song Info##Song Information"):ImGui::Begin("Song Comments",¬esOpen,globalWinFlags,_("Song Comments")); + if (began) { if (ImGui::InputTextMultiline("##SongNotes",&e->song.notes,ImGui::GetContentRegionAvail(),ImGuiInputTextFlags_UndoRedo)) { MARK_MODIFIED; } } - if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_NOTES; - ImGui::End(); + if (!asChild && ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_NOTES; + if (asChild) { + ImGui::EndChild(); + } else { + ImGui::End(); + } }