c# - Making Objects Stop at the Edge of the Screen While In Fullscreen Mode -
recently, upgraded game fullscreen setting, adding graphics.isfullscreen = true;, seems have gotten me errors boundaries movement go.
this have far, bounds rectangle, , location vector2:
if (bounds.top > graphicsadapter.defaultadapter.currentdisplaymode.height - 10) { location.y = graphicsadapter.defaultadapter.currentdisplaymode.height - 10; } if (bounds.bottom < graphicsadapter.defaultadapter.currentdisplaymode.height - graphicsadapter.defaultadapter.currentdisplaymode.height + 10) { location.y = graphicsadapter.defaultadapter.currentdisplaymode.height - graphicsadapter.defaultadapter.currentdisplaymode.height + 10 + bounds.height; } if (bounds.left < graphicsadapter.defaultadapter.currentdisplaymode.width - 10) { location.x = graphicsadapter.defaultadapter.currentdisplaymode.width - 10; } if (bounds.right > graphicsadapter.defaultadapter.currentdisplaymode.width - graphicsadapter.defaultadapter.currentdisplaymode.width + 10) { location.x = graphicsadapter.defaultadapter.currentdisplaymode.width - graphicsadapter.defaultadapter.currentdisplaymode.width + 10 + bounds.width; } for reason, not seem work, , object seems disappear screen altogether. oh, , -10px/+10px 1o pixel border want around whole screen! ideas?
Comments
Post a Comment