Skip to content

Add skin cycling with shortcuts for next and previous skin#36387

Merged
bdach merged 9 commits intoppy:masterfrom
ArijanJ:cycle-skins
Jan 30, 2026
Merged

Add skin cycling with shortcuts for next and previous skin#36387
bdach merged 9 commits intoppy:masterfrom
ArijanJ:cycle-skins

Conversation

@ArijanJ
Copy link
Copy Markdown
Contributor

@ArijanJ ArijanJ commented Jan 19, 2026

Recording 2026-01-19 at 12 55 15

This adds shortcuts for 'next skin' and 'previous skin', letting players switch skins more consistently than the 'random skin' option.

To implement this I had to I move the skin dropdown list generation (default skins + 'random skin' + user unprotected skins) into a separate function GetDropdownItems() to avoid duplication. The behavior stays the same from my testing with importing/deleting skins.

I added CycleSkins(int step), then two wrappers for it (SelectNextSkin and SelectPreviousSkin), which are called by the global shortcuts.

There was also a private SkinInfo object called random_skin_info that I removed in favor of comparisons with the public SkinInfo.RANDOM_SKIN ID (there was only one comparison to the object).

However, whenever the skin is changed for any reason, this tooltip shows up showing the random skin shortcut. I'll leave it, since cramming the two new tooltips into it would be ugly.
image

@ArijanJ
Copy link
Copy Markdown
Contributor Author

ArijanJ commented Jan 20, 2026

Ok, this should address everything, only thing left is to find better shortcuts.

@peppy
Copy link
Copy Markdown
Member

peppy commented Jan 26, 2026

my best proposal if we do want default binds are probably E/T, as in left and right on keyboard from the "random skin" binding.

@ArijanJ
Copy link
Copy Markdown
Contributor Author

ArijanJ commented Jan 27, 2026

Yep, neat idea. Ready to go unless you have any other notes.

@peppy peppy self-requested a review January 28, 2026 17:17
@peppy
Copy link
Copy Markdown
Member

peppy commented Jan 29, 2026

@bdach would appreciate a five minute check on this since i refactored a good portion.

Copy link
Copy Markdown
Collaborator

@bdach bdach left a comment

Choose a reason for hiding this comment

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

i dunno about the feature but the code seems solid enough i guess

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants