pex-gl/pex-gui

GUI clicks don't work on scaled canvas

Closed this issue · 0 comments

vorg commented

1There are couple of interdependent causes to that:

  1. responsive: true overwrites scale on draw so i would propose that we default to false.
  2. this.getScaledActiveArea multiples activeArea by scale
  3. pixelRatio is not propagated from constructor to renderer

Currently i found two way to make gui render and be clickable

  • responsive: false, scale: canvas.width/canvas.clientWidth
  • responsive: true, pixelRatio set manually to canvas.width/canvas.clientWidth

So not sure if some of those things are bugs or i just don't know how to use them yet :)