local F=8 local t={NONE=Vector2.new(512,0),INFO=Vector2.new(0,512),WARNING=Vector2.new(512,512),ERROR=Vector2.new(512,512)}local l={ERROR=Color3.new(1.0,0,0);WARNING=Color3.new(1.0,.66666666666667,0),INFO=Color3.new(0,.66666666666667,1.0),NONE=Color3.new(0,.66666666666667,0)}local B=require((script.Parent.Parent:WaitForChild("\078\101\120\117\115\073\110\115\116\097\110\099\101")):WaitForChild("\078\101\120\117\115\073\110\115\116\097\110\099\101"))local A=B:Extend()A:SetClassName("\084\101\115\116\086\105\101\119")function A.__new(B,t,l)B:InitializeSuper()B.Test=t local A=Instance.new("\070\114\097\109\101")A.BackgroundTransparency=.5 A.BackgroundColor3=Color3.new(0,0,0)A.Size=UDim2.new(1,-12,1/F,0)A.SizeConstraint=Enum.SizeConstraint.RelativeXX A.Parent=l B.Container=A local U=Instance.new("\085\073\067\111\114\110\101\114")U.CornerRadius=UDim.new(.1,0)U.Parent=A local v=Instance.new("\073\109\097\103\101\076\097\098\101\108")v.BackgroundTransparency=1 v.Position=UDim2.new(.1/F,0,.1,0)v.Size=UDim2.new(.8,0,.8,0)v.SizeConstraint=Enum.SizeConstraint.RelativeYY v.Name="\073\099\111\110"v.Image="\104\116\116\112\058\047\047\119\119\119\046\114\111\098\108\111\120\046\099\111\109\047\097\115\115\101\116\047\063\105\100\061\055\049\051\049\053\056\055\053\057\048"v.ImageRectSize=Vector2.new(512,512)v.Parent=A B.Icon=v local W=Instance.new("\084\101\120\116\076\097\098\101\108")W.BackgroundTransparency=1 W.Size=UDim2.new(1-2.1/F,0,.6,0)W.Position=UDim2.new(1.05/F,0,.05,0)W.Name="\073\115\115\117\101\084\101\120\116"W.Font=Enum.Font.SourceSansBold W.TextColor3=Color3.new(1,1,1)W.TextStrokeColor3=Color3.new(0,0,0)W.TextStrokeTransparency=0 W.TextScaled=true W.TextXAlignment=Enum.TextXAlignment.Left W.TextTruncate=Enum.TextTruncate.AtEnd W.Parent=A B.IssueText=W local j=Instance.new("\084\101\120\116\076\097\098\101\108")j.BackgroundTransparency=1 j.Size=UDim2.new(1-2.1/F,0,.4,0)j.Position=UDim2.new(1.05/F,0,.55,0)j.Name="\073\115\115\117\101\084\101\120\116"j.Font=Enum.Font.SourceSansBold j.TextColor3=Color3.new(1,1,1)j.TextStrokeColor3=Color3.new(0,0,0)j.TextStrokeTransparency=0 j.TextScaled=true j.TextXAlignment=Enum.TextXAlignment.Left j.TextTruncate=Enum.TextTruncate.AtEnd j.Parent=A B.StatusText=j local b=Instance.new("\084\101\120\116\066\117\116\116\111\110")b.BackgroundColor3=Color3.new(0,.66666666666667,1.0)b.Name="\073\110\102\111"b.Size=UDim2.new(.7,0,.7,0)b.Position=UDim2.new(1-.85/F,0,.15,0)b.SizeConstraint=Enum.SizeConstraint.RelativeYY b.Text="\063"b.Font=Enum.Font.SourceSansBold b.TextColor3=Color3.new(1,1,1)b.TextStrokeColor3=Color3.new(0,0,0)b.TextStrokeTransparency=0 b.TextScaled=true b.Parent=A B.InfoButton=b local w=Instance.new("\085\073\067\111\114\110\101\114")w.CornerRadius=UDim.new(.2,0)w.Parent=b B.Test.Changed:Connect(function()B:Update()end)B:Update()end function A.Update(F)F.Icon.ImageRectOffset=t[F.Test.Icon]or Vector2.new(0,0)F.Icon.ImageColor3=l[F.Test.Icon]or Color3.new(.8,.8,.8)F.IssueText.Name=F.Test.Name F.IssueText.Text=F.Test.Name F.StatusText.Text=F.Test.Status F.StatusText.TextColor3=l[F.Test.Icon]or Color3.new(.8,.8,.8)end return A
--[[
TheNexusAvenger

Displays the results of a test.
--]]

local VIEW_ASPECT_RATIO = 8
local ICON_TO_POSITION = {
    NONE = Vector2.new(512,0),
    INFO = Vector2.new(0,512),
    WARNING = Vector2.new(512,512),
    ERROR = Vector2.new(512,512),
}
local ICON_TO_COLOR = {
    ERROR = Color3.new(255/255,0,0),
    WARNING = Color3.new(255/255,170/255,0),
    INFO = Color3.new(0,170/255,255/255),
    NONE = Color3.new(0,170/255,0),
}



