Jump to content

Create a UI pack from primitives


jimbug
 Share

Recommended Posts

Hi guys, I'm creating a UI pack for a piano game.

I'm creating UI elements such as sliders, buttons, piano-keys and switches.

 

I know, I can use a sprite to make it super easy but my objective is to be able to scale the elements to any screen resolution and be able to dynamically set colors and attributes of each element with javascript.

 

Currently, I'm using a regular canvas context and bitmapdata to draw the elements from primitives. i.e. bmp.ctx.fillRect();

 

And I can even apply blend modes to it. 
 
 
And there are a couple of options: bitmapdata, graphics and probably one or two more.
 
However, I'd like to know what the best way to do such a thing is.
Thanks in advance
 
 
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...