{"id":"coffilhg/guicompatibility","name":"guicompatibility","scope":"coffilhg","platform":"roblox","description":"Useful for detecting GUI Insets","version":"2.0.0","latest":"2.0.0","versions":["1.0.0","2.0.0"],"license":"MPL-2.0","licenseRating":"caution","licenseCaveats":["File-level copyleft: if you modify this package's own source files, those modified files must be made available under MPL-2.0. Using it unmodified in a closed-source game is fine."],"licenseVerified":true,"dependencies":{"coffilhg/reaction":{"version":"^1.1.1","alias":"Reaction"}},"integrity":"fd15f5555f7dc0766de8e07501236705dd855e24c72aead03b5c93257f37c8f8","likes":0,"downloads":0,"install":"forest install coffilhg/guicompatibility","url":"https://forest.dev/p/roblox/coffilhg/guicompatibility","files":"https://api.forest.dev/ai/package/roblox/coffilhg/guicompatibility/files","readme":"# GUICompatibility\n\nUseful for detecting GUI Insets\n\n\n\n## Available Here!\n- **[This repository](src/init.luau) ~ [src/init.luau](src/init.luau)**\n- **[Wally](<https://wally.run/package/coffilhg/guicompatibility>)**\n\n    ```toml\n    GUICompatibility = \"coffilhg/guicompatibility@2.0.0\"\n    ```\n- **[Rotriever](<https://github.com/Coffilhg/Useful-Modules/releases/tag/vGUICompatibility/2.0.0>)**\n\n    ```toml\n    GUICompatibility = \"github.com/Coffilhg/Useful-Modules@GUICompatibility/2.0.0\"\n    ```\n\n\n\n---\n\n## Example place\nThe Example place is self explanatory: change a ScreenGui's properties from the panel on the left and watch the pointer stay under your mouse/finger (try it with Studio's Device Emulator too).\n\n1. Clone this branch\n    ```\n    git clone -b GUICompatibility https://github.com/Coffilhg/Useful-Modules.git GUICompatibility\n    cd GUICompatibility\n    ```\n2. Install the tools and packages (rokit required)\n    ```\n    rokit install\n    wally install\n    ```\n3. Serve the example place\n    ```\n    rojo serve test.project.json\n    ```\n4. Open a new Baseplate in Roblox Studio, connect with the Rojo plugin and press Play\n\n![The Example place on a Samsung Galaxy S25 Ultra in the Roblox Studio Device Emulator. A control panel on the left shows the Target ScreenGui, whose properties are changed by clicking the rows: ScreenInsets CoreUISafeInsets, IgnoreGuiInset false, SafeAreaCompatibility None and ClipToDeviceSafeArea false. Below them it reads the Target's own AbsolutePosition 0, 0 and AbsoluteSize 685, 280 (the area below the TopBar), \"GuiInsetSize(): 58\", the value of the V returned by GetGuiInsetSize, \"Pointer offset: 465, 92\", the Position of the pink pointer, which is the latest InputObject.Position plus TargetOffset, and \"TargetOffset(): 0, 0\", the V returned by TrackInputOffsetUDim2 for the Target, equal to minus its AbsolutePosition. A thin blue outline marks the Target ScreenGui's area, with a small yellow square at its center. A small pink square, the pointer, sits exactly under the mouse on the right, showing that input position plus TargetOffset is correct. At the top, a green frame covers the TopBar behind the Roblox buttons, its width is GuiService.TopbarInset.Min.X and it's placed with the Example ScreenGui's own TrackInputOffsetUDim2 offset. A black label at the top center reads \"58 px\", that's the GuiInsetSize from GetGuiInsetSize, the height of the TopBar. At the bottom, a purple bar labeled \"Device safe area width (DeviceSafeInsets): 685 px\" shows the X of GetFullscreenAbsoluteSize, the camera's ViewportSize. Behind it, a wider yellow bar labeled \"Whole screen width (ScreenInsets.None): 779 px, unsafe margins: 94 px\" sticks out on both sides by the (half of) unsafe margins, the X of GetSafeInsetsSize added to the viewport width. Below them, a black label reads \"21 px\", the Y of GetSafeInsetsSize, the unsafe height at the top and bottom of the device.](./images/example.png \"Example Place Preview\")\n\nThe script is in [tests/init.server.luau](tests/init.server.luau).\n\n---\n\n## License & Attribution\n\nThis module is licensed under the **Mozilla Public License 2.0 (MPL-2.0)**.\n\n#### What this means for Roblox Developers:\n* **Use & Modify:** You can freely use this module in any public, private, or commercial Roblox game.\n* **File-Level Copyleft:** If you modify the source code of this module itself, you must make your modified version of the module publicly available under the MPL 2.0.\n* **No Viral Code Leakage:** Including this module in your game does **not** force you to open-source your other game scripts, UI layouts, or proprietary codebase. \n\nSee the full terms in the [LICENSE](LICENSE) file.\n\nAttribution to all dependencies is included in [Notice](NOTICE)\n\nCopyright © 2026 @Coffilhg (Roblox UserId 517222346)","readmeTruncated":false}