Add panorama version of autosave indicator#185
Draft
vrad-exe wants to merge 3 commits into
Draft
Conversation
68ee65e to
b96e7b4
Compare
811d923 to
eb7d01c
Compare
893d715 to
202c500
Compare
Comment on lines
+11
to
+21
| <Panel class="save-indicator"> | ||
| <AnimatedImageStrip | ||
| id="Spinner" | ||
| animating="true" | ||
| defaultframe="0" | ||
| frametime="100ms" | ||
| src="file://{images}/hud/spinner_saving_strip.tga" | ||
| scaling="stretch-to-cover-preserve-aspect" | ||
| /> | ||
| <Label class="save-indicator__label" id="StatusLabel" text="#PORTAL2_Hud_GameSaved" /> | ||
| </Panel> |
Member
There was a problem hiding this comment.
Something to note, we have an internally registered Save Indicator panel already from Revolution. I actually didn't know this and found it on accident when pulling up the other save files in the codebase. It's called HudSaveIndicator.
So you can drop the custom panel registration, and then change where you reference SaveIndicator to HudSaveIndicator:
Suggested change
| <Panel class="save-indicator"> | |
| <AnimatedImageStrip | |
| id="Spinner" | |
| animating="true" | |
| defaultframe="0" | |
| frametime="100ms" | |
| src="file://{images}/hud/spinner_saving_strip.tga" | |
| scaling="stretch-to-cover-preserve-aspect" | |
| /> | |
| <Label class="save-indicator__label" id="StatusLabel" text="#PORTAL2_Hud_GameSaved" /> | |
| </Panel> | |
| <HudSaveIndicator class="save-indicator"> | |
| <AnimatedImageStrip | |
| id="Spinner" | |
| animating="true" | |
| defaultframe="0" | |
| frametime="100ms" | |
| src="file://{images}/hud/spinner_saving_strip.tga" | |
| scaling="stretch-to-cover-preserve-aspect" | |
| /> | |
| <Label class="save-indicator__label" id="StatusLabel" text="#PORTAL2_Hud_GameSaved" /> | |
| </HudSaveIndicator> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a Panorama version of the Portal 2 save indicator, intended to replace the VGUI one. I've tried to match the style of Portal 2's version as closely as possible, aside from using P2CE's font.
The Panorama save indicator is the bottom one in the image, top is VGUI for comparison:
It also adds an Autosave Indicator setting to the interface options menu, which controls whether or not the indicator is shown for autosaves.
However, there are a few changes that need to be made on the C++ side of things before this is merged:
The spinner is anWorked aroundAnimatedImageStrip, which seem to have a bug where they permanently stop animating when the game is paused (#183)Also, currently the indicator shows different text for autosaves compared to manual/quick saves, but I'm not sure if I want to keep this or not - it looks kind of weird and I don't think any other source games with autosave indicators do this. I've also thought about deviating from Portal 2 by making the spinner get replaced with a "save complete" icon after the save operation finishes, but someone else would need to make that icon, I'm not much of an artist.