steed/src/sdl-instead/gui.h
2009-02-21 10:52:44 +00:00

40 lines
873 B
C

char *instead_gui_lua = "game.hinting = true;\n\
game.showlast = true;\n\
iface.xref = function(self, str, obj)\n\
-- return '@'..str..'{'..obj..'}';\n\
local o = ref(here():srch(obj));\n\
local cmd=''\n\
if not o then \n\
o = ref(ways():srch(obj));\n\
if o then\n\
cmd = 'go ';\n\
end\n\
end\n\
if not o then\n\
o = ref(inv():srch(obj));\n\
end\n\
if not o or not o.id then\n\
return str;\n\
-- error ('Xref to nowhere:'..str);\n\
end\n\
return cat('<a:'..cmd..tostring(o.id)..'>',str,'</a>');\n\
end;\n\
iface.title = function(self, str)\n\
return nil\n\
end;\n\
\n\
iface.inv = function(self, str)\n\
if str then\n\
return string.gsub(str,',','^');\n\
end\n\
return str\n\
end;\n\
\n\
iface.ways = function(self, str)\n\
if str then\n\
return '<c>'..string.gsub(str,',',' | ')..'</c>';\n\
end\n\
return str\n\
end;";