Skip to content

Add panorama version of autosave indicator#185

Draft
vrad-exe wants to merge 3 commits into
StrataSource:mainfrom
vrad-exe:feat/save-indicator
Draft

Add panorama version of autosave indicator#185
vrad-exe wants to merge 3 commits into
StrataSource:mainfrom
vrad-exe:feat/save-indicator

Conversation

@vrad-exe

@vrad-exe vrad-exe commented Apr 25, 2026

Copy link
Copy Markdown
Contributor

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:

image

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 an AnimatedImageStrip, which seem to have a bug where they permanently stop animating when the game is paused (#183) Worked around
  • It can't accurately represent how long the save actually takes because Panorama only fires an event when the save starts (#184). I've currently made it show "saving" for 1 second and "saved" after that as it fades out which is similar to what Portal 2 does, but that's only because of weird console requirements, ideally P2CE's version should accurately show the time it takes to save (even if that ends up being near-instant in most cases).

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.

@iamsirenstorm iamsirenstorm self-requested a review April 25, 2026 07:34
@iamsirenstorm iamsirenstorm force-pushed the feat/pano-cc branch 12 times, most recently from 68ee65e to b96e7b4 Compare May 3, 2026 00:49
@iamsirenstorm iamsirenstorm force-pushed the feat/pano-cc branch 4 times, most recently from 811d923 to eb7d01c Compare May 4, 2026 00:22
@vrad-exe vrad-exe force-pushed the feat/save-indicator branch from 893d715 to 202c500 Compare May 4, 2026 01:53
@vrad-exe vrad-exe changed the base branch from feat/pano-cc to main May 4, 2026 01:53
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>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants