Implement auto-save

This commit is contained in:
Dan Stoian
2025-01-16 18:29:19 +02:00
committed by Gustas
parent 94f2ce4f56
commit e903baf680
22 changed files with 392 additions and 1 deletions

View File

@@ -0,0 +1,57 @@
Container@GAMEPLAY_PANEL:
Logic: GameplaySettingsLogic
Width: PARENT_WIDTH
Height: PARENT_HEIGHT
Children:
ScrollPanel@SETTINGS_SCROLLPANEL:
Width: PARENT_WIDTH
Height: PARENT_HEIGHT
CollapseHiddenChildren: True
TopBottomSpacing: 5
ItemSpacing: 10
Children:
Background@INPUT_SECTION_HEADER:
X: 5
Width: PARENT_WIDTH - 24 - 10
Height: 13
Background: separator
ClickThrough: True
Children:
Label@LABEL:
Width: PARENT_WIDTH
Height: PARENT_HEIGHT
Font: TinyBold
Align: Center
Text: label-game-play-section-header
Container@ROW:
Width: PARENT_WIDTH - 24
Height: 50
Children:
Container@AUTO_SAVE_INTERVAL_CONTAINER:
X: 10
Width: PARENT_WIDTH / 2 - 20
Children:
Label@AUTO_SAVE_INTERVAL_DROP_DOWN_LABEL:
Width: PARENT_WIDTH
Height: 20
Font: Regular
Text: auto-save-interval-label
DropDownButton@AUTO_SAVE_INTERVAL_DROP_DOWN:
Y: 25
Width: PARENT_WIDTH
Height: 25
Font: Regular
Container@AUTO_SAVE_NO_CONTAINER:
X: PARENT_WIDTH / 2 + 10
Width: PARENT_WIDTH / 2 - 20
Children:
Label@AUTO_SAVE_FILE_NUMBER_DROP_DOWN_LABEL:
Width: PARENT_WIDTH
Height: 20
Font: Regular
Text: auto-save-nr-label
DropDownButton@AUTO_SAVE_FILE_NUMBER_DROP_DOWN:
Y: 25
Width: PARENT_WIDTH
Height: 25
Font: Regular

View File

@@ -7,6 +7,7 @@ Background@SETTINGS_PANEL:
INPUT_PANEL: Input
HOTKEYS_PANEL: Hotkeys
ADVANCED_PANEL: Advanced
GAMEPLAY_PANEL: Gameplay
X: (WINDOW_WIDTH - WIDTH) / 2
Y: (WINDOW_HEIGHT - HEIGHT) / 2
Width: 900

View File

@@ -473,6 +473,11 @@ label-audio-device-container = Audio Device:
label-video-volume-container = Video Volume:
label-restart-required-container-audio-desc = Device changes will be applied after the game is restarted
## settings-gameplay.yaml
label-game-play-section-header = Auto-save
auto-save-interval-label = Auto-save frequency:
auto-save-nr-label = Auto-save limit:
## settings-display.yaml
label-target-lines-dropdown-container = Target Lines:
label-status-bar-dropdown-container-bars = Status Bars:

View File

@@ -408,6 +408,22 @@ label-original-notice = The default is "{ $key }"
label-duplicate-notice = This is already used for "{ $key }" in the { $context } context
hotkey-context-any = Any
## GameplaySettingsLogic
auto-save-interval =
.disabled = Disabled
.options =
{ $seconds ->
[one] 1 second
*[other] { $seconds } seconds
}
.minute-options =
{ $minutes ->
[one] 1 minute
*[other] { $minutes } minutes
}
auto-save-max-file-number = { $saves } saves
## InputSettingsLogic
options-mouse-scroll-type =
.disabled = Disabled