-- Private Methods


function init(self)
	local button = self.Button
	local listFrame = self.ListFrame
	
	--local function contentSizeUpdate()
	--	local absSize = button.AbsoluteSize
	--	local ratio = absSize.y / absSize.x
		
	--	button.Arrow.Size = UDim2.new(ratio, 0, 1, 0)
	--	button.Option.Size = UDim2.new(1 - ratio, -12, 1, 0)
	--end
	
	--contentSizeUpdate()
	--self._Maid:Mark(button:GetPropertyChangedSignal("AbsoluteSize"):Connect(contentSizeUpdate))
	
	for i, optionButton in next, listFrame.ScrollFrame:GetChildren() do
		if not optionButton:IsA("GuiButton") then
			continue
		end
		
		self._Options[i] = optionButton
		optionButton.Activated:Connect(function()
			self:Set(optionButton)
		end)
	end

	self._Maid:Mark(button.Activated:Connect(function()
		self:Show(not listFrame.Visible)
	end))
	
	self._Maid:Mark(UIS.InputBegan:Connect(function(input)
		if (VALID_PRESS[input.UserInputType]) then
			local p = input.Position
			local p2 = Vector2.new(p.x, p.y)
			
			if (listFrame.Visible and not (isInFrame(listFrame, p2) or isInFrame(button, p2))) then
				self:Show(false)
			end
		end
	end))
end

function isInFrame(frame, pos)
	local fPos = frame.AbsolutePosition
	local fSize = frame.AbsoluteSize
	local d = pos - fPos
	return (d.x >= 0 and d.x <= fSize.x and d.y >= 0 and d.y <= fSize.y)
end
