Add logo to main menu

This commit is contained in:
asraelite 2018-03-02 19:37:24 +00:00
parent cfe9c55c9a
commit 435b24cb6a
15 changed files with 135 additions and 40 deletions

View file

@ -1,6 +1,8 @@
import * as gui from './index.mjs';
import {images as assets} from '../assets.mjs';
import {canvas} from '../graphics/index.mjs';
import GuiFrame from './frame.mjs';
import {GuiImage} from './image.mjs';
export function root() {
return new GuiFrame(0, 0, canvas.width, canvas.height, {
@ -8,6 +10,13 @@ export function root() {
});
}
export function titleScreen() {
export function title() {
let shadow = root();
let logo = new GuiImage(assets.title.logo);
shadow.append(logo);
logo.scaleImage({ w: shadow.w * 0.7 });
logo.posRelative({ x: 0.5, xc: 0.5, y: 0.2 });
console.log(logo);
return shadow;
}