jackpottz Posted March 19, 2017 Share Posted March 19, 2017 Hey, I'm learning html5, primarily for making games. I was wondering how would I go about making text boxes for rpg/adventure games. If any of you guys played classic final fantasy and zelda games , you"ll know what I'm talking about. I tried something like a fillRect() or strokeRect() with fillText() in it. Is this the best approach? var canvas = document.getElementById("canvas"); var ctx = canvas.getContext("2d"); ctx.fillStyle = 'blue'; ctx.fillRect(100,100, 300,100); ctx.fillStyle = 'white'; ctx.font = "20px serif"; ctx.fillText("hi everybody", 100, 120); Quote Link to comment Share on other sites More sharing options...
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.