Skip to content

Conversation

@SnipUndercover
Copy link
Member

I think having an IntSlider, but for floats, for options like percentages or multipliers (something with like 2 digits of precision) would be useful.
It behaves almost identical to IntSlider, but also allows the user to input a number directly by going to OuiNumberInput.

At the moment only the class exists and can be used via something like this:

public float MySetting { get; set; }

public void CreateMySettingEntry(TextMenu menu, bool inGame) {
  menu.Add(
    new TextMenuExt.FloatSlider(Dialog.Clean("..."), 0, 100, MySetting, 1)
      .Change(value => MySetting = value)
  );
}

I'm planning on adding support for automatically creating FloatSliders if a property type is float, as well as customizing its parameters.

@maddie480 maddie480 added review needed This PR needs 2 approvals to be merged (bot-managed) and removed dormant labels May 17, 2025
@maddie480-bot maddie480-bot added draft This PR is not ready for review yet (bot-managed) and removed review needed This PR needs 2 approvals to be merged (bot-managed) labels Jun 7, 2025
@SnipUndercover
Copy link
Member Author

Closing this PR due to a lack of activity. Furthermore, I don't think there's a lot of need for a FloatSlider.

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

Labels

draft This PR is not ready for review yet (bot-managed)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants