Log In  
Follow
awesomonster

Hello, I'm very new to pico-8 (and fairly inexperienced with coding in general) and I need a bit of help with some menu code. I'd like to have a menu that has two sections to it that you can move between with the left and right arrows. I'm working off of pixelcod's menu code example, here is what I have so far:

--menu system

function init_menu()
	menu={"menu1","menu2"}
		menu.y=12
			menu1 = {}
				menu1.x=25
				menu1.options={"𝘸𝘒𝘭𝘬","𝘡𝘒𝘭𝘬","𝘡𝘒𝘬𝘦","𝘨π˜ͺ𝘷𝘦","π˜ͺ𝘯𝘷."}

			menu2 = {}
				menu2.x=88
				menu2.options={"𝘸𝘩𝘒𝘱","𝘬π˜ͺ𝘴𝘴","π˜₯π˜ͺ𝘴𝘴","𝘧𝘳𝘦𝘡","𝘴𝘡𝘯𝘺"}

	menu.amt=0
	menu.sel=1
	menu.swp=false

	for i in all(menu1.options,menu2.options) do
	  menu.amt+=1
	end

end

function update_menu()
 update_cursor()
end

function draw_menu()
	for i=1,menu.amt do
		oset=i*8
	end
 if menu.swp==true then
 	  if i==menu.sel then
	   spr(39,menu2.x,menu.y+oset,2,1)
			 print(menu2.options[i],menu2.x,menu.y+oset+1,10)	

[ [size=16][color=#ffaabb] [ Continue Reading.. ] [/color][/size] ](/bbs/?pid=174261#p)
1
3 comments



Cart #hurupafama-0 | 2025-08-28 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
3

Hello, this is my first pico-8 game, Rolling Bones! In it, you are a skull who wants to go out on a date, but all your bones have been scattered to the winds! Roll around the field to find them but watch out for assorted junk! Sticks and stones can break your bone and other items can look like bones but will not fit anywhere in your skeleton (I promise, I've tried). Can you collect all 20 bones to get ready for your big date?

3
2 comments