Skip to content

Add performance preset buttons and localization strings for options#3614

Open
chi20253032 wants to merge 1 commit intoCaffeineMC:devfrom
chi20253032:dev
Open

Add performance preset buttons and localization strings for options#3614
chi20253032 wants to merge 1 commit intoCaffeineMC:devfrom
chi20253032:dev

Conversation

@chi20253032
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown
Contributor

@douira douira left a comment

Choose a reason for hiding this comment

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

As per our tracking issue #3385, we should investigate more generally how we want presets to work within our UI and whether/how mods may interact with them. I think we need more discussion in general on this problem both from a UI/UX design perspective as well as an API perspective.

this.searchWidget = new SearchWidget(this::onSearchResults, new Dim2i(x, y, w, topBarHeight));

int topBarClear = topBarHeight + ifInsetY(Layout.INNER_MARGIN);
int presetButtonW = Layout.BUTTON_LONG;
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'm not convinced adding more buttons to the button stack is a good idea, in particular not for presets since there can be potentially arbitrarily many presets if we allow such customization in the API.

}
}

private void applyPresetValues(boolean maxPerformance) {
Copy link
Copy Markdown
Contributor

@douira douira Apr 29, 2026

Choose a reason for hiding this comment

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

I'm not in favor of this way of doing the preset values since it requires us to manually extract preset values from vanilla, and requires a code change any time new presets are added or they change any of the values. If we were to hardcode preset values, we'd do so on the options themselves and not in one giant method like this. This ties into the fact that we want to eventually work on a system that automatically extracts the default values for options from vanilla instead of hardcoding them into our option builder.

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