MCPcopy Create free account
hub / github.com/axhlzy/Il2CppHookScripts / OnPointerClick

Function OnPointerClick

Il2cppHook/_Ufunc.js:4207–4308  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4205exports.HideClickedObj = exports.OnButtonClick = exports.OnPointerClick = void 0;
4206const class_1 = require("../../../../../../AbstractEventData/BaseEventData/PointerEventData/class");
4207function OnPointerClick() {
4208 let funcAddr = undefined;
4209 switch (arguments[0]) {
4210 default:
4211 funcAddr = Il2Cpp.Api.Button._OnPointerClick;
4212 if (funcAddr == undefined || funcAddr.isNull())
4213 break;
4214 LOGE("\nEnable Hook OnPointerClick at " + funcAddr + "(" + funcAddr.sub(soAddr) + ")" + "\n");
4215 A(Il2Cpp.Api.Button._OnPointerClick, (args) => {
4216 LOGW("\n" + getLine(38));
4217 LOGD("public void OnPointerClick( " + args[0] + " , " + args[1] + " );");
4218 FakePointerEventData(args[1]);
4219 });
4220 break;
4221 case 0:
4222 funcAddr = find_method("UnityEngine.UI", "PointerInputModule", "DeselectIfSelectionChanged", 2);
4223 if (funcAddr.isNull())
4224 break;
4225 LOGE("\nEnable Hook DeselectIfSelectionChanged at " + funcAddr + "(" + funcAddr.sub(soAddr) + ")" + "\n");
4226 A(funcAddr, (args) => {
4227 LOGW("\n" + getLine(38));
4228 LOGD("protected void DeselectIfSelectionChanged(Ins = " + args[0] + " , GameObject = " + args[1] + " , BaseEventData(" + findClass("BaseEventData") + ") = " + args[2] + " );");
4229 if (!args[1].isNull())
4230 showGameObject(args[1]);
4231 });
4232 break;
4233 case 1:
4234 funcAddr = find_method("UnityEngine.UI", "ScrollRect", "OnInitializePotentialDrag", 1);
4235 if (funcAddr.isNull())
4236 break;
4237 LOGE("\nEnable Hook OnInitializePotentialDrag at " + funcAddr + "(" + funcAddr.sub(soAddr) + ")" + "\n");
4238 A(funcAddr, (args) => {
4239 LOGW("\n" + getLine(38));
4240 LOGD("public void OnInitializePotentialDrag( " + args[0] + " , " + args[1] + " );");
4241 FakePointerEventData(args[1]);
4242 });
4243 break;
4244 case 2:
4245 A(find_method("UnityEngine.UI", "PointerInputModule", "ProcessMove", 1), (args) => {
4246 LOGW("\n" + getLine(38));
4247 LOGD("protected virtual Void ProcessMove( " + (args[1]) + " );");
4248 FakePointerEventData(args[1]);
4249 });
4250 break;
4251 case 3:
4252 A(find_method("UnityEngine.UI", "PointerInputModule", "ProcessDrag", 1), (args) => {
4253 LOGW("\n" + getLine(38));
4254 LOGD("protected virtual Void ProcessDrag( " + (args[1]) + " );");
4255 FakePointerEventData(args[1]);
4256 });
4257 break;
4258 case 4:
4259 A(find_method("UnityEngine.UI", "BaseInputModule", "HandlePointerExitAndEnter", 2), (args) => {
4260 LOGW("\n" + getLine(38));
4261 LOGD("protected virtual Void HandlePointerExitAndEnter( " + (args[1]) + " , " + (args[2]) + ")");
4262 FakePointerEventData(args[1]);
4263 });
4264 break;

Callers

nothing calls this directly

Calls 7

isNullMethod · 0.80
LOGEFunction · 0.70
LOGWFunction · 0.70
getLineFunction · 0.70
LOGDFunction · 0.70
FakePointerEventDataFunction · 0.70
showEventDataFunction · 0.70

Tested by

no test coverage detected