Apply scroll speed to lightscrollers
This commit is contained in:
@@ -23,7 +23,10 @@ public static class ScrollPatches
|
||||
new EnchanceTraderStashScrollingPatch().Enable();
|
||||
new EnhanceFleaScrollingPatch().Enable();
|
||||
new EnhanceMailScrollingPatch().Enable();
|
||||
|
||||
new MouseScrollingSpeedPatch().Enable();
|
||||
new LightScrollerSpeedPatch().Enable();
|
||||
|
||||
new EnhanceHideoutScrollingPatch().Enable();
|
||||
new EnhanceTaskListScrollingPatch().Enable();
|
||||
new OpenLastTaskPatch().Enable();
|
||||
@@ -305,6 +308,21 @@ public static class ScrollPatches
|
||||
}
|
||||
}
|
||||
|
||||
public class LightScrollerSpeedPatch : ModulePatch
|
||||
{
|
||||
protected override MethodBase GetTargetMethod()
|
||||
{
|
||||
return AccessTools.Method(typeof(LightScroller), nameof(LightScroller.method_1));
|
||||
}
|
||||
|
||||
[PatchPrefix]
|
||||
public static void Prefix(ref float deltaPixels)
|
||||
{
|
||||
int multi = Settings.UseRaidMouseScrollMulti.Value && Plugin.InRaid() ? Settings.MouseScrollMultiInRaid.Value : Settings.MouseScrollMulti.Value;
|
||||
deltaPixels *= multi;
|
||||
}
|
||||
}
|
||||
|
||||
public class EnhanceTaskListScrollingPatch : ModulePatch
|
||||
{
|
||||
protected override MethodBase GetTargetMethod()
|
||||
|
Reference in New Issue
Block a user