{"id":"synthranger/iris","name":"iris","scope":"synthranger","platform":"roblox","description":"https://github.com/Michael-48/Iris","version":"0.1.1","latest":"0.1.1","versions":["0.1.1"],"license":"MIT","licenseRating":"safe","licenseCaveats":[],"licenseVerified":true,"dependencies":{},"integrity":"c357026f12a78c2f79f502b84df9585ece74b71b0f82ae247521b198989559d8","likes":0,"downloads":0,"install":"forest install synthranger/iris","url":"https://forest.dev/p/roblox/synthranger/iris","files":"https://api.forest.dev/ai/package/roblox/synthranger/iris/files","readme":"### Try the demo: https://www.roblox.com/games/11145814918/Iris-Demonstration\r\n\r\n# Iris\r\nIris is an Immediate mode GUI Library for Roblox, Based on [Dear ImGui](https://github.com/ocornut/imgui). It aims to solve the same problems as Dear ImGui. It is fast, portable, and self-contained (no external dependencies).\r\n\r\nwhat is Dear ImGui, and why is it important?\r\n<sub>Dear ImGui is best known for its widespread use for developing debug UI. Using the Dear ImGui paradigm (Immediate Mode), UI is remarkably easy. Because of this, Dear ImGui has seen adoption in almost every major game engine, including Unity and Unreal Engine (and now Roblox!).</sub>\r\n\r\nIris favors simplicity and productivity; It is designed to simplify UI, streamlining the process for creating visualization, debug tools, and data input. To accomplish this, Iris offers a different approach to Roblox UI than existing libraries, lacking certain features commonly found in more intricate UI libraries. Iris opts to supercede the Roblox UI API, instead offering a streamlined Immediate-Mode library and a set of widgets to empower developers to create UI easily.\r\n\r\n### Usage\r\nThe Iris release comes as an rbxm or zip file. You can import the rbxm into any roblox project, and begin creating UI in any client side script. No external dependences are needed. Iris can be used in any kind of Roblox UI, including PlayerGui, CoreGui, BillboardGui, SurfaceGui, and PluginGui.\r\n\r\nHeres a basic Example:\r\n```lua\r\nlocal StarterPlayerScripts = game.StarterPlayer.StarterPlayerScripts\r\nlocal Iris = require(StarterPlayerScripts.Client.Iris).Init()\r\n\r\nIris:Connect(function()\r\n    Iris.Window({\"My First Window!\"})\r\n        Iris.Text({\"Hello, World\"})\r\n        Iris.Button({\"Save\"})\r\n        Iris.InputNum({\"Input\"})\r\n    Iris.End()\r\nend)\r\n```\r\n<div align=\"center\">\r\n    <img src=\"https://raw.githubusercontent.com/Michael-48/Iris/main/assets/simpleDarkExample.png\" alt=\"Sample Display Output\"/>\r\n</div>\r\n\r\nAnd a more complex Example:\r\n```lua\r\nlocal StarterPlayerScripts = game.StarterPlayer.StarterPlayerScripts\r\nlocal Iris = require(StarterPlayerScripts.Client.Iris).Init()\r\n\r\nIris:Connect(function()\r\n\t-- use a unique window size, rather than default\r\n\tlocal windowSize = Iris.State(Vector2.new(300, 400))\r\n\r\n\tIris.Window({\"My Second Window\"}, {size = windowSize})\r\n\t\tIris.Text({\"The current time is: \" .. os.clock()})\r\n\r\n\t\tIris.InputText({\"Enter Text\"})\r\n\r\n\t\tif Iris.Button({\"Click me\"}).clicked then\r\n\t\t\tprint(\"button was clicked\")\r\n\t\tend\r\n\r\n\t\tIris.Table({1})\r\n\t\t\tfor i = 0, 9 do\r\n\t\t\t\tIris.Button({\"Button - \" .. i})\r\n                Iris.NextColumn()\r\n\t\t\tend\r\n\t\tIris.End()\r\n\tIris.End()\r\nend)\r\n```\r\n<div align=\"center\">\r\n    <img src=\"https://raw.githubusercontent.com/Michael-48/Iris/main/assets/complexDarkExample.png\" alt=\"Sample Display Output\"/>\r\n</div>\r\n\r\nThe appearance of Iris is fully customizable; colors, fonts, transparencies, and layout are all customizable. By default, Iris comes with a dark theme and light theme, as well as 2 layout themes.\r\n\r\n```lua\r\nIris.UpdateGlobalConfig(Iris.TemplateConfig.colorLight)\r\nIris.UpdateGlobalConfig(Iris.TemplateConfig.sizeClear)\r\n\r\nIris:Connect(Iris.ShowDemoWindow)\r\n```\r\n<div align=\"center\">\r\n    <img src=\"https://raw.githubusercontent.com/Michael-48/Iris/main/assets/simpleLightExample.png\" alt=\"Sample Display Output\"/>\r\n</div>\r\n\r\nFinally, Iris comes with a demo window, `Iris.ShowDemoWindow`. This window demonstrates the functionality of every aspect of the library, and contains useful utilities, a style editor and a runtime information window. It is the most useful reference that you and other coders will want to refer to.\r\n<div align=\"center\">\r\n    <img src=\"https://raw.githubusercontent.com/Michael-48/Iris/main/assets/demoWindow.png\" alt=\"Sample Display Output\"/>\r\n</div>\r\n\r\n### How it Works\r\nIris is an immediate mode UI library, as opposed to retained mode.\r\n\r\nIn a retained mode model, you might make a button and connect a clicked event, with code that is invoked when the event happens. The button is retained in the DataModel, and to change the text on it you need to store a reference to it.\r\n\r\nBut in an immediate mode model, call the button function and check if it's been clicked immediately, and you do that every single frame (60 times per second). There's no need for a clicked event or to store a reference to the button.\r\n\r\nCheck out the Dear ImGuis [About the IMGUI paradigm](https://github.com/ocornut/imgui/wiki/About-the-IMGUI-paradigm) section if you want to understand the core principles behind the IMGUI paradigm.\r\n\r\n### Credits\r\nDeveloped By [Michael_48](https://github.com/Michael-48). Design, Inspriation, Docs and Feedback: [Omar Cornut](https://www.miracleworld.net/), [Evaera](https://github.com/evaera), and [JakeyWasTaken](https://github.com/JakeyWasTaken). Thanks!","readmeTruncated":false}