Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ public static Screen genConfigScreen(Screen parent) {
DynamicFPSConfig config = DynamicFPSConfig.INSTANCE;
DynamicFPSConfig defaultConfig = DynamicFPSConfig.DEFAULTS;

general.addEntry(
SubCategoryBuilder misc = entryBuilder.startSubCategory(localized("config", "feature.misc"));

misc.add(
entryBuilder.startBooleanToggle(
localized("config", "enabled"),
config.enabled()
Expand All @@ -52,7 +54,7 @@ public static Screen genConfigScreen(Screen parent) {
.build()
);

general.addEntry(
misc.add(
entryBuilder.startBooleanToggle(
localized("config", "uncap_menu_frame_rate"),
config.uncapMenuFrameRate()
Expand All @@ -63,11 +65,10 @@ public static Screen genConfigScreen(Screen parent) {
.build()
);

general.addEntry(
entryBuilder.startTextDescription(CommonComponents.SPACE).build()
);
general.addEntry(misc.build());
SubCategoryBuilder idle = entryBuilder.startSubCategory(localized("config", "feature.idle"));

general.addEntry(
idle.add(
entryBuilder.startIntSlider(
localized("config", "idle_time"),
config.idle().timeout() / 60,
Expand All @@ -80,7 +81,7 @@ public static Screen genConfigScreen(Screen parent) {
.build()
);

general.addEntry(
idle.add(
entryBuilder.startEnumSelector(
localized("config", "idle_condition"),
IdleCondition.class,
Expand All @@ -93,13 +94,12 @@ public static Screen genConfigScreen(Screen parent) {
.build()
);

general.addEntry(
entryBuilder.startTextDescription(CommonComponents.SPACE).build()
);
general.addEntry(idle.build());
SubCategoryBuilder volumeTransition = entryBuilder.startSubCategory(localized("config", "feature.volume_transition"));

VariableStepTransformer volumeTransformer = getVolumeStepTransformer();

general.addEntry(
volumeTransition.add(
entryBuilder.startIntSlider(
localized("config", "volume_transition_speed_up"),
volumeTransformer.toStep((int) (config.volumeTransitionSpeed().getUp() * 100)),
Expand All @@ -112,7 +112,7 @@ public static Screen genConfigScreen(Screen parent) {
.build()
);

general.addEntry(
volumeTransition.add(
entryBuilder.startIntSlider(
localized("config", "volume_transition_speed_down"),
volumeTransformer.toStep((int) (config.volumeTransitionSpeed().getDown() * 100)),
Expand All @@ -125,13 +125,12 @@ public static Screen genConfigScreen(Screen parent) {
.build()
);

general.addEntry(
entryBuilder.startTextDescription(CommonComponents.SPACE).build()
);
general.addEntry(volumeTransition.build());
SubCategoryBuilder battery = entryBuilder.startSubCategory(localized("config", "feature.battery"));

BatteryTrackerConfig batteryTracker = config.batteryTracker();

general.addEntry(
battery.add(
entryBuilder.startBooleanToggle(
localized("config", "battery_tracker"),
batteryTracker.enabled()
Expand All @@ -142,7 +141,7 @@ public static Screen genConfigScreen(Screen parent) {
.build()
);

general.addEntry(
battery.add(
entryBuilder.startBooleanToggle(
localized("config", "battery_tracker_switch_states"),
batteryTracker.switchStates()
Expand All @@ -153,7 +152,7 @@ public static Screen genConfigScreen(Screen parent) {
.build()
);

general.addEntry(
battery.add(
entryBuilder.startBooleanToggle(
localized("config", "battery_tracker_notifications"),
batteryTracker.notifications()
Expand All @@ -164,7 +163,7 @@ public static Screen genConfigScreen(Screen parent) {
.build()
);

general.addEntry(
battery.add(
entryBuilder.startEnumSelector(
localized("config", "battery_indicator_condition"),
BatteryIndicatorCondition.class,
Expand All @@ -176,7 +175,7 @@ public static Screen genConfigScreen(Screen parent) {
.build()
);

general.addEntry(
battery.add(
entryBuilder.startEnumSelector(
localized("config", "battery_indicator_placement"),
BatteryIndicatorPlacement.class,
Expand All @@ -188,6 +187,8 @@ public static Screen genConfigScreen(Screen parent) {
.build()
);

general.addEntry(battery.build());

// Used for each state's frame rate target slider below
VariableStepTransformer fpsTransformer = getFpsTransformer();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
"config.dynamic_fps.category.unplugged": "On Battery",
"config.dynamic_fps.category.abandoned": "Idle",

"config.dynamic_fps.feature.misc": "Misc",
"config.dynamic_fps.feature.volume_transition": "Volume Transition",
"config.dynamic_fps.feature.idle": "Idling",
"config.dynamic_fps.feature.battery": "Battery Integration",

"config.dynamic_fps.enabled": "Enabled",

"config.dynamic_fps.disabled": "Disabled",
Expand Down