//Main HUD for... eh... level select thing
//Made by DarknessStylus

addHook("PreThinkFrame", do
	for p in players.iterate do
		if p.stagegatehudcontrolt == nil or (type(p.stagegatehudcontrolt) ~= "table")
			p.stagegatehudcontrolt = {
				arrows = {
					left = {x = 0, y = 0, scale = 0, trans = 0, inter = 0},
					right = {x = 0, y = 0, scale = 0, trans = 0, inter = 0},
					counter = 0,
					changing = {reset = false, active = false, left = false, right = false, inter = 0, counter = 0}
				},
				maincard = {x = 0, y = 0, scale = 0, trans = 0, inter = 0},
				bottom_card = {x = 0, y = 0, scale = 0, trans = 0, inter = 0},
				top_card = {x = 0, y = 0, scale = 0, trans = 0, inter = 0},
				bottom_shapes = {x = 0, y = 0, scale = 0, trans = 0, inter = 0},
				top_shapes = {x = 0, y = 0, scale = 0, trans = 0, inter = 0},
				backnextst = {x = 0, y = 0, scale = 0, trans = 0, inter = 0},
				playstage = {x = 0, y = 0, scale = 0, trans = 0, inter = 0},
				active = false,
				deactive = false,
				fadecounter = 0
			}
		end
	end
end)

