Layering Button Activation Rectangle Over Existing One, Both Trigger On Mouse Click
Posted: Sat May 09, 2020 2:07 pm
So what i'm trying to accomplish right now, is to have the "Sell" button in the Trade Window interface do something more than it currently does, that being do something that ties in with my current mod. The problem is that I can't seem to do this in a "proper" way since the method that handles this button is in a private class. So the only thing I could think of was to try and put my own button over the same area of the screen and have a hack-job "override" that way.
The problem that I expected when first trying this, is that both buttons would just activate and there not being any "priority" or layering to it. As Burt informed me that web-pages sometimes have a Z-axis property to their buttons, so this sort of thing is possible, that being one button being above another. With the Buttons in DFU they only seem to have an X and a Y property, so that clearly shows why what I thought would not work, lol.
Here is an image just for the sake of it: As can be seen, when I click an area where the "Sell" button and my "Testing" button area are both occupying, it brings up both windows at essentially the same time.
So my question is that if anyone knows if there is a better way to get around this problem i'm having? I'd love to just put the code I want in the method that handles the sell button, but that would obviously not be the "proper" way to mod it, especially not for a public mod release. There any trick or tool in the code-base that I can jury rig a way around this? Thanks for your time!
The problem that I expected when first trying this, is that both buttons would just activate and there not being any "priority" or layering to it. As Burt informed me that web-pages sometimes have a Z-axis property to their buttons, so this sort of thing is possible, that being one button being above another. With the Buttons in DFU they only seem to have an X and a Y property, so that clearly shows why what I thought would not work, lol.
Here is an image just for the sake of it: As can be seen, when I click an area where the "Sell" button and my "Testing" button area are both occupying, it brings up both windows at essentially the same time.
So my question is that if anyone knows if there is a better way to get around this problem i'm having? I'd love to just put the code I want in the method that handles the sell button, but that would obviously not be the "proper" way to mod it, especially not for a public mod release. There any trick or tool in the code-base that I can jury rig a way around this? Thanks for your time!