Git Product home page Git Product logo

Comments (4)

flibitijibibo avatar flibitijibibo commented on August 20, 2024

Considering either centering the window on every resize, or adding a
SetWindowPosition with a 'centered' flag, both of which break the XNA4
spec. I think the latter would be better, since people struggle with this
and end up using System.Windows.Forms, which is a PITA on Mac/Linux.
On Jun 6, 2013 8:32 AM, "Jordan S" [email protected] wrote:

The window is not centered when starting. Not a big issue, but would be
nicer if it did :).


Reply to this email directly or view it on GitHubhttps://github.com//issues/89
.

from fna-mghistory.

xanather avatar xanather commented on August 20, 2024

"break the XNA4 spec", XNA starts with the window in center? From what I see the SDL window does initially start in the center of the screen, but then it gets re-sized (depending on the resolution specified) making it off center. I added my own fix which repositions the window once everything is loaded but seems hackish (and as you mention uses System.Windows.Forms.Screen).

from fna-mghistory.

flibitijibibo avatar flibitijibibo commented on August 20, 2024

a6aa9e2

This should keep the window centered when setting various resolutions. Some window managers like to push the window slightly over time if you set the resolution multiple times, but that's the fault of the window manager not telling us where we really are with the WM border, and we can't fix that on our end.

from fna-mghistory.

xanather avatar xanather commented on August 20, 2024

Awesome, thanks!

from fna-mghistory.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.