addHook("ThinkFrame", do
	for p in players.iterate do
		if p.mo and p.mo.valid
			local stgth = p.stagegatehudcontrolt
//////////////Fill positions////////////
			//Main card
			stgth.maincard.y = 95*FU
			stgth.maincard.x = ease.inoutsine(stgth.maincard.inter, 0, 145*FU)
			stgth.maincard.scale = ease.insine(stgth.maincard.inter, 0, 25*FU/32)
			stgth.maincard.trans = ease.linear(stgth.maincard.inter, 9, 0)
			//Bottom card
			stgth.bottom_card.y = 148*FU
			stgth.bottom_card.x = ease.inoutsine(stgth.bottom_card.inter, 320*FU, 218*FU)
			stgth.bottom_card.scale = ease.insine(stgth.bottom_card.inter, 0, 25*FU/32)
			stgth.bottom_card.trans = ease.linear(stgth.bottom_card.inter, 9, 0)
			//Top card
			stgth.top_card.y = 62*FU
			stgth.top_card.x = ease.inoutsine(stgth.top_card.inter, 85*FU, 117*FU)
			stgth.top_card.scale = ease.outback(stgth.top_card.inter, 0, 25*FU/32, 5*FU)
			stgth.top_card.trans = ease.linear(stgth.top_card.inter, 9, 0)
			//Bottom shapes
			stgth.bottom_shapes.y = 155*FU
			stgth.bottom_shapes.x = 83*FU
			stgth.bottom_shapes.scale = max(ease.inoutback(stgth.bottom_shapes.inter, 0, 25*FU/32, 5*FU), 0)
			stgth.bottom_shapes.trans = ease.linear(stgth.bottom_shapes.inter, 9, 0)
			//Top shapes
			stgth.top_shapes.y = 56*FU
			stgth.top_shapes.x = 260*FU
			stgth.top_shapes.scale = max(ease.inoutback(stgth.top_shapes.inter, 0, 25*FU/32, 5*FU), 0)
			stgth.top_shapes.trans = ease.linear(stgth.top_shapes.inter, 9, 0)
			//Back/Next
			stgth.backnextst.y = 180*FU
			stgth.backnextst.x = 160*FU
			stgth.backnextst.scale = max(ease.inoutback(stgth.backnextst.inter, 0, 26*FU/32, 5*FU), 0)
			stgth.backnextst.trans = ease.linear(stgth.backnextst.inter, 9, 0)
			//Play Stage
			stgth.playstage.y = 148*FU
			stgth.playstage.x = 222*FU
			stgth.playstage.scale = max(ease.inoutback(stgth.playstage.inter, 0, 25*FU/32, 5*FU), 0)
			stgth.playstage.trans = ease.linear(stgth.playstage.inter, 9, 0)
			//Arrows
			//Left
			stgth.arrows.left.y = 180*FU
			stgth.arrows.left.x = ease.inoutsine(stgth.arrows.left.inter, 160*FU, 80*FU)
			stgth.arrows.left.scale = ease.inoutsine(stgth.arrows.changing.inter, 25*FU/32, 2*FU)
			//Right
			stgth.arrows.right.y = 180*FU
			stgth.arrows.right.x = ease.inoutsine(stgth.arrows.right.inter, 160*FU, 240*FU)
			stgth.arrows.right.scale = ease.inoutsine(stgth.arrows.changing.inter, 25*FU/32, 2*FU)
			//Handle .inter vars here and more
			if p.selectingstage
				stgth.active = true
			else
				if stgth.active
					stgth.deactive = true
				end
			end
			if stgth.active
				if stgth.deactive
					stgth.maincard.inter = max($-8192, 0)
					stgth.bottom_card.inter = max($-6192, 0)
					stgth.top_card.inter = max($-6192, 0)
					stgth.bottom_shapes.inter = max($-5192, 0)
					stgth.top_shapes.inter = max($-5192, 0)
					stgth.backnextst.inter = max($-8192, 0)
					stgth.playstage.inter = max($-8192, 0)
					stgth.arrows.left.trans = min($+1, 9)
					stgth.arrows.right.trans = min($+1, 9)
					//Fade out
					stgth.fadecounter = max($-1, 0)
					if stgth.fadecounter <= 0
						stgth.active = false
						stgth.deactive = false
					end
				else
					stgth.maincard.inter = min($+8192, FU)
					stgth.bottom_card.inter = min($+6192, FU)
					stgth.top_card.inter = min($+4192, FU)
					stgth.bottom_shapes.inter = min($+5192, FU)
					stgth.top_shapes.inter = min($+3192, FU)
					stgth.backnextst.inter = min($+5192, FU)
					stgth.playstage.inter = min($+4192, FU)
					if stgth.backnextst.inter > 2*FU/3
					and not stgth.arrows.changing.active
						//Increase this counter
						if leveltime & 2 == 0
							stgth.arrows.counter = $+1
						end
						//Left arrow
						if stgth.arrows.counter > 0
							//Reset all values
							if stgth.arrows.counter == 1
								stgth.arrows.left.trans = 10
								stgth.arrows.right.trans = 10
								stgth.arrows.left.inter = 0
								stgth.arrows.right.inter = 0
							end
							//Trans and more
							if stgth.arrows.counter <= 9
							and stgth.arrows.counter > 1
								if stgth.arrows.counter & 2 == 0
									stgth.arrows.left.trans = max($-1, 2)
									stgth.arrows.right.trans = max($-1, 2)
								end
								stgth.arrows.left.inter = min($+(4192/2), FU)
								stgth.arrows.right.inter = min($+(4192/2), FU)
							elseif stgth.arrows.counter > 9
							and stgth.arrows.counter <= 17
								if stgth.arrows.counter & 2 == 0
									stgth.arrows.left.trans = min($+1, 10)
									stgth.arrows.right.trans = min($+1, 10)
								end
								stgth.arrows.left.inter = min($+(4192/2), FU)
								stgth.arrows.right.inter = min($+(4192/2), FU)
							elseif stgth.arrows.counter > 17 --Reset here
								stgth.arrows.counter = 0
							end
						end
					else
						if not stgth.arrows.changing.active
						or stgth.arrows.changing.reset
							stgth.arrows.left.trans = 10
							stgth.arrows.right.trans = 10
							stgth.arrows.left.inter = 0
							stgth.arrows.right.inter = 0
							if stgth.arrows.changing.reset
								stgth.arrows.counter = 0
								stgth.arrows.changing.counter = 0
								stgth.arrows.changing.reset = false
							end
						else
							stgth.arrows.changing.counter = $+1
							if stgth.arrows.changing.left
								stgth.arrows.right.trans = 10
								stgth.arrows.right.inter = 0
								stgth.arrows.left.inter = min($+16192, 2*FU/3)
								if stgth.arrows.changing.counter <= 5
									stgth.arrows.left.trans = max($-1, 0)
									stgth.arrows.changing.inter = min($+8192, FU)
								else
									stgth.arrows.left.trans = min($+2, 10)
									stgth.arrows.changing.inter = max($-8192, 0)
								end
								if stgth.arrows.changing.counter > 10
									stgth.arrows.changing.left = false
									stgth.arrows.changing.active = false
									stgth.arrows.changing.counter = 0
								end
							end
							if stgth.arrows.changing.right
								stgth.arrows.left.trans = 10
								stgth.arrows.left.inter = 0
								stgth.arrows.right.inter = min($+16192, 2*FU/3)
								if stgth.arrows.changing.counter <= 5
									stgth.arrows.right.trans = max($-1, 0)
									stgth.arrows.changing.inter = min($+8192, FU)
								else
									stgth.arrows.right.trans = min($+2, 10)
									stgth.arrows.changing.inter = max($-8192, 0)
								end
								if stgth.arrows.changing.counter > 10
									stgth.arrows.changing.right = false
									stgth.arrows.changing.active = false
									stgth.arrows.changing.counter = 0
								end
							end
						end
					end
					//Fade in
					stgth.fadecounter = min($+1, 15)
				end
			end
		end
	end
end)

