VGM export: include song comments

also show song comments on mobile
This commit is contained in:
tildearrow 2024-08-23 17:46:09 -05:00
parent d0f3e0fa58
commit 99ae6a2b38
4 changed files with 18 additions and 8 deletions

View file

@ -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",&notesOpen,globalWinFlags,_("Song Comments"))) {
if (!notesOpen && !asChild) return;
bool began=asChild?ImGui::BeginChild("Song Info##Song Information"):ImGui::Begin("Song Comments",&notesOpen,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();
}
}