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