From 41c6c52f01081457ca4fd139eb8c5c8d26499d87 Mon Sep 17 00:00:00 2001 From: Sir Mallard <73789875+SirMallard@users.noreply.github.com> Date: Tue, 6 Aug 2024 23:28:49 +0100 Subject: [PATCH] Added PopupBg colour to demo. --- lib/demoWindow.lua | 1 + stories/dev.story.lua | 68 ------------------------------------------- 2 files changed, 1 insertion(+), 68 deletions(-) delete mode 100644 stories/dev.story.lua diff --git a/lib/demoWindow.lua b/lib/demoWindow.lua index 0c2496a..4784442 100644 --- a/lib/demoWindow.lua +++ b/lib/demoWindow.lua @@ -812,6 +812,7 @@ return function(Iris: Types.Iris) "Text", "TextDisabled", "WindowBg", + "PopupBg", "ScrollbarGrab", "TitleBg", "TitleBgActive", diff --git a/stories/dev.story.lua b/stories/dev.story.lua deleted file mode 100644 index b19aaa4..0000000 --- a/stories/dev.story.lua +++ /dev/null @@ -1,68 +0,0 @@ -local ReplicatedStorage = game:GetService("ReplicatedStorage") -local Types = require(ReplicatedStorage.Iris.Types) - -local function render(Iris: Types.Iris) - Iris.MenuBar() - do - Iris.Menu({ "A very long menu name for very little content!" }) - do - Iris.MenuItem({ "T" }) - end - Iris.End() - end - Iris.End() - - Iris.Window({ "Dev" }) - do - Iris.ComboArray({ "Array" }, {}, { "abcdefghijklmnopqrstuvwxyz", "1234567890", "i ii iii iv v vi vii viii ix x", "ABCDEFGHIJKLMNOPQSTUVWXYZ", ". .. ... .... ....." }) - Iris.ComboArray({ "Array", true }, {}, { "abcdefghijklmnopqrstuvwxyz", "1234567890", "i ii iii iv v vi vii viii ix x", "ABCDEFGHIJKLMNOPQSTUVWXYZ", ". .. ... .... ....." }) - Iris.ComboArray({ "Array", nil, true }, {}, { "abcdefghijklmnopqrstuvwxyz", "1234567890", "i ii iii iv v vi vii viii ix x", "ABCDEFGHIJKLMNOPQSTUVWXYZ", ". .. ... .... ....." }) - - local progress = Iris.State(0) - - -- formula to cycle between 0 and 100 linearly - local newValue = math.clamp((math.abs((os.clock() * 15) % 100 - 50)) - 7.5, 0, 35) / 35 - progress:set(newValue) - - Iris.InputText({ "Input" }) - Iris.Checkbox({ "Checkbox\nCheckbox\nCheckbox\nCheckbox" }) - Iris.RadioButton({ "Radio\nRadio\nRadio\nRadio" }) - Iris.ProgressBar({ "Progress\nProgress\nProgress\nProgress" }, { progress = progress }) - end - Iris.End() -end - -return function(parent: GuiObject) - local Iris: Types.Iris = require(ReplicatedStorage.Iris) - local Input = require(script.Parent.UserInputService) - - Input.SinkFrame.Parent = parent - - Iris.Internal._utility.UserInputService = Input - Iris.UpdateGlobalConfig({ - UseScreenGUIs = false, - }) - Iris.Internal._utility.GuiOffset = Input.SinkFrame.AbsolutePosition - Iris.Internal._utility.MouseOffset = Input.SinkFrame.AbsolutePosition - Input.SinkFrame:GetPropertyChangedSignal("AbsolutePosition"):Connect(function() - Iris.Internal._utility.GuiOffset = Input.SinkFrame.AbsolutePosition - Iris.Internal._utility.MouseOffset = Input.SinkFrame.AbsolutePosition - end) - - Iris.Init(parent) - - -- Actual Iris code here: - Iris:Connect(function() - render(Iris) - end) - - return function() - Iris.Shutdown() - - for _, connection in Input._connections do - connection:Disconnect() - end - - Input.SinkFrame:Destroy() - end -end