Search code examples
javascripthtmlgame-enginelimejs

LimeJS Rounded Border


I want to display a thin rounded corner border around my game. Can I leverage the RoundedRect for this, or do I have to do something else? I see it doesn't come natively, so I was wondering how it's done.

Thanks.


Solution

  • You can put the entire game into a lime.RoundedRect and add a border to it.

    // requirements
    goog.require('lime.RoundedRect');
    
    // in your main function
    var gameContainer = new lime.RoundedRect();
    gameContainer.setStroke(12,'#000000');
    gameContainer.appendChild(/* the rest of your code here */);