|
#1
|
||||
|
||||
|
Page.CursorHide
Suggestion:
Adding the above action, with True/false option. A few advantages to that: - Disabling mousing at runtime, - Making your own custom made cursor, linking an image position to the mouse X and Y position Yossi |
|
#2
|
|||
|
|||
|
If it doesn't make it Yos
HideCursor(true); --Hides Cursor HideCursor(false); --Shows Cursor Code:
function HideCursor(blnHide) if blnHide then nResult = DLL.CallFunction(_SystemFolder.."\\User32.dll", "ShowCursor", 0, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL); else nResult = DLL.CallFunction(_SystemFolder.."\\User32.dll", "ShowCursor", 1, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL); end end |
|
#3
|
||||
|
||||
|
Yes, Oh Worm, King of the DLL world. Thank you, your majesty for the gifts you are granting us....
Thanks Man... Yossi |
|
#4
|
|||
|
|||
|
It does bring up a point about the value passed. It'd be nice if the e_X and e_Y were say set to negative numbers when outside of the AMS window. Then you'd know to hide your sudo cursor, otherwise, its stuck at the edge of the window waiting for the mouse to re-enter.
|
|
#5
|
||||
|
||||
|
True,
But as there are no negative value, can't you use the page dimension and "push " the cursor off screen from the other side of the page? (>790 for example). Yossi |
|
#6
|
||||
|
||||
|
Good one Yosik. I have been trying to figure out a way to use additional cursors, for my next AMS addon. I would absolutely love it if AMS6 had a custom cursor option that let us dynamically load a (proper) cursor file of our own.
Barring that, your idea to use transparent png’s and the hidden cursor is brilliant. It will take a little math for the offset, (different for each png) to make sure you are aiming at the, well, I can’t think offhand what it’s called, but the sweet spot on the icon, the tip of the arrow, the actual pixel that measures a hit. It’s a work around that I hadn’t thought of, thank you.
__________________
Add-ons for AMS. Toolbar Buttons Galore, System Animations, the Window Construction Kit, and more. Visit Acme-Tek |
|
#7
|
||||
|
||||
|
As the registration point of an image in AMS is the top left point (BTW, we could use a custom registration point function.....), what you have to do is make sure that the "sweet spot" of your custom pointer matches that point.
Yossi |
|
#8
|
||||
|
||||
|
I’m not sure that you would want to consider the registration of the picture. I was thinking that you would still use the registration of the mouse. I was also thinking that HideCursor only hid the cursor, not disabled it. Now that I think about it, it probably does disable the cursor, so you would have to rely on the registration of the picture.
Always about two steps ahead of me aren’t you?
__________________
Add-ons for AMS. Toolbar Buttons Galore, System Animations, the Window Construction Kit, and more. Visit Acme-Tek |
|
#9
|
||||
|
||||
|
Previous experience with Flash...That's all.
|
|
#10
|
|||
|
|||
|
The trick I found is to be sure your cursor image is disabled, otherwise the mouse events fire eradically for objects because you pointe is always over the cursor image. By disabling the image, it works alright.
Drawbacks will be that the custom cursor won't work over a windowed object because of the mouse events for the page not firing while the cursor is over those objects. I could be mistaken, but I believe that there was a suggestion posted to have the page's mouse events be a "global" event which would solve this. Quote:
|
|
#11
|
||||
|
||||
|
Thank you Worm. I spend the time to think about it, you spend the tome to do it, thanks.
Isn’t it exciting, how few lines of code that it takes to do something this cool?
__________________
Add-ons for AMS. Toolbar Buttons Galore, System Animations, the Window Construction Kit, and more. Visit Acme-Tek |
|
#12
|
||||
|
||||
|
Quote:
|
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
All times are GMT -6. The time now is 08:31 AM.








Linear Mode
