Skip to content

Commit e74d964

Browse files
Show error message for BackgroundMusicSourceInput when expand unselected choice inputs is false, fix exporting volume, add basic guide for template import/export.
1 parent de21761 commit e74d964

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

src/renderer/auto-tt-rec-config-exporter.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,17 @@ export class AutoTTRecConfigExporter {
253253
}
254254

255255
private exportVolumeInputs() {
256-
this.exportArg("game-volume", this.getFormDataNumberValue("game-volume-numberinput"));
257-
this.exportArg("music-volume", this.getFormDataNumberValue("music-volume-numberinput"));
256+
let gameVolumeNumberinput = this.getFormDataNumberValue("game-volume-numberinput");
257+
if (gameVolumeNumberinput !== "<FILLME>") {
258+
gameVolumeNumberinput /= 100;
259+
}
260+
let musicVolumeNumberinput = this.getFormDataNumberValue("music-volume-numberinput");
261+
if (musicVolumeNumberinput !== "<FILLME>") {
262+
musicVolumeNumberinput /= 100;
263+
}
264+
265+
this.exportArg("game-volume", gameVolumeNumberinput);
266+
this.exportArg("music-volume", musicVolumeNumberinput);
258267
}
259268

260269
private exportMusicFilename() {

src/renderer/components/GUIHeader.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,18 @@ export function GUIHeader() {
1616
<li>Join the <a href=" https://discord.gg/6FqfpnqP57">Discord</a> for any questions:</li>
1717
<li>Source Code (for GUI): <a href="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/luckytyphlosion/auto-tt-recorder-gui">https://github.com/luckytyphlosion/auto-tt-recorder-gui</a></li>
1818
</ul>
19+
<h3 className="troubleshooting-header">Template explanation:</h3>
20+
<ul className="auto-tt-rec-troubleshooting">
21+
<li>To save time when recording ghosts with similar settings, create a template.</li>
22+
<li>Leave all fields blank which you want to fill in every time you record.</li>
23+
{/*<ul>
24+
<li>For example, you may want to create a template for Personal Bests, where the <em>Ghost Description</em> field is pre-filled with "Personal Best", and all other fields are set except the <em>Chadsoft ghost page link</em> and <em>Music filename</em> fields.</li>
25+
</ul>*/}
26+
<li>Radio (circle) buttons, checkboxes, file select inputs, and dropdowns can be made blank by right-clicking them.</li>
27+
<li>Export the template using the "Export Template..." button.</li>
28+
<li>You can now import that template using the "Import Template..." button.</li>
29+
<li>Alternatively, set the options to be pre-filled with the last opened template via the "Last opened template" radio button below.</li>
30+
</ul>
1931
</div>
2032
);
2133
}

src/renderer/components/form_components/BackgroundMusicSourceInput.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { FormComplexity } from "../layout_components/FormComplexityLayout";
88
import { Timeline } from "../layout_components/choice_layouts/NoTop10CategoryLayout";
99
import { DeselectableDropdown } from "../DeselectableDropdown";
1010
import { makeReadonlyArraySet, ValidValues } from "../../../shared/array-set";
11+
import { SimpleErrorMessage } from "../SimpleErrorMessage";
1112

1213
import useRenderCounter from "../../RenderCounter";
1314

@@ -35,7 +36,7 @@ export function BackgroundMusicSourceInput(props: {timeline: Timeline, formCompl
3536
</DeselectableDropdown>
3637
{
3738
musicFilenameInputEnable ?
38-
<MusicFilenameInput/> : ""
39+
<MusicFilenameInput/> : <SimpleErrorMessage name="background-music-source"/>
3940
}
4041
{
4142
enableMusicPresentationInput && props.formComplexity > FormComplexity.SIMPLE ?

0 commit comments

Comments
 (0)