fenomas / noa

Experimental voxel game engine.
MIT License
616 stars 91 forks source link

other HTML elements hidden by engine's canvas #72

Closed levlups closed 5 years ago

levlups commented 5 years ago

noa engine is hiding all my forms ,html div ecttt , wich is good during game play

how do I get them back ,this code is not working

function setVis() { var el = document.getElementById('content') el.hidden = false }

window.addEventListener('keydown', function (ev) {

              var x = ev.keyCode;
             if (x === 76) { // leter L
        setVis();
             }

       })
EliteAsian123 commented 5 years ago

This is because:

  1. All the contents of the form are below (down) the canvas (game play)
  2. If you position them correctly they'd be underneath.

So to fix this, you have to use some CSS. I`m not at a computer right now, so I don't know if this 100% works.

#content {
  position: absolute; /* Make is in a fixed spot over the canvas */
  z-index: 999; /* Change the Z layer of the content */
  left: 0; /* Position the content  in the top left */
  top: 0;
}
levlups commented 5 years ago

it worked , once again ,the master has spoken lol
need to go back to coding cat

levlups commented 5 years ago

wait wait check this out , me coding