none
cursor on top of content - monogame RRS feed

  • Question

  • I did this:

    protected override void OnLaunched(LaunchActivatedEventArgs args)
            {
                var gamePage = Window.Current.Content as GamePage;
    
                // Do not repeat app initialization when the Window already has content,
                // just ensure that the window is active
                if (gamePage == null)
                {
                    // Create a main GamePage
                    gamePage = new GamePage(args.Arguments);
    
                    if (args.PreviousExecutionState == ApplicationExecutionState.Terminated)
                    {
                        // TODO: Load state from previously suspended application
                    }
    
                    // Place the GamePage in the current Window
                    Window.Current.Content = gamePage;
                    //Window.Current.Content = rootFrame;
                    //Window.Current.Activate();
                    
    
                }
    
                // Ensure the current window is active
                Window.Current.Activate();
            }

    But can't see the cursor/mouse moving on top of the content of this gamePage (inside the current window).

    Why is this?

    • Moved by Breeze Liu Friday, January 5, 2018 7:32 AM off topic
    Tuesday, December 19, 2017 4:48 PM

All replies

  • Monogame is probably hiding the cursor for you by setting  Window.Current.CoreWindow.PointerCursor to null. This is typical for DX games. If you don't want this in a Monogame app you'll need to check the Monogame source or ask its authors for where it is doing that and how to prevent it.
    Tuesday, December 19, 2017 8:26 PM