(sub)song notes: wrap text
This commit is contained in:
parent
ca6f4e2b86
commit
81719a79ea
|
@ -2000,6 +2000,7 @@ class FurnaceGUI {
|
|||
float vibrationStrength;
|
||||
int vibrationLength;
|
||||
int s3mOPL3;
|
||||
int songNotesWrap;
|
||||
String mainFontPath;
|
||||
String headFontPath;
|
||||
String patFontPath;
|
||||
|
@ -2260,6 +2261,7 @@ class FurnaceGUI {
|
|||
vibrationStrength(0.5f),
|
||||
vibrationLength(20),
|
||||
s3mOPL3(1),
|
||||
songNotesWrap(0),
|
||||
mainFontPath(""),
|
||||
headFontPath(""),
|
||||
patFontPath(""),
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include "misc/freetype/imgui_freetype.h"
|
||||
#include "scaling.h"
|
||||
#include <fmt/printf.h>
|
||||
#include <imgui.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
|
@ -3840,6 +3841,14 @@ void FurnaceGUI::drawSettings() {
|
|||
settingsChanged=true;
|
||||
} rightClickable
|
||||
|
||||
// SUBSECTION SONG COMMENTS
|
||||
CONFIG_SUBSECTION(_("Song Comments"));
|
||||
bool songNotesWrapB=settings.songNotesWrap;
|
||||
if (ImGui::Checkbox(_("Wrap text"), &songNotesWrapB)) {
|
||||
settings.songNotesWrap=songNotesWrapB;
|
||||
settingsChanged=true;
|
||||
}
|
||||
|
||||
// SUBSECTION WINDOWS
|
||||
CONFIG_SUBSECTION(_("Windows"));
|
||||
bool roundedWindowsB=settings.roundedWindows;
|
||||
|
@ -5004,6 +5013,8 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
|
|||
settings.oscAntiAlias=conf.getInt("oscAntiAlias",1);
|
||||
settings.oscLineSize=conf.getFloat("oscLineSize",1.0f);
|
||||
|
||||
settings.songNotesWrap=conf.getInt("songNotesWrap", 0);
|
||||
|
||||
settings.channelColors=conf.getInt("channelColors",1);
|
||||
settings.channelTextColors=conf.getInt("channelTextColors",0);
|
||||
settings.channelStyle=conf.getInt("channelStyle",1);
|
||||
|
@ -5363,6 +5374,7 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
|
|||
clampSetting(settings.playbackTime,0,1);
|
||||
clampSetting(settings.shaderOsc,0,1);
|
||||
clampSetting(settings.oscLineSize,0.25f,16.0f);
|
||||
clampSetting(settings.songNotesWrap, 0, 1);
|
||||
clampSetting(settings.cursorWheelStep,0,1);
|
||||
clampSetting(settings.vsync,0,4);
|
||||
clampSetting(settings.frameRateLimit,0,1000);
|
||||
|
@ -5598,6 +5610,8 @@ void FurnaceGUI::writeConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
|
|||
conf.set("oscAntiAlias",settings.oscAntiAlias);
|
||||
conf.set("oscLineSize",settings.oscLineSize);
|
||||
|
||||
conf.set("songNotesWrap",settings.songNotesWrap);
|
||||
|
||||
conf.set("channelColors",settings.channelColors);
|
||||
conf.set("channelTextColors",settings.channelTextColors);
|
||||
conf.set("channelStyle",settings.channelStyle);
|
||||
|
|
|
@ -31,7 +31,7 @@ void FurnaceGUI::drawNotes(bool asChild) {
|
|||
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)) {
|
||||
if (ImGui::InputTextMultiline("##SongNotes",&e->song.notes,ImGui::GetContentRegionAvail(),ImGuiInputTextFlags_UndoRedo|(settings.songNotesWrap?ImGuiInputTextFlags_WordWrapping:0))) {
|
||||
MARK_MODIFIED;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -133,7 +133,7 @@ void FurnaceGUI::drawSubSongs(bool asChild) {
|
|||
}
|
||||
|
||||
if (ImGui::GetContentRegionAvail().y>(10.0f*dpiScale)) {
|
||||
if (ImGui::InputTextMultiline("##SubSongNotes",&e->curSubSong->notes,ImGui::GetContentRegionAvail(),ImGuiInputTextFlags_UndoRedo)) {
|
||||
if (ImGui::InputTextMultiline("##SubSongNotes",&e->curSubSong->notes,ImGui::GetContentRegionAvail(),ImGuiInputTextFlags_UndoRedo|(settings.songNotesWrap?ImGuiInputTextFlags_WordWrapping:0))) {
|
||||
MARK_MODIFIED;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue