|
|
video_border + mouse = not working really well
#375894
06/28/11 18:49
06/28/11 18:49
|
Joined: Mar 2008
Posts: 2,247 Baden Württemberg, Germany
Espér
OP
Expert
|
OP
Expert
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
|
ok.. i dunno why this is like it is now.. http://nakoon-game.de/Nakoon_Game/Artworks/Grafiken/Launcher_Prob.pngRed = active area Yellow = Area the mouse works i tried to lock the mouse to the engines window.. wich i thought is the active area.. with this code:
RECT rect;
GetClientRect(hWnd,&rect);
ClientToScreen(hWnd,&rect);
ClientToScreen(hWnd,&rect.right);
ClipCursor(&rect);
But the mouse is only locked inside the yellow area.. so.. WHY? the mouse_cursor can be locked to the active area with clamp. But the not the system cursor ._. Or better.. How can i lock the system cursor to the active area, too? i fixed that little problem with help of superkuh by using:
DEBUG_VAR(mouse_cursor.x,10);
DEBUG_VAR(mouse_cursor.y,30);
mouse_pos.x = mouse_cursor.x-40;
mouse_pos.y = mouse_cursor.y-196;
But that just fixed the position problem.. There´s still the problem.. that the mouse can´t be hold inside the active area... That wouldn´t be that problem.. if the mouse_map keeps active all over the border.. But mouse_map is active in the active_area only.. so.. this shit happens: http://nakoon-game.de/Nakoon_Game/Artworks/Grafiken/Unbenannt.pngSeems to me, that video_border + mouse isn´t thought through really well ^^"
Last edited by Espér; 06/28/11 19:03. Reason: changed title.. ._.
|
|
|
Re: video_border + mouse = not working really well
[Re: jcl]
#376018
06/29/11 12:05
06/29/11 12:05
|
Joined: Apr 2008
Posts: 650
Sajeth
User
|
User
Joined: Apr 2008
Posts: 650
|
No, I think he refers to the mouse bitmap being cut off at the edge.
Teleschrott-Fan.
|
|
|
Re: video_border + mouse = not working really well
[Re: Espér]
#376052
06/29/11 16:29
06/29/11 16:29
|
Joined: Apr 2007
Posts: 3,751 Canada
WretchedSid
Expert
|
Expert
Joined: Apr 2007
Posts: 3,751
Canada
|
and, how do i use ClipCursor? Didn´t find it in the manual ._. The function starts with an uppercase letter and is written in camel case, do you know any Gamestudio function that follows this convention? Its a WinAPI function.
Shitlord by trade and passion. Graphics programmer at Laminar Research. I write blog posts at feresignum.com
|
|
|
|