Suggestion: Centered Mouse Pointer

A forum for general AmigaOS 4.x support questions that are not platform-specific
User avatar
nbache
Beta Tester
Beta Tester
Posts: 1744
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: Suggestion: Centered Mouse Pointer

Post by nbache »

chris wrote:
nbache wrote:And no, I don't have any overscan defined. Actually, the Overscan prefs editor has been deprecated long ago, and I don't even have one.
I meant in the monitor settings (on the monitor itself). LCD TVs have an option for overscan, which stretches the picture out slightly to remove the edges that aren't visible on a CRT. If you're using a TV masquerading as a monitor (or vice-versa, or whatever) it might have the same option.
Ah, I see. No, I'm not using a TV-monitor. My monitor is a Dell 30" U3011 with a resolution of 2560×1600. It doesn't seem to have any overscan option in its menus.

Best regards,

Niels
User avatar
nbache
Beta Tester
Beta Tester
Posts: 1744
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: Suggestion: Centered Mouse Pointer

Post by nbache »

whose wrote:It shouldnt be too hard to alter the function of MidMouse in order to make it "more configurable". AFAIK Thomas always supplies the sourcecode to his little tools/examples.
True, the source is also included here (and is very small and simple).
If I find a little time to tune it, I will do. Some WBArgs/Tooltypes parsing and its still a utility for WBStartup use ;-) If theres need for a Shell version, it should be easy to do, too (I mean a combined version. ReadArgs() parsing for Shell parameters and Tooltypes if started from WB).
Would be great.

A quick glance through the code (which I presently have no time to play around with, unfortunately) also made me wonder about another thing: Isn't it ignoring the possibility of having a scrollable, oversized screen? I believe it just calculates the center of the actual screen (not its visible portion) and then sets the mouse there. This could even be a point outside the visible area (although I believe this is prevented by the system, but not sure how).

Best regards,

Niels
whose
Posts: 92
Joined: Sun Sep 04, 2011 4:11 pm

Re: Suggestion: Centered Mouse Pointer

Post by whose »

Uhm... good question :-D

But I wouldnt wonder, if the system is clever enough to "scroll" the screen fitting to the mouse pointer position set by an input event.

We should test it, simple as that ;-)
whose
Posts: 92
Joined: Sun Sep 04, 2011 4:11 pm

Re: Suggestion: Centered Mouse Pointer

Post by whose »

I made an improved version, which is taking Tooltypes and shell parameters for the position of the mousepointer. Thomas Blatt should upload it to os4depot shortly. There is a Readme inside the archive, take it into account ;-) You can PM me, if you wish to test it before it arrives at os4depot.

@NielsBache:

Well, Intuition IS clever. It scrolls the screen if necessary and clips a mousepointer position down to the screens limits ;-)
User avatar
nbache
Beta Tester
Beta Tester
Posts: 1744
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: Suggestion: Centered Mouse Pointer

Post by nbache »

whose wrote:I made an improved version, which is taking Tooltypes and shell parameters for the position of the mousepointer.
Thanks for that!
Thomas Blatt should upload it to os4depot shortly. There is a Readme inside the archive, take it into account ;-) You can PM me, if you wish to test it before it arrives at os4depot.
It is there now: http://os4depot.net/?function=comments& ... dmouse.lha

Works nicely, I have put it into action in my WBStartup (tooltypes 2500 & 1500 put my mouse pointer just north of the Internet subdock in my AmiDock, nice and convenient ;-)).
@NielsBache:

Well, Intuition IS clever. It scrolls the screen if necessary and clips a mousepointer position down to the screens limits ;-)
Aha, good to know. Thanks for checking.

BTW, did you try entering "MidMouse ?" in a shell and then after the argument template is printed, follow with the two numbers? It doesn't seem to read those correctly and instead defaults to the center. If you enter the whole thing in one go (like "MidMouse 100 100"), it works fine.

Best regards,

Niels
whose
Posts: 92
Joined: Sun Sep 04, 2011 4:11 pm

Re: Suggestion: Centered Mouse Pointer

Post by whose »

Hey Niels,

youre right. It doesnt count the parameters correctly. I sent you an updated version, using suggestions made by Thomas to make the rather old code I used (copy and paste are my friends sometimes ;-) ) a bit more elegant. It should work for you. I wait for further suggestions until I release the "final" version.

Pls check your mail account (especially the spam filter ;-) ) for an email from "insane-software".
User avatar
nbache
Beta Tester
Beta Tester
Posts: 1744
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: Suggestion: Centered Mouse Pointer

Post by nbache »

whose wrote:Hey Niels,

youre right. It doesnt count the parameters correctly. I sent you an updated version, using suggestions made by Thomas to make the rather old code I used (copy and paste are my friends sometimes ;-) )
Hey, if copy and paste didn't exist, nobody would ever get any programming done ;-).
a bit more elegant. It should work for you. I wait for further suggestions until I release the "final" version.
Responded privately, but basically, yes, that version solved it.

Thanks!

Best regards,

Niels
Post Reply