From cba91fbcf9862118c4c02924af9aedfc70904fc3 Mon Sep 17 00:00:00 2001 From: dbrooks-roblox <42393327+dbrooks-roblox@users.noreply.github.com> Date: Wed, 31 Jul 2019 12:38:51 -0700 Subject: [PATCH] Add Enabled and OnTopOfCoreBlur to ScreenGui (#206) * Add Enabled prop to ScreenGui This change adds the Enabled property to ScreenGui to facilitate writing tests with more modern API. * Add OnTopOfCoreBlur to ScreenGui * Add tests for ScreenGui/Enabled+OnTopOfCoreBlur Add missing unit tests for ScreenGui. --- lib/instances/ScreenGui.lua | 6 ++++++ lib/instances/ScreenGui_spec.lua | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/instances/ScreenGui.lua b/lib/instances/ScreenGui.lua index a015d19..1baa6c8 100644 --- a/lib/instances/ScreenGui.lua +++ b/lib/instances/ScreenGui.lua @@ -49,4 +49,10 @@ ScreenGui.properties.Enabled = InstanceProperty.typed("boolean", { end, }) +ScreenGui.properties.OnTopOfCoreBlur = InstanceProperty.typed("boolean", { + getDefault = function() + return false + end, +}) + return ScreenGui diff --git a/lib/instances/ScreenGui_spec.lua b/lib/instances/ScreenGui_spec.lua index f9b01ed..59f091d 100644 --- a/lib/instances/ScreenGui_spec.lua +++ b/lib/instances/ScreenGui_spec.lua @@ -18,6 +18,8 @@ describe("instances.ScreenGui", function() assert.equals(typeof(instance.AutoLocalize), "boolean") assert.equals(typeof(instance.IgnoreGuiInset), "boolean") assert.equals(typeof(instance.ZIndexBehavior), "EnumItem") + assert.equals(typeof(instance.OnTopOfCoreBlur), "boolean") + assert.equals(typeof(instance.Enabled), "boolean") assert.equals(instance.ZIndexBehavior.EnumType, ZIndexBehavior) end) -end) \ No newline at end of file +end)