local function LevelSelectT(v, p)
	if not (p.mo and p.mo.valid) then return end
	local stgth = p.stagegatehudcontrolt
	local savet = p.savetimetable
	if stgth.active
		//Fade
		v.fadeScreen(0xFF00, stgth.fadecounter)
		//Main card
		v.drawScaled(stgth.maincard.x, stgth.maincard.y, stgth.maincard.scale, v.cachePatch("STAGSLCT1"), (stgth.maincard.trans<<V_ALPHASHIFT)|V_PERPLAYER)
		//Bottom card
		v.drawScaled(stgth.bottom_card.x, stgth.bottom_card.y, stgth.bottom_card.scale, v.cachePatch("STAGSLCT3"), (stgth.bottom_card.trans<<V_ALPHASHIFT)|V_PERPLAYER)
		//Top card
		v.drawScaled(stgth.top_card.x, stgth.top_card.y, stgth.top_card.scale, v.cachePatch("STAGSLCT2"), (stgth.top_card.trans<<V_ALPHASHIFT)|V_PERPLAYER)
		//Bottom shapes
		v.drawScaled(stgth.bottom_shapes.x, stgth.bottom_shapes.y, stgth.bottom_shapes.scale, v.cachePatch("STAGSLCT6"), (stgth.bottom_shapes.trans<<V_ALPHASHIFT)|V_PERPLAYER)
		//Top shapes
		v.drawScaled(stgth.top_shapes.x, stgth.top_shapes.y, stgth.top_shapes.scale, v.cachePatch("STAGSLCT7"), (stgth.top_shapes.trans<<V_ALPHASHIFT)|V_PERPLAYER)
		//Play Stage
		v.drawScaled(stgth.playstage.x, stgth.playstage.y, stgth.playstage.scale, v.cachePatch("STAGSLCT4"), (stgth.playstage.trans<<V_ALPHASHIFT)|V_PERPLAYER)
		//Arrows
		if stgth.arrows.left.trans < 10
			v.drawScaled(stgth.arrows.left.x, stgth.arrows.left.y, stgth.arrows.left.scale, v.cachePatch("STAGSLCT11"), (stgth.arrows.left.trans<<V_ALPHASHIFT)|V_SNAPTOBOTTOM|V_PERPLAYER)
		end
		if stgth.arrows.right.trans < 10
			v.drawScaled(stgth.arrows.right.x, stgth.arrows.right.y, stgth.arrows.right.scale, v.cachePatch("STAGSLCT10"), (stgth.arrows.right.trans<<V_ALPHASHIFT)|V_SNAPTOBOTTOM|V_PERPLAYER)
		end
		//Back/Next
		v.drawScaled(stgth.backnextst.x, stgth.backnextst.y, stgth.backnextst.scale, v.cachePatch("STAGSLCT8"), (stgth.backnextst.trans<<V_ALPHASHIFT)|V_SNAPTOBOTTOM|V_PERPLAYER)
		//Map image
		if v.cachePatch(G_BuildMapName(p.mapselected)+"P") ~= v.cachePatch("MISSING")
			v.drawStretched(stgth.maincard.x+((34*stgth.maincard.scale)-50000), stgth.maincard.y-((19*stgth.maincard.scale)+8000), 17*stgth.maincard.scale/35, (17*stgth.maincard.scale/35)+800, v.cachePatch(G_BuildMapName(p.mapselected)+"P"), (stgth.maincard.trans<<V_ALPHASHIFT)|V_PERPLAYER)
		end
		//Level Title
		local mapname = mapheaderinfo[p.mapselected].lvlttl
		local mapzone = " Zone"	
		if mapheaderinfo[p.mapselected].levelflags & LF_NOZONE
			mapzone = ""
		end
		local mapact = ""
		if mapheaderinfo[p.mapselected].actnum
			mapact = "Act "+"\130"+mapheaderinfo[p.mapselected].actnum
		end
		if mapheaderinfo[p.mapselected].levelflags & LF_WARNINGTITLE
			mapact = "\133Boss Act"
		end
		v.drawScaledNameTag(stgth.top_card.x-(48*stgth.top_card.scale), stgth.top_card.y-(7*stgth.top_card.scale), mapname, (stgth.top_card.trans<<V_ALPHASHIFT)|V_PERPLAYER, 11*stgth.top_card.scale/29, SKINCOLOR_WHITE, SKINCOLOR_BLACK)
		v.drawScaledNameTag(stgth.top_card.x-(48*stgth.top_card.scale), stgth.top_card.y+(2*stgth.top_card.scale), mapact, (stgth.top_card.trans<<V_ALPHASHIFT)|V_PERPLAYER, 11*stgth.top_card.scale/29, SKINCOLOR_BLUE, SKINCOLOR_BLACK)
		//Best saved time and score
		local score = string.reverse(tostring(savet.score))
		local timet = tostring(savet.timet)
		if savet.score > 0
			if score:len() == 1
				for i = 1, 7 do
					v.drawScaled((stgth.maincard.x+(18*stgth.maincard.scale)) - i*(6*FU), stgth.maincard.y+(9*stgth.maincard.scale), stgth.maincard.scale, v.cachePatch("NUMBER0"))
				end
			end
			if score:len() == 2
				for i = 1, 6 do
					v.drawScaled((stgth.maincard.x+(10*stgth.maincard.scale)) - i*(6*FU), stgth.maincard.y+(9*stgth.maincard.scale), stgth.maincard.scale, v.cachePatch("NUMBER0"))
				end
			end
			if score:len() == 3
				for i = 1, 5 do
					v.drawScaled((stgth.maincard.x-(1*stgth.maincard.scale)) - i*(6*FU), stgth.maincard.y+(9*stgth.maincard.scale), stgth.maincard.scale, v.cachePatch("NUMBER0"))
				end
			end
			if score:len() == 4
				for i = 1, 4 do
					v.drawScaled((stgth.maincard.x-(9*stgth.maincard.scale)) - i*(6*FU), stgth.maincard.y+(9*stgth.maincard.scale), stgth.maincard.scale, v.cachePatch("NUMBER0"))
				end
			end
			if score:len() == 5
				for i = 1, 3 do
					v.drawScaled((stgth.maincard.x-(17*stgth.maincard.scale)) - i*(6*FU), stgth.maincard.y+(9*stgth.maincard.scale), stgth.maincard.scale, v.cachePatch("NUMBER0"))
				end
			end
			if score:len() == 6
				for i = 1, 2 do
					v.drawScaled((stgth.maincard.x-(24*stgth.maincard.scale)) - i*(6*FU), stgth.maincard.y+(9*stgth.maincard.scale), stgth.maincard.scale, v.cachePatch("NUMBER0"))
				end
			end
			if score:len() == 7
				v.drawScaled((stgth.maincard.x-(32*stgth.maincard.scale)) - 1*(6*FU), stgth.maincard.y+(9*stgth.maincard.scale), stgth.maincard.scale, v.cachePatch("NUMBER0"))
			end
			for i = 1, score:len() do
				local x = (stgth.maincard.x+(14*stgth.maincard.scale)) - i*(6*FU)
				local number = "NUMBER" .. score:sub(i, i)
				local patch = v.cachePatch(number)
				x = $ + patch.width*(stgth.maincard.scale)
				v.drawScaled(x, stgth.maincard.y+(9*stgth.maincard.scale), stgth.maincard.scale, patch)
			end
		else
			for i = 1, 8 do
				v.drawScaled((stgth.maincard.x+(15*stgth.maincard.scale)) - i*(5*FU), stgth.maincard.y+(9*stgth.maincard.scale), stgth.maincard.scale, v.cachePatch("NUMBER-"))
			end
		end
		if savet.timet > 0
			local timetr = savet.timet or 0
			local mili = tostring(G_TicsToMilliseconds(timet))
			local seconds = tostring(G_TicsToSeconds(timet))
			local minutest = tostring(G_TicsToMinutes(timetr))
			local seclen = string.reverse(seconds)
			local minlen = string.reverse(minutest)
			local mililen = string.reverse(mili)
			if tonumber(mili) > 0
				if mililen:len() == 1
					v.drawScaled((stgth.maincard.x+(13*stgth.maincard.scale)) - 2*(5*FU), stgth.maincard.y+(39*stgth.maincard.scale), stgth.maincard.scale, v.cachePatch("NUMBER0"))
					v.drawScaled((stgth.maincard.x+(13*stgth.maincard.scale)) - 3*(5*FU), stgth.maincard.y+(39*stgth.maincard.scale), stgth.maincard.scale, v.cachePatch("NUMBER0"))
				elseif mililen:len() == 2
					v.drawScaled((stgth.maincard.x+(13*stgth.maincard.scale)) - 2*(5*FU), stgth.maincard.y+(39*stgth.maincard.scale), stgth.maincard.scale, v.cachePatch("NUMBER0"))
				end
				for i = 1, mililen:len() do
					local x = (stgth.maincard.x+(15*stgth.maincard.scale)) - i*(6*FU)
					local number = "NUMBER" .. mililen:sub(i, i)
					local patch = v.cachePatch(number)
					x = $ + patch.width*(stgth.maincard.scale)
					v.drawScaled(x, stgth.maincard.y+(39*stgth.maincard.scale), stgth.maincard.scale, patch)
				end
			else
				v.drawScaled((stgth.maincard.x+(15*stgth.maincard.scale)) - 3*(5*FU), stgth.maincard.y+(39*stgth.maincard.scale), stgth.maincard.scale, v.cachePatch("NUMBER0"))
				v.drawScaled((stgth.maincard.x+(15*stgth.maincard.scale)) - 2*(5*FU), stgth.maincard.y+(39*stgth.maincard.scale), stgth.maincard.scale, v.cachePatch("NUMBER0"))
				v.drawScaled((stgth.maincard.x+(15*stgth.maincard.scale)) - 1*(5*FU), stgth.maincard.y+(39*stgth.maincard.scale), stgth.maincard.scale, v.cachePatch("NUMBER0"))
			end
			if tonumber(seconds) > 0
				if seclen:len() == 1
					v.drawScaled((stgth.maincard.x+(17*stgth.maincard.scale)) - 6*(5*FU), stgth.maincard.y+(39*stgth.maincard.scale), stgth.maincard.scale, v.cachePatch("NUMBER0"))
				end
				for it = 1, seclen:len() do
					local x = (stgth.maincard.x-(14*stgth.maincard.scale)) - it*(6*FU)
					local number2 = "NUMBER" .. seclen:sub(it, it)
					local patch2 = v.cachePatch(number2)
					x = $ + patch2.width*(stgth.maincard.scale)
					v.drawScaled(x, stgth.maincard.y+(39*stgth.maincard.scale), stgth.maincard.scale, patch2)
				end
			else
				v.drawScaled((stgth.maincard.x+(15*stgth.maincard.scale)) - 6*(5*FU), stgth.maincard.y+(39*stgth.maincard.scale), stgth.maincard.scale, v.cachePatch("NUMBER0"))
				v.drawScaled((stgth.maincard.x+(15*stgth.maincard.scale)) - 5*(5*FU), stgth.maincard.y+(39*stgth.maincard.scale), stgth.maincard.scale, v.cachePatch("NUMBER0"))
			end
			if tonumber(minutest) > 0
				for i = 1, minlen:len() do
					local x = (stgth.maincard.x-(35*stgth.maincard.scale)) - i*(6*FU)
					local number = "NUMBER" .. minlen:sub(i, i)
					local patch = v.cachePatch(number)
					x = $ + patch.width*(stgth.maincard.scale)
					v.drawScaled(x, stgth.maincard.y+(39*stgth.maincard.scale), stgth.maincard.scale, patch)
				end
			else
				v.drawScaled((stgth.maincard.x+(17*stgth.maincard.scale)) - 8*(5*FU), stgth.maincard.y+(39*stgth.maincard.scale), stgth.maincard.scale, v.cachePatch("NUMBER0"))
			end
			v.drawScaled((stgth.maincard.x+(14*stgth.maincard.scale)) - 7*(5*FU), stgth.maincard.y+(39*stgth.maincard.scale), stgth.maincard.scale, v.cachePatch("NUMBERDOUDO"))
			v.drawScaled((stgth.maincard.x+(16*stgth.maincard.scale)) - 4*(5*FU), stgth.maincard.y+(39*stgth.maincard.scale), stgth.maincard.scale, v.cachePatch("NUMBERDOUDO"))
		else
			v.drawScaled((stgth.maincard.x+(15*stgth.maincard.scale)) - 8*(5*FU), stgth.maincard.y+(39*stgth.maincard.scale), stgth.maincard.scale, v.cachePatch("NUMBER-"))
			v.drawScaled((stgth.maincard.x+(15*stgth.maincard.scale)) - 7*(5*FU), stgth.maincard.y+(39*stgth.maincard.scale), stgth.maincard.scale, v.cachePatch("NUMBERDOUDO"))
			v.drawScaled((stgth.maincard.x+(15*stgth.maincard.scale)) - 6*(5*FU), stgth.maincard.y+(39*stgth.maincard.scale), stgth.maincard.scale, v.cachePatch("NUMBER-"))
			v.drawScaled((stgth.maincard.x+(15*stgth.maincard.scale)) - 5*(5*FU), stgth.maincard.y+(39*stgth.maincard.scale), stgth.maincard.scale, v.cachePatch("NUMBER-"))
			v.drawScaled((stgth.maincard.x+(15*stgth.maincard.scale)) - 4*(5*FU), stgth.maincard.y+(39*stgth.maincard.scale), stgth.maincard.scale, v.cachePatch("NUMBERDOUDO"))
			v.drawScaled((stgth.maincard.x+(15*stgth.maincard.scale)) - 3*(5*FU), stgth.maincard.y+(39*stgth.maincard.scale), stgth.maincard.scale, v.cachePatch("NUMBER-"))
			v.drawScaled((stgth.maincard.x+(15*stgth.maincard.scale)) - 2*(5*FU), stgth.maincard.y+(39*stgth.maincard.scale), stgth.maincard.scale, v.cachePatch("NUMBER-"))
			v.drawScaled((stgth.maincard.x+(15*stgth.maincard.scale)) - 1*(5*FU), stgth.maincard.y+(39*stgth.maincard.scale), stgth.maincard.scale, v.cachePatch("NUMBER-"))
		end
		//Buttons
		v.drawScaledNameTag(10*stgth.top_card.scale, 150*stgth.top_card.scale, "Jump", (stgth.top_card.trans<<V_ALPHASHIFT)|V_PERPLAYER|V_SNAPTOLEFT|V_SNAPTOBOTTOM, 11*stgth.top_card.scale/22, SKINCOLOR_GREEN, SKINCOLOR_BLACK)
		v.drawScaledNameTag(20*stgth.top_card.scale, 160*stgth.top_card.scale, "Accept", (stgth.top_card.trans<<V_ALPHASHIFT)|V_PERPLAYER|V_SNAPTOLEFT|V_SNAPTOBOTTOM, 11*stgth.top_card.scale/29, SKINCOLOR_WHITE, SKINCOLOR_BLACK)
		v.drawScaledNameTag(370*stgth.bottom_shapes.scale, 150*stgth.bottom_shapes.scale, "Spin", (stgth.top_card.trans<<V_ALPHASHIFT)|V_PERPLAYER|V_SNAPTORIGHT|V_SNAPTOBOTTOM, 11*stgth.bottom_shapes.scale/22, SKINCOLOR_RED, SKINCOLOR_BLACK)
		v.drawScaledNameTag(360*stgth.bottom_shapes.scale, 160*stgth.bottom_shapes.scale, "Cancel", (stgth.top_card.trans<<V_ALPHASHIFT)|V_PERPLAYER|V_SNAPTORIGHT|V_SNAPTOBOTTOM, 11*stgth.bottom_shapes.scale/29, SKINCOLOR_WHITE, SKINCOLOR_BLACK)
		v.drawScaledNameTag(10*stgth.top_shapes.scale, 170*stgth.top_shapes.scale, "Custom 2", (stgth.top_card.trans<<V_ALPHASHIFT)|V_PERPLAYER|V_SNAPTOLEFT|V_SNAPTOBOTTOM, 11*stgth.bottom_card.scale/22, SKINCOLOR_YELLOW, SKINCOLOR_BLACK)
		v.drawScaledNameTag(20*stgth.top_shapes.scale, 180*stgth.top_shapes.scale, "Change Act", (stgth.top_card.trans<<V_ALPHASHIFT)|V_PERPLAYER|V_SNAPTOLEFT|V_SNAPTOBOTTOM, 11*stgth.bottom_card.scale/29, SKINCOLOR_WHITE, SKINCOLOR_BLACK)
	end
end

hud.add(LevelSelectT)