local assets = {}

local nAssets = {}
for key,value in pairs(assets) do nAssets[key] = value nAssets[assets[key].id] = assets[key] end
assets = nAssets
nAssets = nil

local slides = {
  {
    y = 21,
    x = 65,
    w = 51,
    h = 19,
    objs = {
      {
        color = 512,
        y2 = 19,
        y1 = 1,
        x1 = 1,
        type = "rect",
        event = {
          mouse_up = {
            [ 2 ] = -1,
          },
          mouse_click = {
            [ 2 ] = -1,
          },
          focus = {
            [ 2 ] = -1,
          },
          render = {
            [ 2 ] = -1,
          },
          update = {
            [ 2 ] = -1,
          },
          Coroutine = {
            [ 2 ] = -1,
          },
        },
        ox2 = 0,
        x2 = 51,
        border = {
          color = 0,
          type = 1,
        },
        snap = {
          Top = "Snap top",
          Right = "Snap right",
          Left = "Snap left",
          Bottom = "Snap bottom",
        },
        oy2 = 0,
      },
      {
        x2 = 42,
        y2 = 9,
        x1 = 11,
        ox1 = 15,
        oy1 = 3,
        type = "rect",
        event = {
          mouse_up = {
            [ 2 ] = -1,
          },
          mouse_click = {
            [ 2 ] = -1,
          },
          focus = {
            [ 2 ] = -1,
          },
          render = {
            [ 2 ] = -1,
          },
          update = {
            [ 2 ] = -1,
          },
          Coroutine = {
            [ 2 ] = -1,
          },
        },
        ox2 = -16,
        border = {
          color = 0,
          type = 1,
        },
        color = 512,
        y1 = 7,
        oy2 = 1,
        snap = {
          Top = "Snap center",
          Right = "Snap center",
          Left = "Snap center",
          Bottom = "Snap center",
        },
        image = {
          {
            "",
            "TT0TTT0TT0TT0TT0TTTTTTTTTTTTTTT",
            "T0T000T00T00T00TT00000000000000",
          },
          {
            "",
            "TTTT0T0TT0TT0T00TT0TTTT0TTTTT00",
            "00T0T0T00T00T0TT00T0000T00000TT",
          },
          {
            "",
            "00T00000000TT00000T00000000T000",
            "TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT",
          },
        },
      },
      {
        x2 = 33,
        y2 = 13,
        x1 = 19,
        ox1 = 7,
        oy1 = -2,
        type = "rect",
        event = {
          mouse_up = {
            [ 2 ] = -1,
          },
          mouse_click = {
            [ 2 ] = -1,
          },
          focus = {
            [ 2 ] = -1,
          },
          render = {
            [ 2 ] = -1,
          },
          update = {
            [ 2 ] = -1,
          },
          Coroutine = {
            [ 2 ] = -1,
          },
        },
        ox2 = -7,
        border = {
          color = 0,
          type = 1,
        },
        color = 512,
        y1 = 12,
        oy2 = -3,
        snap = {
          Top = "Snap center",
          Right = "Snap center",
          Left = "Snap center",
          Bottom = "Snap center",
        },
        image = {
          {
            "",
            "T0T0T0T000000T0",
            "0T0T0T0TTTTTT0T",
          },
        },
      },
      {
        x2 = 44,
        y2 = 17,
        x1 = 8,
        ox1 = 18,
        oy1 = 2,
        txt = "Please press \"File\" and select \"Test\"",
        type = "text",
        event = {
          mouse_up = {
            [ 2 ] = -1,
          },
          mouse_click = {
            [ 2 ] = -1,
          },
          focus = {
            [ 2 ] = -1,
          },
          render = {
            [ 2 ] = -1,
          },
          update = {
            [ 2 ] = -1,
          },
          Coroutine = {
            [ 2 ] = -1,
          },
        },
        ox2 = -18,
        y1 = 17,
        border = {
          color = 0,
          type = 1,
        },
        color = 0,
        input = false,
        txtcolor = 1,
        snap = {
          Top = "Snap bottom",
          Right = "Snap center",
          Left = "Snap center",
          Bottom = "Snap bottom",
        },
        oy2 = 2,
      },
    },
    c = 1,
  },
  {
    y = 21,
    x = 65,
    w = 51,
    h = 19,
    objs = {},
    c = 2,
  },
}

for s=1,#slides do
	local slide = slides[s]
	for o=1,#slide.objs do
		local obj = slide.objs[o]
		for key,value in pairs(obj.event) do
			if assets[ value[2] ] then
				lUtils.shapescape.addScript(obj,value[2],key,assets,LevelOS,slides)
			else
				obj.event[key] = {function() end,-1}
			end
		end
	end
end

	local tArgs = {...}
if tArgs[1] and tArgs[1] == "load" then
	return {assets=assets,slides=slides}
end


return lUtils.shapescape.run(slides,...)