Skip to content

Allow filename input directly from LoadSave window #23405

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Dec 29, 2024

Conversation

AaronVanGeffen
Copy link
Member

@AaronVanGeffen AaronVanGeffen commented Dec 14, 2024

This PR adds a filename input box to the bottom of the LoadSave window, allowing players to input the filename directly. Players can also use the enter/return key to confirm the new filename.

To make room for this input box, I have removed the 'Use system file browser' button. I figure it's obsolete, since we made it configurable years ago. (The button preceded the setting, and was just never removed.)

This basically makes the 'New file' button unnecessary/obsolete, but I have different ideas for the toolbar. I first want to see if/how this idea lands, so I will leave it for now.

To do:

  • Get consensus on whether or not we want this.
  • Add keyboard support (enter/esc) for confirmation boxes.
  • Re-introduce 'Use system file browser' button per request.
Screenshot 2024-12-14 at 17 33 04

@AaronVanGeffen AaronVanGeffen added changelog This issue/PR deserves a changelog entry. squash merge A PR that should be squashed on merge. discussion Some input from team members is wanted. labels Dec 14, 2024
@733737
Copy link
Contributor

733737 commented Dec 20, 2024

I definitely like the idea. Maybe you could put a new folder icon to the left of "Filename:" which would replace the new folder button at the top. Similarly, the default and up buttons could be moved into the file list at the top instead of being above it.

@AaronVanGeffen
Copy link
Member Author

Yes, I was thinking of replacing those buttons with icons, too. I prefer to leave the buttons/toolbar as-is in this PR, however.

@@ -209,6 +209,7 @@ void InputManager::Process(const InputEvent& e)

