From 93f944affe1bb8e1eb069c7ac565b13a7800924f Mon Sep 17 00:00:00 2001 From: John Alanbrook Date: Thu, 1 Jun 2023 20:58:48 +0000 Subject: [PATCH] gui --- startmenu.js | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/startmenu.js b/startmenu.js index c1c2825..8c6f3f8 100644 --- a/startmenu.js +++ b/startmenu.js @@ -1,11 +1,20 @@ function startmenu() { - GUI.column([ - GUI.text.bind(this,"Press ENTER start"), - GUI.image.bind(this,"bigball.png"), - GUI.text.bind(this,"Press ESCAPE to exit"), - ], Window.dimensions.scale(0.5)); + GUI.text_fn("SUPER BREAKOUT", {font_size:6, anchor: [0.5,0.5]}).draw(Window.dimensions.scale([0.5,0.9])); + var options = GUI.column({ + items: [ + GUI.text_fn("Press ENTER start"), + GUI.text_fn("Press ESCAPE to exit"), + GUI.text_fn("Press H for help"), + GUI.image_fn({path:"bigball.png"}), + GUI.image_fn({path:"arrow.png"}), + ], + anchor: [0.5,0], + font_size: 2, + }); + + options.draw(Window.dimensions.scale([0.5,0.5])); - GUI.image("bigball.png", [300,300]); + GUI.image_fn({path:"arrow.png", anchor: [0,0]}).draw([options.items[0].bb.l, options.items[0].bb.t]); } register_gui(startmenu);