mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 16:10:36 +00:00
3.3.5 runs OnClick/PreClick/PostClick as (self, button, down) and
OnEnter/OnLeave as (self, motion). 1.12's runners carry only
%d/%u/%f/%s, and neither value reaches the script.
Frame::ScriptArgs gains AutoTrailingBool: a provider supplies one boolean
that becomes the last argN and positional argument of a run on the
positional path. Handlers that declare no parameters keep vanilla's
globals.
- down: the click vmethod gets (mask, fromScript) and never learns press
or release, but its callers do. The six 3.3.5 maps onto -- the press
handler (down = 1), the release handler (0) and Script_Click's four
name branches (StringToBOOL(L, 3, 0), as 3.3.5's Click reads it) --
each `call [edx+0x94]`, now replaced with a thunk that records
{button, down} and jumps through the same slot. The click detour takes
the record for its own button and offers it to that button's
OnClick/PreClick/PostClick runs.
- motion: the mouse-focus pass 0x007660D0 is 3.3.5's OnMouseMove. Its
re-pick passes the context's saved event (+0x1104), the same test
3.3.5 uses for motion. A co-hook records {context, old focus, motion}
for the pass; its own leave (old focus) and enter (new focus at +0x7C)
get motion, and every other enter/leave gets false.
Verified in-game: enter/leave on a mouse move give true, and a hide and
show under a still cursor give false. A press and release on a button
registered for both give down true then false, Click("RightButton",
true) gives true, and Click() gives false.