local t = Def.ActorFrame{
	LoadFont("_tahoma 10px")..{
		InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_TOP+10;diffuse,color("#FFFFFF");horizalign,left;settext,"Env List");
	};
};

for i=1,#envTable do
	--Trace("AJ DEBUG [ScreenEnv]: attempting to access index "..i);
	t[#t+1] = LoadFont("_tahoma 10px")..{
		InitCommand=cmd(x,SCREEN_LEFT+10;y,i*16;diffuse,color("#FFFFFF");horizalign,left);
		OnCommand=function(self)
			if type(envTable[i]) == "table" then
				local temp = envTable[i];
				local contents = "";
				for j=1,#temp do
					--Trace("AJ DEBUG [ScreenEnv]: type of temp["..j.."] is "..type(temp[j]));
					if type(temp[j]) == "boolean" then
						local bResult;
						if temp[j] then bResult = "true";
						else bResult = "false";
						end;
						if j < #temp then
							contents = contents .. bResult .. " , ";
						else
							contents = contents .. bResult;
						end;
					else
						if j < #temp then
							contents = contents .. temp[j] .. ",";
						else
							contents = contents .. temp[j];
						end;
					end;
				end;
				self:settext("env["..i.."] = {".. contents .."}");
			else
				self:settext("env["..i.."] = ".. envTable[i]);
			end;
			--Trace("AJ DEBUG [ScreenEnv]: envTable["..i.."] is "..envTable[i]);
			--Trace("AJ DEBUG [ScreenEnv]: envTable["..i.."] type is "..type(envTable[i]));
		end;
	};
end;

return t;