if (e.DeviceKind == InputDeviceKind::Keyboard)
{
// TODO: replace with event
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In OpenLoco, we've added an OnKeyDown event. I looked into adding one in OpenRCT2, however, I think we really need to sort out our window code before doing so...

@mrmbernardi
Copy link
Contributor

I think the button should read Save instead of OK. Just to make it even more obvious what it's going to do.

@AaronVanGeffen
Copy link
Member Author

I've changed the button caption to read 'Save' as suggested:
Screenshot 2024-12-29 at 16 03 18

As with the filename label, I've made it so that the button width is inferred. This means the button is wider in Dutch, for example:
Screenshot 2024-12-29 at 16 04 36

Copy link
Member

@tupaschoal tupaschoal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it briefly and it looks great

@AaronVanGeffen AaronVanGeffen enabled auto-merge (squash) December 29, 2024 19:29
@AaronVanGeffen AaronVanGeffen merged commit 5e61768 into OpenRCT2:develop Dec 29, 2024
23 checks passed
@AaronVanGeffen AaronVanGeffen deleted the loadsave-window-2 branch December 29, 2024 19:45
@AaronVanGeffen AaronVanGeffen added this to the v0.4.18 milestone Dec 29, 2024
janisozaur added a commit that referenced this pull request Jan 5, 2025
- Improved: [#23200] Add banked sloped turns and many other pieces to the Stand-Up and Classic Stand-Up Roller Coaster.
- Improved: [#23260] Add diagonal (block) brakes to LSM Launched Roller Coaster.
- Improved: [#23350] Increased the maximum width of the ride graph window.
- Improved: [#23404] Folders are now paired with an icon in the load/save window.
- Improved: [#23405] Filenames can now be input directly into the file browser (load/save) window.
- Improved: [#23431] Opaque water and Corkscrew Roller Coaster boosters now show up if RCT1 isn’t linked.
- Improved: [objects#369] Updated Russian translation.
- Change: [#23413] The max number of park entrance objects has been raised to 255.
- Fix: [#1122] Trains spawned on a cable lift hill will fall down and crash (original bug).
- Fix: [#19780] Guest screams loop on long drops.
- Fix: [#22742, #22793] In game console does not handle format tokens properly.
- Fix: [#23135] Map generator tree placement has noticable patterns.
- Fix: [#23286] Currency formatted incorrectly in the in game console.
- Fix: [#23348] Console set commands don't print output properly.
- Fix: [#23376] Peeps with balloons, hats and umbrellas may leave artifacts on screen.
- Fix: [#23486] Object selection minimum requirements can be bypassed with close window hotkey.
- Fix: [#23496] Newly spawned vehicles are invisible when spawned while the game is paused.
- Fix: [#23509] Map generator window reverts to flatland after selecting a heightmap image.
- Fix: [objects#359] Fix water colours in Hover Cars preview image.
- Fix: [objects#361] Fix water colours in River Styx boats preview image.
- Fix: [objects#362] Fix water colours in Neptune Ride preview image.
- Fix: [objects#363] Fix water colours in Harpies Trains preview image.
janisozaur added a commit that referenced this pull request Jan 8, 2025
- Improved: [#23200] Add banked sloped turns and many other pieces to the Stand-Up and Classic Stand-Up Roller Coaster.
- Improved: [#23260] Add diagonal (block) brakes to LSM Launched Roller Coaster.
- Improved: [#23350] Increased the maximum width of the ride graph window.
- Improved: [#23404] Folders are now paired with an icon in the load/save window.
- Improved: [#23405] Filenames can now be input directly into the file browser (load/save) window.
- Improved: [#23431] Opaque water and Corkscrew Roller Coaster boosters now show up if RCT1 isn’t linked.
- Improved: [objects#369] Updated Russian translation.
- Change: [#23413] The max number of park entrance objects has been raised to 255.
- Fix: [#1122] Trains spawned on a cable lift hill will fall down and crash (original bug).
- Fix: [#19780] Guest screams loop on long drops.
- Fix: [#22742, #22793] In game console does not handle format tokens properly.
- Fix: [#23135] Map generator tree placement has noticable patterns.
- Fix: [#23286] Currency formatted incorrectly in the in game console.
- Fix: [#23348] Console set commands don't print output properly.
- Fix: [#23376] Peeps with balloons, hats and umbrellas may leave artifacts on screen.
- Fix: [#23486] Object selection minimum requirements can be bypassed with close window hotkey.
- Fix: [#23496] Newly spawned vehicles are invisible when spawned while the game is paused.
- Fix: [#23509] Map generator window reverts to flatland after selecting a heightmap image.
- Fix: [objects#359] Fix water colours in Hover Cars preview image.
- Fix: [objects#361] Fix water colours in River Styx boats preview image.
- Fix: [objects#362] Fix water colours in Neptune Ride preview image.
- Fix: [objects#363] Fix water colours in Harpies Trains preview image.
CorySanin added a commit to CorySanin/OpenRCT2 that referenced this pull request Feb 3, 2025
Release v0.4.18

- Improved: [OpenRCT2#23200] Add banked sloped turns and many other pieces to the Stand-Up and Classic Stand-Up Roller Coaster.
- Improved: [OpenRCT2#23260] Add diagonal (block) brakes to LSM Launched Roller Coaster.
- Improved: [OpenRCT2#23350] Increased the maximum width of the ride graph window.
- Improved: [OpenRCT2#23404] Folders are now paired with an icon in the load/save window.
- Improved: [OpenRCT2#23405] Filenames can now be input directly into the file browser (load/save) window.
- Improved: [OpenRCT2#23431] Opaque water and Corkscrew Roller Coaster boosters now show up if RCT1 isn’t linked.
- Improved: [objects#369] Updated Russian translation.
- Change: [OpenRCT2#23413] The max number of park entrance objects has been raised to 255.
- Fix: [OpenRCT2#1122] Trains spawned on a cable lift hill will fall down and crash (original bug).
- Fix: [OpenRCT2#19780] Guest screams loop on long drops.
- Fix: [OpenRCT2#22742, OpenRCT2#22793] In game console does not handle format tokens properly.
- Fix: [OpenRCT2#23135] Map generator tree placement has noticable patterns.
- Fix: [OpenRCT2#23286] Currency formatted incorrectly in the in game console.
- Fix: [OpenRCT2#23348] Console set commands don't print output properly.
- Fix: [OpenRCT2#23376] Peeps with balloons, hats and umbrellas may leave artifacts on screen.
- Fix: [OpenRCT2#23496] Newly spawned vehicles are invisible when spawned while the game is paused.
- Fix: [OpenRCT2#23509] Map generator window reverts to flatland after selecting a heightmap image.
- Fix: [objects#359] Fix water colours in Hover Cars preview image.
- Fix: [objects#361] Fix water colours in River Styx boats preview image.
- Fix: [objects#362] Fix water colours in Neptune Ride preview image.
- Fix: [objects#363] Fix water colours in Harpies Trains preview image.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog This issue/PR deserves a changelog entry. discussion Some input from team members is wanted. squash merge A PR that should be squashed on merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants