MaterialR - UI Framework

This UI Module Is what start UI Designers need! Great work!

:+1:

1 Like

Quick Suggestion for it.
I changed the mouse click to:

local connection

local Disabled, dColor = UDim2.new(0, 3, 0.5, 0), Color3.fromRGB(129, 129, 129)
local Enabled, eColor = UDim2.new(0.64, -3, 0.5, 0), Color3.fromRGB(143, 63, 193)

local function toggle(ui)
	if ui:WaitForChild("Switch").ImageColor3 == dColor then
		ui:WaitForChild("Switch"):WaitForChild("Circle"):TweenPosition(Enabled, "Out", "Quint", .3, true)
		ui:WaitForChild("Switch").ImageColor3 = eColor
		return true
	else
		ui:WaitForChild("Switch").ImageColor3 = dColor
		ui:WaitForChild("Switch"):WaitForChild("Circle"):TweenPosition(Disabled, "In", "Quint", .3, true)
		return false
	end
end

return function(ui, bindable)
	if connection then connection:Disconnect() end
	
	connection = ui:WaitForChild("Switch"):WaitForChild("Circle").MouseButton1Click:Connect(function()
		bindable:Fire(toggle(ui))
	end)
	connection = ui:WaitForChild("Switch").MouseButton1Click:Connect(function()
		bindable:Fire(toggle(ui))
	end)
end

Basically, what it does it when you toggle the switch; it also returns the status of the swicth; so that you can do this:

switch.MouseButton1Click:Connect(function(toggle)
	if toggle == true then
		print("Switch Enabled")
	end
	if toggle == false then
		print("Switch Disabled")
	end
end)
2 Likes

I usually program so I am bad at UI so this helps a lot I don’t know if I will use it yet though because I don’t like writing code to see the UI after playing if there was a plugin that uses it I would use it

This is already implemented in 2.0

Perfect.
Thanks.
Do you have an ETA with 2.0?

Suggestion:
Add Dropdown Boxes to MaterialR.

1 Like

Hey guys, sorry about the lack of updates. Here is some additional updates on the MaterialR rewrite:

MaterialR is still supported. The rewrite will most likely be finished in 2 weeks. If you have any additional feedback for features you’d like to see in the new version, leave a reply here.

3 Likes

Will the support for Roact be included with the rewrite?

2 Likes

I’ll consider this after I finish the core of the rewrite

1 Like

When I press the link given, I guess nothing comes out, the link is broken

Fixed the link, (Ver 1.0) MaterialPlus | Create professional looking interface for your games