Not logged inOpenClonk Forum
Up Topic General / Feedback and Ideas / Track mouse also when no button pressed
- - By MimmoO Date 2010-03-08 19:44
as the topic says, i wonder if it would be possible to get the coordinates of the cursor, also when no button is pressed.
this could may be useful in some situations, for example in menus or other things.
Parent - By Asmageddon [pl] Date 2010-03-08 19:58
[That's a feature request... it's banned... har har har]

Just joking. I think it could be very usefull sometimes.
Reply
Parent - By Randrian [de] Date 2010-03-08 20:13
well, the functions PlayerControl.c (in System.c4d) actually get every controlframe the mouse coordinates. So I think it would be just some lines in C4Script to change this.
Reply
Parent - By Ringwaul [ca] Date 2010-03-08 23:09
I had thought about this when mouse control was first implemented, but currently I don't think it's quite necessary. Take for example the musket; when not in use the Clonk simply holds it in an idle position. And surprisingly, I actually prefer this over always aiming his musket when simply carrying it.
Reply
Parent - - By Newton [de] Date 2010-03-09 01:17
Generally: Yes. But should be used very economomical because this is all transferred over network.
Parent - - By Randrian [de] Date 2010-03-09 13:47
Btw. I have seen that in PlayerControl.c every mousemove makes a callback to PlayerControl.
Is there somewhere a distinction, which of these calls get synchronized and which not? Like it is now, I think every of these callbacks has to be synchronous, cause it is given to the script.
Reply
Parent - - By Sven2 [de] Date 2010-03-09 14:33
All mouse control callbacks are synchronized.

It would be possible to add async mouse movement callbacks (to be used for graphical effects only). But I wouldn't want to introduce that unless we really need it (i.e., it turns out network traffic is an issue or we need more frequent updates).
Parent - - By Randrian [de] Date 2010-03-09 14:36
Well, then his:

>Generally: Yes. But should be used very economomical because this is all transferred over network.


is not an argument, cause every mouse movement is synchronized so we don't have to be economical with the use of this already synchronized mouse data. Or are these callback just made when needed? But I haven't seen anything such in the script.
Reply
Parent - - By Sven2 [de] Date 2010-03-09 14:39
I think the mouse movement control should be enabled only when the mouse button is down and disabled otherwise. Disabled controls do not send anything over network.
Parent - - By Randrian [de] Date 2010-03-09 14:42
Ok, then I think it is Newton's fault that he just doesn't disable the movement control.
Reply
Parent - - By Newton [de] Date 2010-03-09 16:36
I think I have to pass the ball to Sven2 here. It seems he didn't implement DefaultDisabled=1 for controls yet. Try using the bow one time and then look at PlayerControl.c. After using the bow has been finished, there should be no more movement-calls going around. (Cause the EnablePlayerControl-function is already implemented)
Parent - By Randrian [de] Date 2010-03-09 16:44
Ah ok. I just noticed that I got controls all the time when I wanted to implement the ladder control.
Reply
Parent - - By Sven2 [de] Date 2010-03-09 17:15
Actually, it would be trivial to implement. There should be a bugtracker entry for it.
Parent - By Newton [de] Date 2010-03-09 17:23
There are so many things of playercontrols not implemented yet, partly those which are already documented, that I assumed you have a todo list on your own for these kinda things.
Up Topic General / Feedback and Ideas / Track mouse also when no button pressed

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill