Skip to content

Add a Color Input#74

Merged
flibber-hk merged 12 commits into
silksong-modding:mainfrom
kaycodes13:feature/colour-input
Apr 29, 2026
Merged

Add a Color Input#74
flibber-hk merged 12 commits into
silksong-modding:mainfrom
kaycodes13:feature/colour-input

Conversation

@kaycodes13
Copy link
Copy Markdown
Contributor

Summary of Changes

  • Added ColorInput, an extension of TextInput specialized for handling Color input. It parses hex color codes in three formats (3-character RGB, 6-character RGB, and 8-character RGBA), has custom input validation, and has a preview swatch of the chosen colour beside the input field.
  • Added a new generator method in ConfigEntryFactory so that ColorInputs can be automatically generated for ConfigEntry<Color>s.

Four color menu options in a column, consisting of swatches beside hex codes. The first is displaying hex code FF000066 as semi-transparent red, the second shows 00FF00 as green, the third shows 00F as blue, the fourth shows 0F00 as invalid input with a question mark in place of the swatch.

Checklist

  • No change is too small for a release, so pick one:
    • I have updated the package version following semantic versioning
    • There is another change actively WIP that will update the version (link issue or PR here)
    • This PR does not update user-facing code/config
    • I'm not sure how to set the version and would like the reviewer's help

Probably more useful than the GameObject since the point of having a field for it is to allow for changing the size/position of the swatch
@flibber-hk flibber-hk self-assigned this Apr 28, 2026
This to reduce the menu burden of the test plugin
See: 3 other open PRs zotesip
@flibber-hk
Copy link
Copy Markdown
Member

flibber-hk commented Apr 28, 2026

@kaycodes13 apologies for the large pile of commits... I have un-bumped the version because there are three other open PRs, if we clear the PRs and don't update the version please ping in #silksong-org-discussion.

If you do want to make further edits to this PR please pull first :zote:

@flibber-hk
Copy link
Copy Markdown
Member

@dplochcoder I have rearranged the mod menu test area so that the nested testing plugin and the newly added auto testing plugin have been added to the main testing plugin's menu (rather than getting their own menu) - I think 3+ menus are a bit too much clutter for my taste. If you (or anyone else) want to browse the diff of that change in isolation then it's covered by this

Comment thread Silksong.ModMenu/Elements/ColorInput.cs
Comment thread Silksong.ModMenu/Internal/CustomInputField.cs
Comment thread Silksong.ModMenu/Internal/MenuPrefabs.cs
Comment thread Silksong.ModMenu/Plugin/ConfigEntryFactory.cs Outdated
Comment thread Silksong.ModMenu/Elements/ColorInput.cs Outdated
Comment thread Silksong.ModMenu/Internal/GameObjectUtil.cs
flibber-hk
flibber-hk previously approved these changes Apr 29, 2026
Copy link
Copy Markdown
Member

@flibber-hk flibber-hk left a comment

Choose a reason for hiding this comment

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

zote

@flibber-hk flibber-hk merged commit e786a33 into silksong-modding:main Apr 29, 2026
4 checks passed
@flibber-hk
Copy link
Copy Markdown
Member

Hopefully the other PRs will be handled soon; I'd prefer to avoid multiple consecutive releases but if you want this on thunderstore asap feel free to poke and we can bump version

This was referenced May 6, 2026
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