Skip to content

Commit

Permalink
Merge pull request #1523 from Eknous-P/defartist
Browse files Browse the repository at this point in the history
default author name
  • Loading branch information
tildearrow authored Oct 14, 2023
2 parents dd7f4c1 + b16a562 commit 8f4133d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/engine/engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,7 @@ void DivEngine::initSongWithDesc(const char* description, bool inBase64, bool ol

// extra attributes
song.subsong[0]->hz=c.getDouble("tickRate",60.0);
song.author=getConfString("defaultAuthorName","");
}

void DivEngine::createNew(const char* description, String sysName, bool inBase64) {
Expand Down
4 changes: 3 additions & 1 deletion src/gui/gui.h
Original file line number Diff line number Diff line change
Expand Up @@ -1618,6 +1618,7 @@ class FurnaceGUI {
String emptyLabel;
String emptyLabel2;
String sdlAudioDriver;
String defaultAuthorName;
DivConfig initialSys;

Settings():
Expand Down Expand Up @@ -1800,7 +1801,8 @@ class FurnaceGUI {
macroRelLabel("REL"),
emptyLabel("..."),
emptyLabel2(".."),
sdlAudioDriver("") {}
sdlAudioDriver(""),
defaultAuthorName("") {}
} settings;

struct Tutorial {
Expand Down
3 changes: 3 additions & 0 deletions src/gui/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
if (ImGui::InputText("Default author name", &settings.defaultAuthorName)) settingsChanged=true;
popWarningColor();

// SUBSECTION FILE
Expand Down Expand Up @@ -3648,6 +3649,7 @@ void FurnaceGUI::syncSettings() {
settings.showPool=e->getConfInt("showPool",0);
settings.writeInsNames=e->getConfInt("writeInsNames",1);
settings.readInsNames=e->getConfInt("readInsNames",1);
settings.defaultAuthorName=e->getConfString("defaultAuthorName","");

clampSetting(settings.mainFontSize,2,96);
clampSetting(settings.headFontSize,2,96);
Expand Down Expand Up @@ -4066,6 +4068,7 @@ void FurnaceGUI::commitSettings() {
e->setConf("showPool",settings.showPool);
e->setConf("writeInsNames",settings.writeInsNames);
e->setConf("readInsNames",settings.readInsNames);
e->setConf("defaultAuthorName",settings.defaultAuthorName);

// colors
for (int i=0; i<GUI_COLOR_MAX; i++) {
Expand Down

0 comments on commit 8f4133d

Please sign in to comment.