GE Lua Documentation

Press F to search!

discoverLayouts

Definition


-- @/lua/ge/extensions/gameplay/missions/missionScreen.lua:1028
M.discoverLayouts = function()
  M.savedLayouts = {}
  for _, file in ipairs(FS:findFiles("/gameplay/testing", "*.json", 1, false, true)) do
    local layout = jsonReadFile(file)
    layout.filePath = file
    local dir, fn, ext = path.split(file)
    layout.fileName = fn
    layout.isSaved = true
    table.insert(M.savedLayouts, layout)
  end
end

Callers

@/lua/ge/extensions/gameplay/missions/missionScreen.lua
    if not M.savedLayouts then
      M.discoverLayouts()
    end
    if im.Button("Discover Layouts") then
      M.discoverLayouts()
    end
      if layoutsChanged then
        M.discoverLayouts()
      end