BdR Posted July 2, 2018 Share Posted July 2, 2018 I've been working on my LCDGame.js library some more, and I've added an info pop-up and a highscore list. The actual game is rendered in a canvas and the buttons, infobox and highscore list are DIV elements on top of that canvas. The DOM tree is added at run-time when the Game object in the library starts. I don't know that much about layout and CSS stuff, so my questions are: any tips on scaling the canvas in real-time (so when window resizes)? any tips on scaling the info and highscore DIVs? (without using additional libraries) general improvements any suggestions on making it look prettier are welcome See github and specifically the layout_tester.html here https://github.com/BdR76/lcdgame.js/tree/master/css Quote Link to comment Share on other sites More sharing options...
AndyTyurin Posted July 3, 2018 Share Posted July 3, 2018 Hi man! – You can attach addEventListener with 'resize' event to 'Window' object and handle resizing of your canvas manually when window's size changes. – You can easily scale any DIV blocks by changing 'width' and 'height' properties of the object. You can also change style of your object by javascript. Write me in a case if you need examples. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.