Add performance preset buttons and localization strings for options#3614
Add performance preset buttons and localization strings for options#3614chi20253032 wants to merge 1 commit intoCaffeineMC:devfrom
Conversation
douira
left a comment
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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.
No description provided.