Skip to content

Add support for Vector2/3/4, Quaternion, Rect; expand support for RGB-only Color#89

Open
kaycodes13 wants to merge 12 commits into
silksong-modding:mainfrom
kaycodes13:feature/vector-input
Open

Add support for Vector2/3/4, Quaternion, Rect; expand support for RGB-only Color#89
kaycodes13 wants to merge 12 commits into
silksong-modding:mainfrom
kaycodes13:feature/vector-input

Conversation

@kaycodes13
Copy link
Copy Markdown
Contributor

@kaycodes13 kaycodes13 commented May 5, 2026

Summary of Changes

Closes #78 by:

  • Adding a set of TextModels utilities to create models for Vector2, Vector3, Vector4, Quaternion, and Rect types.
  • Adding custom input validation for those types to TextInput.
  • Adding a set of methods for generating elements for those types in ConfigEntryFactory and MenuProperty.

Other updates folded into this:

  • Added an RGBElementFactory for source generation of color inputs that mirrors the effect that RGBColorValues has for config entry element generation.
  • Added an underline to text fields, because I think it's a little confusing to encounter an empty text field without any visual indication that there's a spot to type something.

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

Comment thread Silksong.ModMenu/Models/TextModels.cs Outdated
Comment thread Silksong.ModMenu/Elements/TextInput.cs
Comment thread Silksong.ModMenu/Plugin/ConfigEntryFactory.cs
Comment thread Silksong.ModMenu/Plugin/ConfigEntryFactory.cs
@kaycodes13 kaycodes13 changed the title Add TextModels and automatic element generation for Vector2/3/4 and Quaternion Add support for Vector2/3/4, Quaternion, and Rect inputs; add Color to source generation May 6, 2026
Comment thread Silksong.ModMenu/Generator/Attributes.cs Outdated
Copy link
Copy Markdown
Collaborator

@dplochcoder dplochcoder left a comment

Choose a reason for hiding this comment

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

Mostly LG, just a couple comments left + Flib's comment about the RGB attribute

Comment thread Silksong.ModMenu/Elements/TextInput.cs
Comment thread Silksong.ModMenuAnalyzers/MenuProperty.cs Outdated
Comment thread Silksong.ModMenu/Plugin/ConfigEntryFactory.cs
@kaycodes13 kaycodes13 changed the title Add support for Vector2/3/4, Quaternion, and Rect inputs; add Color to source generation Add support for Vector2/3/4, Quaternion, Rect; expand support for RGB-only Color May 8, 2026
textInputChild.FindChild("CursorRight")!.GetComponent<Animator>(),
];

GameObject underlineObj = new("Underline") { layer = (int)PhysLayers.UI };
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.

How wedded are you to this underline? I think it looked better without the underline, personally

(To be clear, I don't mean we should keep - or remove - it based solely on my opinion, but I'd like it to be scrutinized further)

as a library to NuGet, this version will also be used as the package version.
-->
<Version>0.7.4</Version>
<Version>0.7.5</Version>
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.

I think this is a case where bumping the version should be done outside the PRs - the other PR has breaking changes so the version should be 0.8 rather than 0.7.5, but it's weird to bump the version here based on the changes in the other PR. I don't think we should create a release with the other PR without this one being included - can you remove the version update from this PR and (if you want to) add it to the other PR?

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.

Add menu elements for Vector2/3/4 and Quaternion types

3 participants