#include-once

Func gui_Info($output)
	Local $pInfo = lookupSteamId($output)

	If IsArray($pInfo) Then
		Global $GUi
		Local $overlayWidth = 312, $overlayHeight = 154, $pos = WinGetPos($GUi)

		$GUI2 = GUICreate("INFO (" & $output & ")", $overlayWidth, $overlayHeight, $pos[0] + 20, $pos[1] + 20, BitXOR($GUI_SS_DEFAULT_GUI, $WS_MINIMIZEBOX))
			If $pInfo[4] = "Y" Then
				GUISetBkColor(0xE33F35)
			Else
				GUISetBkColor(0x518652)
			EndIf
		$bClose = GUICtrlCreateButton("OK", 120, 125, 65, 25, $BS_CENTER)
			GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
			GuiCtrlSetState(-1, 512)
		$gStatus = GUICtrlCreateLabel("Status:", 24, 12, 48, 17)
			GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
			GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
		$oStatus = GUICtrlCreateLabel($pInfo[0], 72, 12, 215, 17)
			GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
		$gNick = GUICtrlCreateLabel("Nick:", 24, 36, 48, 17)
			GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
			GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
		$oCc = GUICtrlCreatePic("", 72, 36, 50, 17)
			_ResourceSetImageToCtrl($oCc, $pInfo[7] & ".png", $RT_RCDATA)
			GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
			GUICtrlSetTip($oCc, StringUpper($pInfo[7]))
		$oNick = GUICtrlCreateLabel($pInfo[1], 93, 36, 215, 17)
			GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
		$gReason = GUICtrlCreateLabel("Reason:", 24, 60, 48, 17)
			GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
			GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
		$oReason = GUICtrlCreateLabel($pInfo[2], 72, 60, 215, 40)
			GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
		$gDate = GUICtrlCreateLabel("Date:", 24, 84, 48, 17)
			GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
			GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
		$oDate = GUICtrlCreateLabel($pInfo[3], 72, 84, 215, 17)
			GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
		$gMod = GUICtrlCreateLabel("Mod:", 120, 84, 48, 17)
			GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
			GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
		$oMod = GUICtrlCreateLabel($pInfo[6], 150, 84, 215, 17)
			GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
		$gVac = GUICtrlCreateLabel("VAC:", 24, 108, 48, 17)
			GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
			GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
		$oVac = GUICtrlCreateLabel($pInfo[5], 72, 108, 215, 17)
			If $pInfo[5] <> "No" And $pInfo[4] = "N" Then
				GUICtrlSetBkColor(-1, 0xE33F35)
			Else
				GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
			EndIf
		GUISetState()


		While 1
			; We can only get messages from the second GUI
			Switch GUIGetMsg()
				Case $GUI_EVENT_CLOSE
					GUIDelete($GUI2)
					ExitLoop
				Case $bClose
					GUIDelete($GUI2)
					ExitLoop
			EndSwitch
		WEnd
	ElseIf $pInfo = "ERROR" Then
		MsgBox(16, "ERROR", "Oops!" & @CRLF & "Something went wrong.")
		Return
	EndIf
EndFunc