diff options
Diffstat (limited to 'src/drawables/TopBar.ts')
| -rw-r--r-- | src/drawables/TopBar.ts | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/drawables/TopBar.ts b/src/drawables/TopBar.ts new file mode 100644 index 0000000..f021f77 --- /dev/null +++ b/src/drawables/TopBar.ts @@ -0,0 +1,17 @@ +import { canvas, ctx } from "../consts"; +import Drawable from "../Drawable"; +import { IMGS } from "../Images"; + +export class TopBar extends Drawable { + sprite = IMGS.topbar; + width = canvas.width + height = 24 + constructor() { + super(0, 0) + } + draw() { + if (this.sprite.src == null) this.sprite = IMGS.topbar; + ctx.drawImage(this.sprite, 0, 0) + } +} + |
