Pos Lua >> Moon 2 1:[ local main = require("main") ] >> 2:[ main = require "main" ] 24 2:[ local bp = require("broadphase") ] >> 3:[ bp = require "broadphase" ] 50 3:[ local color = require("color") ] >> 4:[ color = require "color" ] 74 4:[ local ui = require("ui") ] >> 5:[ ui = require "ui" ] 93 5:[ local world = require("world") ] >> 7:[ world = require "world" --delete when done ] 154 7:[ Server = world.Server ] >> 8:[ import Server from world ] 178 9:[ World = world.World ] >> 9:[ import World from world ] 185 10:[ local mod = ... ] >> 10:[ mod = ... ] 208 11:[ local nwidth = 6 ] >> 13:[ nwidth = 6 ] 219 12:[ local section_width = 32 ] >> 14:[ section_width = 32 ] 238 13:[ local start_x = (-32) * (nwidth / 2) ] >> 15:[ start_x = (-32)*(nwidth/2) ] 265 14:[ mod.node = am.group() ] >> 16:[ mod.node = am.group! ] 286 15:[ mod.node:append(am.sprite("data/main_bg.png")) ] >> 17:[ mod.node\append(am.sprite("data/main_bg.png")) ] 333 16:[ local start_y = 0 ] >> 18:[ start_y = 0 ] 345 17:[ local padding = 32 ] >> 19:[ padding = 32 ] 358 18:[ local buttonspecs = { ] >> 20:[ buttonspecs = { ] 399 20:[ y_off = start_y, ] >> 22:[ y_off: start_y, ] 416 21:[ text = "Create Troupe" ] >> 23:[ text: "Create Troupe" ] 460 24:[ y_off = start_y + 64 + padding, ] >> 26:[ y_off: start_y + 64 + padding, ] 492 25:[ text = "Join Troupe" ] >> 27:[ text: "Join Troupe" ] 358 27:[ } ] >> 20:[ buttonspecs = { ] 514 28:[ mod.load = function() ] >> 32:[ mod.load = () -> ] 532 29:[ print("creating main menu") ] >> 33:[ print("creating main menu") ] 561 30:[ main.root("screen"):append(mod.node) ] >> 34:[ main.root("screen")\append(mod.node) ] 622 31:[ for name, button_tbl in pairs(buttonspecs) do ] >> 35:[ for name, button_tbl in pairs buttonspecs ] 643 32:[ local button_extra = ui.create_big_button(mod.node, 6, start_x, button_tbl.y_off) ] >> 36:[ button_extra = ui.create_big_button(mod.node,6,start_x,button_tbl.y_off) ] 718 33:[ button_extra.node:append(am.translate(start_x + ((nwidth * section_width) / 2), button_tbl.y_off - 32) ^ am.text(button_tbl.text, color.fg)) ] >> 37:[ button_extra.node\append(am.translate(start_x+((nwidth*section_width)/2),button_tbl.y_off - 32)^ am.text(button_tbl.text,color.fg)) ] 852 34:[ mod[name] = button_extra ] >> 38:[ mod[name] = button_extra ] 599 35:[ end ] >> 35:[ for name, button_tbl in pairs buttonspecs ] 878 36:[ local touch_indicator = am.group() ] >> 39:[ touch_indicator = am.group! ] 907 37:[ local touch_cursor = am.sprite("data/cursor.png", vec4(1, 1, 1, 1), "left", "top") ] >> 40:[ touch_cursor = am.sprite("data/cursor.png",vec4(1,1,1,1),"left","top") ] 979 38:[ local touch_loc = am.translate(0, 0) ^ touch_cursor ] >> 41:[ touch_loc = am.translate(0,0)^ touch_cursor ] 1024 39:[ touch_indicator:append(touch_loc) ] >> 42:[ touch_indicator\append(touch_loc) ] 1059 40:[ mod.node:append(am.translate(0, -150) ^ am.scale(3) ^ am.text("Fools Rush In")) ] >> 43:[ mod.node\append(am.translate(0,-150)^ am.scale(3)^ am.text("Fools Rush In")) ] 1137 41:[ mod.node:action("click_interpreter", coroutine.create(function() ] >> 44:[ mod.node\action("click_interpreter",coroutine.create(()-> ] 1202 42:[ while true do ] >> 45:[ while true ] 1211 43:[ print("Main menu loop") ] >> 46:[ print("Main menu loop") ] 1240 44:[ if #main.win:active_touches() > 0 then ] >> 47:[ if #main.win\active_touches! > 0 ] 1275 45:[ local touch = main.win:touch_position(1) ] >> 48:[ touch = main.win\touch_position(1) ] 1314 46:[ touch_cursor.color = vec4(1, 1, 1, 1) ] >> 49:[ touch_cursor.color = vec4(1,1,1,1) ] 1353 47:[ touch_loc.x = touch.x ] >> 50:[ touch_loc.x = touch.x ] 1379 48:[ touch_loc.y = touch.y ] >> 51:[ touch_loc.y = touch.y ] 1405 49:[ local col_but = bp.check(touch.x, touch.y + 64) ] >> 52:[ col_but = bp.check(touch.x, touch.y+64) ] 1451 50:[ if #col_but > 0 then ] >> 53:[ if #col_but > 0 ] 1470 51:[ touch_cursor.color = vec4(0.5, 0.5, 0.5, 0.5) ] >> 54:[ touch_cursor.color = vec4(0.5,0.5,0.5,0.5) ] 1449 52:[ end ] >> 53:[ if #col_but > 0 ] 1519 53:[ if #col_but > 0 then ] >> 55:[ if #col_but > 0 ] 1538 54:[ print("Collided with button:", col_but) ] >> 56:[ print("Collided with button:",col_but) ] 1582 55:[ print("mod.create prty was:", mod.create_party) ] >> 57:[ print("mod.create prty was:",mod.create_party) ] 1636 56:[ if col_but[1] == mod.create_party then ] >> 58:[ if col_but[1] == mod.create_party ] 1674 57:[ print("Creating party") ] >> 59:[ print("Creating party") ] 1704 58:[ local create_party = require("create_party_menu") ] >> 60:[ create_party = require "create_party_menu" ] 1753 59:[ table.insert(main.action_queue, { ] >> 61:[ table.insert(main.action_queue,{create_party.load, {}}) ] 1785 60:[ create_party.load, ] >> 61:[ table.insert(main.action_queue,{create_party.load, {}}) ] 1753 62:[ }) ] >> 61:[ table.insert(main.action_queue,{create_party.load, {}}) ] 1815 63:[ mod.unload() ] >> 62:[ mod.unload! ] 1833 64:[ coroutine.yield() ] >> 63:[ coroutine.yield! ] 1861 65:[ elseif col_but[1] == mod.join_party then ] >> 64:[ elseif col_but[1] == mod.join_party ] 1897 66:[ print("Joining party") ] >> 65:[ print("Joining party") ] 1926 67:[ local join_party = require("join_party_menu") ] >> 66:[ join_party = require "join_party_menu" ] 1971 68:[ table.insert(main.action_queue, { ] >> 67:[ table.insert(main.action_queue,{join_party.load, {}}) ] 2003 69:[ join_party.load, ] >> 67:[ table.insert(main.action_queue,{join_party.load, {}}) ] 1971 71:[ }) ] >> 67:[ table.insert(main.action_queue,{join_party.load, {}}) ] 2031 72:[ mod.unload() ] >> 68:[ mod.unload! ] 2049 73:[ coroutine.yield() ] >> 69:[ coroutine.yield! ] 1517 75:[ end ] >> 55:[ if #col_but > 0 ] 2078 77:[ touch_cursor.color = vec4(0, 0, 0, 0) ] >> 71:[ touch_cursor.color = vec4(0,0,0,0) ] 2116 79:[ coroutine.yield() ] >> 72:[ coroutine.yield! ] 1197 80:[ end ] >> 45:[ while true ] 1137 81:[ end)) ] >> 44:[ mod.node\action("click_interpreter",coroutine.create(()-> ] 2138 82:[ return mod.node:append(touch_indicator) ] >> 74:[ mod.node\append(touch_indicator) ] 514 83:[ end ] >> 32:[ mod.load = () -> ] 2172 84:[ mod.unload = function() ] >> 76:[ mod.unload = () -> ] 2192 85:[ main.root("screen"):remove(mod.node) ] >> 77:[ main.root("screen")\remove(mod.node) ] 2230 86:[ bp.remove(mod.create_party) ] >> 78:[ bp.remove(mod.create_party) ] 2259 87:[ return bp.remove(mod.join_party) ] >> 79:[ bp.remove(mod.join_party) ] 2172 88:[ end ] >> 76:[ mod.unload = () -> ] 2286 89:[ return mod ] >> 81:[ mod ]