NewUI -- Plaz?
Posted: Thu Jan 23, 2003 4:52 pm
Plaz, I've been working on the NewUI stuff too, in parallel. I came to the following conclusion, let me know if this is what you've seen.
Either the insanely complicated logic in the top level "click" function will have to be traced and duplicated, OR you'll have to have dozens of different element-specific offsets to do the clicking.
From what I hear, you've been working at the latter method, which I'm starting to think is the only thing that'll work. I can make the top-level click work about 30-40% of the time, but many basic things confound it (like any box with an item in it, and so on).
Below the top-level click it branches into all of the individual elements' click handlers (which is where I get the "you'll need dozens of offsets" from).
There is a global that's passed in ecx to the top level click handler (which is right below the DInput polling loop) that I want to understand. If I could understand that better maybe I could make more headway with the "top down" approach. I see that the current x,y of the pointer is stored in there at least four times (why?), I see that the value of GetTickCount() goes in there (I'm assuming to time double clicks and drags an so on), but there's also a bit flags variable that I'm totally clueless on. Also, it seems to keep track of what UI element the mouse is "over" at any given time.
The top level click function takes that global in ecx, and the x,y coords of the mouse pointer, as parms. Interestingly, if I pass in the global and valid x,y, EQ crashes. Which leads me to believe that some prep/setup work must be done; it appears that a certain amount of UI state is being maintained in the global.
Your thoughts/findings?
Either the insanely complicated logic in the top level "click" function will have to be traced and duplicated, OR you'll have to have dozens of different element-specific offsets to do the clicking.
From what I hear, you've been working at the latter method, which I'm starting to think is the only thing that'll work. I can make the top-level click work about 30-40% of the time, but many basic things confound it (like any box with an item in it, and so on).
Below the top-level click it branches into all of the individual elements' click handlers (which is where I get the "you'll need dozens of offsets" from).
There is a global that's passed in ecx to the top level click handler (which is right below the DInput polling loop) that I want to understand. If I could understand that better maybe I could make more headway with the "top down" approach. I see that the current x,y of the pointer is stored in there at least four times (why?), I see that the value of GetTickCount() goes in there (I'm assuming to time double clicks and drags an so on), but there's also a bit flags variable that I'm totally clueless on. Also, it seems to keep track of what UI element the mouse is "over" at any given time.
The top level click function takes that global in ecx, and the x,y coords of the mouse pointer, as parms. Interestingly, if I pass in the global and valid x,y, EQ crashes. Which leads me to believe that some prep/setup work must be done; it appears that a certain amount of UI state is being maintained in the global.
Your thoughts/findings?