Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config Changes #31

Merged
merged 1 commit into from
Jan 8, 2025
Merged
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
28 changes: 0 additions & 28 deletions src/main/java/yalter/mousetweaks/config/MTConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,41 +33,13 @@ public class MTConfig {
@Config.Name("Wheel tweak scroll direction")
public static WheelScrollDirection wheelScrollDirection = WheelScrollDirection.NORMAL;

@Config.Comment("When set to smooth scrolling, minor issues may be experienced such as scrolling \"through\" JEI or other mods. Non-smooth scrolling works only with the Forge OnTick method.")
@Config.Name("Scroll handling")
public static ScrollHandling scrollHandling = ScrollHandling.SIMPLE;

@Config.Comment("This determines how many items are moved when you scroll. On some setups (notably macOS), scrolling the wheel with different speeds results in different distances scrolled per wheel \"bump\". To make those setups play nicely with Mouse Tweaks, set this option to \"Always exactly one item\".")
@Config.Name("Scroll item scaling")
public static ScrollItemScaling scrollItemScaling = ScrollItemScaling.PROPORTIONAL;

/**
* Config Enums
*/
public enum ScrollHandling {

SIMPLE("Smooth scrolling, minor issues"),
EVENT_BASED("Non-smooth scrolling, no issues");

private final String id;

ScrollHandling(String id) {
this.id = id;
}

public String getValue() {
return this.id;
}

public static ScrollHandling fromId(int ordinal) {
return ordinal == 0 ? SIMPLE : EVENT_BASED;
}

@Override
public String toString() {
return this.getValue();
}
}

public enum ScrollItemScaling {

Expand Down