local p="\078\101\120\117\115\084\101\120\116\066\111\120"local u=(require(script.Parent.Parent.Parent:WaitForChild("\078\101\120\117\115\080\108\117\103\105\110\070\114\097\109\101\119\111\114\107\080\114\111\106\101\099\116"))):GetContext(script)local L=u:GetResource("\066\097\115\101\046\078\101\120\117\115\087\114\097\112\112\101\100\073\110\115\116\097\110\099\101")local i=L:Extend()i:SetClassName(p)u:SetContextResource(i)function i.__new(u)u:InitializeSuper("\084\101\120\116\066\111\120")u.Name=p;(u:GetPropertyChangedSignal("\068\105\115\097\098\108\101\100")):Connect(function()if u.Disabled then u:ReleaseFocus()end end)u.Focused:Connect(function()if u.Disabled then u:ReleaseFocus()end end)u.BackgroundColor3="\073\110\112\117\116\070\105\101\108\100\066\097\099\107\103\114\111\117\110\100"u.BorderColor3="\073\110\112\117\116\070\105\101\108\100\066\111\114\100\101\114"u.TextColor3="\077\097\105\110\084\101\120\116"u.PlaceholderColor3="\068\105\109\109\101\100\084\101\120\116"u.TextXAlignment="\076\101\102\116"u.Font="\083\111\117\114\099\101\083\097\110\115"u.TextSize=14 u.ClearTextOnFocus=false u.ClipsDescendants=true end return i
--[[
TheNexusAvenger

Text box that disables input functionality when disabled.
--]]

local CLASS_NAME = "NexusTextBox"



local NexusPluginFramework = require(script.Parent.Parent.Parent:WaitForChild("NexusPluginFrameworkProject")):GetContext(script)
local NexusWrappedInstance = NexusPluginFramework:GetResource("Base.NexusWrappedInstance")

local NexusTextBox = NexusWrappedInstance:Extend()
NexusTextBox:SetClassName(CLASS_NAME)
NexusPluginFramework:SetContextResource(NexusTextBox)



--[[
Creates a Nexus Text Box object.
--]]
function NexusTextBox:__new()
	self:InitializeSuper("TextBox")
	self.Name = CLASS_NAME
	
	--Set up input disabling.
	self:GetPropertyChangedSignal("Disabled"):Connect(function()
		if self.Disabled then
			self:ReleaseFocus()
		end
	end)
	
	self.Focused:Connect(function()
		if self.Disabled then
			self:ReleaseFocus()
		end
	end)
	
	--Set the defaults.
	self.BackgroundColor3 = "InputFieldBackground"
	self.BorderColor3 = "InputFieldBorder"
	self.TextColor3 = "MainText"
	self.PlaceholderColor3 = "DimmedText"
	self.TextXAlignment = "Left"
	self.Font = "SourceSans"
	self.TextSize = 14
	self.ClearTextOnFocus = false
	self.ClipsDescendants = true
end



return NexusTextBox