hzqst / MetaHookSv

MetaHook (https://github.com/nagist/metahook) porting for SvEngine (GoldSrc engine modified by Sven-Coop)
MIT License
145 stars 35 forks source link

[VGUI2Extension] TODO: hook CBaseUISurface::SetCursor #474

Closed hzqst closed 1 month ago

hzqst commented 1 month ago

94 00 00 00 E8 ?? ?? ?? ?? 6A 30

staticEngineSurface->setCursor()

vgui::SurfaceBase vftable[30] = setCursor

https://github.com/hzqst/MetaHookSv/blob/3eb919236386361ec8a7cb40e0d2a057522d2606/include/HLSDK/utils/vgui/include/VGUI_SurfaceBase.h

vgui::App::getInstance()->getScheme()->getCursor(vgui::Scheme::scu_arrow);

vgui::App::getInstance vftable[21] = getScheme

vgui::Scheme vftable[5] = getCursor

Scheme:

https://github.com/hzqst/MetaHookSv/blob/3eb919236386361ec8a7cb40e0d2a057522d2606/include/HLSDK/utils/vgui/include/VGUI_Scheme.h#L49