default author name

This commit is contained in:
Eknous-P 2023-10-11 18:16:46 +04:00
parent 219665ed60
commit b16a562aeb
3 changed files with 7 additions and 1 deletions

View file

@ -545,6 +545,7 @@ void DivEngine::initSongWithDesc(const char* description, bool inBase64, bool ol
// extra attributes // extra attributes
song.subsong[0]->hz=c.getDouble("tickRate",60.0); song.subsong[0]->hz=c.getDouble("tickRate",60.0);
song.author=getConfString("defaultAuthorName","");
} }
void DivEngine::createNew(const char* description, String sysName, bool inBase64) { void DivEngine::createNew(const char* description, String sysName, bool inBase64) {

View file

@ -1618,6 +1618,7 @@ class FurnaceGUI {
String emptyLabel; String emptyLabel;
String emptyLabel2; String emptyLabel2;
String sdlAudioDriver; String sdlAudioDriver;
String defaultAuthorName;
DivConfig initialSys; DivConfig initialSys;
Settings(): Settings():
@ -1800,7 +1801,8 @@ class FurnaceGUI {
macroRelLabel("REL"), macroRelLabel("REL"),
emptyLabel("..."), emptyLabel("..."),
emptyLabel2(".."), emptyLabel2(".."),
sdlAudioDriver("") {} sdlAudioDriver(""),
defaultAuthorName("") {}
} settings; } settings;
struct Tutorial { struct Tutorial {

View file

@ -438,6 +438,7 @@ void FurnaceGUI::drawSettings() {
ImGui::SetTooltip("it is a bad idea to set this number higher than your CPU core count (%d)!",cpuCores); ImGui::SetTooltip("it is a bad idea to set this number higher than your CPU core count (%d)!",cpuCores);
} }
} }
if (ImGui::InputText("Default author name", &settings.defaultAuthorName)) settingsChanged=true;
popWarningColor(); popWarningColor();
// SUBSECTION FILE // SUBSECTION FILE
@ -3648,6 +3649,7 @@ void FurnaceGUI::syncSettings() {
settings.showPool=e->getConfInt("showPool",0); settings.showPool=e->getConfInt("showPool",0);
settings.writeInsNames=e->getConfInt("writeInsNames",1); settings.writeInsNames=e->getConfInt("writeInsNames",1);
settings.readInsNames=e->getConfInt("readInsNames",1); settings.readInsNames=e->getConfInt("readInsNames",1);
settings.defaultAuthorName=e->getConfString("defaultAuthorName","");
clampSetting(settings.mainFontSize,2,96); clampSetting(settings.mainFontSize,2,96);
clampSetting(settings.headFontSize,2,96); clampSetting(settings.headFontSize,2,96);
@ -4066,6 +4068,7 @@ void FurnaceGUI::commitSettings() {
e->setConf("showPool",settings.showPool); e->setConf("showPool",settings.showPool);
e->setConf("writeInsNames",settings.writeInsNames); e->setConf("writeInsNames",settings.writeInsNames);
e->setConf("readInsNames",settings.readInsNames); e->setConf("readInsNames",settings.readInsNames);
e->setConf("defaultAuthorName",settings.defaultAuthorName);
// colors // colors
for (int i=0; i<GUI_COLOR_MAX; i++) { for (int i=0; i<GUI_COLOR_MAX; i++) {