Add non-working menu buttons
This commit is contained in:
parent
435b24cb6a
commit
6223b35536
6 changed files with 43 additions and 9 deletions
|
@ -2,7 +2,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';
|
||||
import GuiImage from './image.mjs';
|
||||
import GuiButton from './button.mjs';
|
||||
|
||||
export function root() {
|
||||
return new GuiFrame(0, 0, canvas.width, canvas.height, {
|
||||
|
@ -16,7 +17,18 @@ export function title() {
|
|||
shadow.append(logo);
|
||||
logo.scaleImage({ w: shadow.w * 0.7 });
|
||||
logo.posRelative({ x: 0.5, xc: 0.5, y: 0.2 });
|
||||
console.log(logo);
|
||||
|
||||
// TODO: Implement call to change view to game.
|
||||
let startFunction = () => {};
|
||||
let start = new GuiButton('Start game', startFunction, 0, 0, 200);
|
||||
shadow.append(start);
|
||||
start.posRelative({ x: 0.5, xc: 0.5, y: 0.7 });
|
||||
|
||||
let secondFunction = () => {};
|
||||
let second = new GuiButton('Don\'t start game', secondFunction, 0, 0, 200);
|
||||
shadow.append(second);
|
||||
second.posRelative({ x: 0.5, xc: 0.5, y: 0.7 });
|
||||
second.y += 60;
|
||||
|
||||
return shadow;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue