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,59 @@
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:
LabelForInput@AUTO_SAVE_INTERVAL_DROP_DOWN_LABEL:
Width: PARENT_WIDTH
Height: 20
Font: Regular
Text: auto-save-interval-label
For: AUTO_SAVE_INTERVAL_DROP_DOWN
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:
LabelForInput@AUTO_SAVE_FILE_NUMBER_DROP_DOWN_LABEL:
Width: PARENT_WIDTH
Height: 20
Font: Regular
Text: auto-save-max-file-number-label
For: AUTO_SAVE_FILE_NUMBER_DROP_DOWN
DropDownButton@AUTO_SAVE_FILE_NUMBER_DROP_DOWN:
Y: 25
Width: PARENT_WIDTH
Height: 25
Font: Regular

View File

@@ -7,6 +7,7 @@ Container@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: 640

View File

@@ -651,6 +651,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-max-file-number-label = Auto-save limit:
## settings-display.yaml
label-target-lines-dropdown-container = Target Lines:
label-status-bar-dropdown-container-bars = Status Bars:

View File

@@ -46,6 +46,7 @@ Rules:
-SpawnStartingUnits:
-MapStartingLocations:
-CrateSpawner:
-AutoSave:
MusicPlaylist:
BackgroundMusic: map1
AllowMuteBackgroundMusic: true

View File

@@ -133,6 +133,7 @@ ChromeLayout:
cnc|chrome/music.yaml
cnc|chrome/settings.yaml
cnc|chrome/settings-display.yaml
cnc|chrome/settings-gameplay.yaml
cnc|chrome/settings-audio.yaml
cnc|chrome/settings-input.yaml
cnc|chrome/settings-hotkeys.yaml

View File

@@ -154,6 +154,7 @@ World:
DevCommands:
DebugVisualizationCommands:
PathFinderOverlay:
AutoSave:
HierarchicalPathFinderOverlay:
PlayerCommands:
HelpCommand: