The window does it more or less continuously but waits for the messages to be retrieved. I think the screen only updates the mouse info each time FlipBuffers() is used, followed by ExamineMouse(). Both the window and the screen were giving status messages on where the mouse pointer was. ShowCursor_()) you then had competing events that showed where the mouse pointer was. I think when you were showing the windows cursor on the windowed screen (i.e. Need a 2D Games Guru (or Fred/Freak) to show us how it should be done. IdeasVacuum wrote:Well, the mouse behaviour is erratic - it sometimes looks like the cursor has hit some mysterious, magnetic force field that slows it down! So, either my code is a pile of crap (very likely) or there is something wrong with ExamineMouse(). Once the cursor is out of the screen region, you can use the mouse anywhere else, as expected, but when you move the mouse back into the screen region it's location is not picked up again. This works better on my machine, but I think it could be improved by somebody that knows what they are doing. SetGadgetText(#Txt,"X:" + Str(fgMouseX) + " Y:" + Str(fgMouseY)) Hide sprite cursor by sending Sprite off screenĭisplayTransparentSprite(#CursorSprite, -100, -100)ĭisplayTransparentSprite(#CursorSprite, fgMouseX, fgMouseY) ReleaseMouse(1) Use Normal Windows mouse cursor If mouse is on edge of windowed screen, hide sprite cursor, enable Windows Cursor. If ( (fgMouseX = (WindowWidth(#Win) - 6)) Or (fgMouseY >= (WindowHeight(#Win) - 46)) ) If KeyboardPushed(#PB_Key_Escape) : iQuit = #True : EndIf OpenWindowedScreen(WindowID(#Win), 0, 40, WindowWidth(#Win), WindowHeight(#Win) - 40) If OpenWindow(#Win, 0, 0, 800, 640, "Game Demo ", #PB_Window_MinimizeGadget | #PB_Window_ScreenCentered) Global igScreenColour.i = RGB(66, 66, 66)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |