Future-proofing swappatch, add mouse scroll multi
This commit is contained in:
@@ -21,6 +21,7 @@ namespace UIFixes
|
||||
new TraderDealScreenPatch().Enable();
|
||||
new OfferViewListPatch().Enable();
|
||||
new MessagesContainerPatch().Enable();
|
||||
new MouseScrollSpeedPatch().Enable();
|
||||
}
|
||||
|
||||
protected static void HandleInput(ScrollRect scrollRect)
|
||||
@@ -229,5 +230,20 @@ namespace UIFixes
|
||||
return instructions;
|
||||
}
|
||||
}
|
||||
|
||||
public class MouseScrollSpeedPatch : ModulePatch
|
||||
{
|
||||
protected override MethodBase GetTargetMethod()
|
||||
{
|
||||
Type type = typeof(ScrollRectNoDrag);
|
||||
return type.GetMethod("OnScroll");
|
||||
}
|
||||
|
||||
[PatchPrefix]
|
||||
private static void Prefix(PointerEventData data)
|
||||
{
|
||||
data.scrollDelta *= Settings.MouseScrollMulti.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user