Initial menu system by claude

This commit is contained in:
2026-04-14 02:05:15 -04:00
parent 07b90ced1a
commit 49331773bf
10 changed files with 149 additions and 14 deletions

View File

@@ -33,10 +33,10 @@ function moveto(x, y)
tangible.animate{tan=actor, anim={action="moveto", xyz={x, y, z}, facing=math.auto}}
end
function cube.lookhotkeys(add)
add("Z", "Cube Hi", function () dprint("Doing Cube Hi") end)
add("X", "Cube Bye", function () dprint("Doing Cube Bye") end)
add("C", "Cube Yo", function () dprint("Doing Cube Yo") end)
function cube.lookmenu(add)
add("Cube Hi", function () dprint("Doing Cube Hi") end)
add("Cube Bye", function () dprint("Doing Cube Bye") end)
add("Cube Yo", function () dprint("Doing Cube Yo") end)
end
function sphere.lookhotkeys(add)
@@ -60,6 +60,12 @@ function engio.getlookat()
return "hotkeys"
end
-- if the class has a function 'lookmenu', then the correct
-- look-at widget is 'menu'.
if class.lookmenu ~= nil then
return "menu"
end
-- otherwise, if the class has a function 'getlookat', use that.
if class.getlookat ~= nil then
return class.getlookat()