Announcement

Collapse
No announcement yet.

Newbie Question on obtaining scroll position

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Newbie Question on obtaining scroll position

    I got Monogame working in a canvas in my browser. Works amazing.

    When the "console" is up, however, I have to mouse wheel/scroll down to see the bottom of my canvas.

    The mouse position I capture in Monogame only contains the position from the top of that window after it has been scrolled.

    How do I get the scroll offset to add to this mouse position so my buttons still work?

    #2
    Maybe it would be better to disable the Bridge console and just use the browser developer tools (F12) console instead?

    Any value written to the Bridge Console is also written to the browser developer tools console.

    You can disable the Bridge console for your app by setting the console config within your bridge.json file:

    https://github.com/bridgedotnet/Brid...ration#console

    {
      "console": {
        "enabled": false
      }
    }
    Hope this helps.
    Last edited by geoffrey.mcgill; 2020-08-25 @ 07:58 AM.

    Comment


      #3
      Ok thanks. I will turn it off for now.

      Yeah, I noticed it also is the case when I shrink the window and scroll.

      There's got to be a way to get that offset too.

      Comment


        #4
        Nevermind! I got it.

        I found it in Retyped.dom.

        It's not in the canvas scroll properties or in the window scroll properties but in the wrapper parent. My web noobishness no doubt.

        Comment

        Working...
        X