Skip to content

Add a dedicated long editor - #6691

Merged
Big-Iron-Cheems merged 1 commit into
MeteorDevelopment:masterfrom
mornhussakuyo-hub:refactor/long-edit
Oct 7, 2026
Merged

Big-Iron-Cheems merged 1 commit into
MeteorDevelopment:masterfrom
mornhussakuyo-hub:refactor/long-edit

Conversation

@mornhussakuyo-hub

Copy link
Copy Markdown
Contributor

Type of change

  • Bug fix
  • New feature
  • Refactor

Description

LongSetting currently uses a raw text box, with its input handling embedded in DefaultSettingsWidgetFactory.

This adds a dedicated WLongEdit, exposes it through GuiTheme.longEdit(...), and uses it for long settings. The editor handles parsing, range validation and invalid-input rollback while preserving full 64-bit precision.

Related issues

Follow-up to #6651.

How Has This Been Tested?

  • Ran ./gradlew build with Java 25.
  • Ran 73 checks against the compiled editor, text box, settings factory and LongSetting, covering signed-long limits, values above 2^53, min/max validation, overflow, invalid-input rollback, Enter/focus-loss callbacks and reset.
  • Tested the packaged mod in Minecraft 26.2 with a temporary test addon. Bounds, precision, input handling, reset and persistence after restarting the client worked correctly.

Checklist:

  • My code follows the style guidelines of this project.
  • The change has no complex areas that need explanatory comments.
  • I have tested the code in both development and production environments.

@Frko5000 Frko5000 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i might be missing something

@Big-Iron-Cheems
Big-Iron-Cheems merged commit d2097f9 into MeteorDevelopment:master Oct 7, 2026
1 check passed
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.

4 participants