local NexusInstance = require(script.Parent.Parent:WaitForChild("NexusInstance"):WaitForChild("NexusInstance"))

local TestView = NexusInstance:Extend()
TestView:SetClassName("TestView")



--[[
Creates the view.
--]]
function TestView:__new(Test,Parent)
    self:InitializeSuper()
    self.Test = Test

    --Create the frames.
    local Container = Instance.new("Frame")
    Container.BackgroundTransparency = 0.5
    Container.BackgroundColor3 = Color3.new(0,0,0)
    Container.Size = UDim2.new(1,-12,1/VIEW_ASPECT_RATIO,0)
    Container.SizeConstraint = Enum.SizeConstraint.RelativeXX
    Container.Parent = Parent
    self.Container = Container

    local ContainerUICorner = Instance.new("UICorner")
    ContainerUICorner.CornerRadius = UDim.new(0.1,0)
    ContainerUICorner.Parent = Container

    local Icon = Instance.new("ImageLabel")
    Icon.BackgroundTransparency = 1
    Icon.Position = UDim2.new(0.1/VIEW_ASPECT_RATIO,0,0.1,0)
    Icon.Size = UDim2.new(0.8,0,0.8,0)
    Icon.SizeConstraint = Enum.SizeConstraint.RelativeYY
    Icon.Name = "Icon"
    Icon.Image = "http://www.roblox.com/asset/?id=7131587590"
    Icon.ImageRectSize = Vector2.new(512,512)
    Icon.Parent = Container
    self.Icon = Icon

    local IssueText = Instance.new("TextLabel")
    IssueText.BackgroundTransparency = 1
    IssueText.Size = UDim2.new(1 - (2.1/VIEW_ASPECT_RATIO),0,0.6,0)
    IssueText.Position = UDim2.new(1.05/VIEW_ASPECT_RATIO,0,0.05,0)
    IssueText.Name = "IssueText"
    IssueText.Font = Enum.Font.SourceSansBold
    IssueText.TextColor3 = Color3.new(1,1,1)
    IssueText.TextStrokeColor3 = Color3.new(0,0,0)
    IssueText.TextStrokeTransparency = 0
    IssueText.TextScaled = true
    IssueText.TextXAlignment = Enum.TextXAlignment.Left
    IssueText.TextTruncate = Enum.TextTruncate.AtEnd
    IssueText.Parent = Container
    self.IssueText = IssueText

    local StatusText = Instance.new("TextLabel")
    StatusText.BackgroundTransparency = 1
    StatusText.Size = UDim2.new(1 - (2.1/VIEW_ASPECT_RATIO),0,0.4,0)
    StatusText.Position = UDim2.new(1.05/VIEW_ASPECT_RATIO,0,0.55,0)
    StatusText.Name = "IssueText"
    StatusText.Font = Enum.Font.SourceSansBold
    StatusText.TextColor3 = Color3.new(1,1,1)
    StatusText.TextStrokeColor3 = Color3.new(0,0,0)
    StatusText.TextStrokeTransparency = 0
    StatusText.TextScaled = true
    StatusText.TextXAlignment = Enum.TextXAlignment.Left
    StatusText.TextTruncate = Enum.TextTruncate.AtEnd
    StatusText.Parent = Container
    self.StatusText = StatusText

    local InfoButton = Instance.new("TextButton")
    InfoButton.BackgroundColor3 = Color3.new(0,170/255,255/255)
    InfoButton.Name = "Info"
    InfoButton.Size = UDim2.new(0.7,0,0.7,0)
    InfoButton.Position = UDim2.new(1 - (0.85/VIEW_ASPECT_RATIO),0,0.15,0)
    InfoButton.SizeConstraint = Enum.SizeConstraint.RelativeYY
    InfoButton.Text = "?"
    InfoButton.Font = Enum.Font.SourceSansBold
    InfoButton.TextColor3 = Color3.new(1,1,1)
    InfoButton.TextStrokeColor3 = Color3.new(0,0,0)
    InfoButton.TextStrokeTransparency = 0
    InfoButton.TextScaled = true
    InfoButton.Parent = Container
    self.InfoButton = InfoButton

    local InfoButtonUICorner = Instance.new("UICorner")
    InfoButtonUICorner.CornerRadius = UDim.new(0.2,0)
    InfoButtonUICorner.Parent = InfoButton

    --Update the test information.
    self.Test.Changed:Connect(function()
        self:Update()
    end)
    self:Update()
end

--[[
Updates the view.
--]]
function TestView:Update()
    self.Icon.ImageRectOffset = ICON_TO_POSITION[self.Test.Icon] or Vector2.new(0,0)
    self.Icon.ImageColor3 = ICON_TO_COLOR[self.Test.Icon] or Color3.new(0.8,0.8,0.8)
    self.IssueText.Name = self.Test.Name
    self.IssueText.Text = self.Test.Name
    self.StatusText.Text = self.Test.Status
    self.StatusText.TextColor3 = ICON_TO_COLOR[self.Test.Icon] or Color3.new(0.8,0.8,0.8)
end



return TestView