{"id":"hollower233/uitoolkit","name":"uitoolkit","scope":"hollower233","platform":"roblox","description":"Cross-project reusable client UI utilities: button click sound, multi-device auto adapt, and a generic UI module manager scaffold.","version":"0.2.1","latest":"0.2.1","versions":["0.1.0","0.2.0","0.2.1"],"license":"MIT","licenseRating":"safe","licenseCaveats":[],"licenseVerified":true,"dependencies":{"1foreverhd/topbarplus":{"version":"^3.4.0","alias":"TopbarPlus"}},"integrity":"c6e023b2fc3173b72ffe20ad3b7a9a4eea56ee496e8248fccc102159a3a90d13","likes":0,"downloads":0,"install":"forest install hollower233/uitoolkit","url":"https://forest.dev/p/roblox/hollower233/uitoolkit","files":"https://api.forest.dev/ai/package/roblox/hollower233/uitoolkit/files","readme":"# UIToolkit\n\nA shared Wally package of cross-project reusable client UI utilities for Roblox experiences.\n\n## Installation\n\n```toml\n[dependencies]\nUIToolkit = \"hollower233/uitoolkit@0.2.1\"\n```\n\nRun `wally install`, then require the package from the generated `Packages` folder.\n\n## Client usage\n\n```lua\nlocal UIToolkit = require(game.ReplicatedStorage.Packages.UIToolkit)\n\n-- Zero-config, call once each on the client:\nUIToolkit.client.initClickSound()\nUIToolkit.client.initDeviceAdapt()\n\n-- Generic \"scan a folder of UI modules, require + two-phase Init them\" scaffold:\nlocal handle = UIToolkit.client.initUIManager(someFolder, { \"SomeScreenGui\", \"AnotherScreenGui\" })\nhandle.Get(\"SomeModuleName\")\nhandle.SetScreenGuiEnabled(\"SomeScreenGui\", false)\n\n-- Zero-config, call once on the client:\nUIToolkit.client.initFeedbackButton()\n```\n\n### `initClickSound()`\n\nAutomatically binds a click sound to every `GuiButton` under the local player's `PlayerGui` (present and future), skipping `JumpButton` and any button with the `noAutoSound` attribute set to a truthy value. Looks for `ReplicatedStorage.音效素材.通用点击音效` first, falls back to a bundled sound asset.\n\n### `initDeviceAdapt()`\n\nAutomatically scans `PlayerGui` for newly added `ScreenGui`s and shrinks (never enlarges) oversized panels to fit the viewport's safe area, using a `UIScale` instance so it never fights panel-open/close tweens that animate `Size`.\n\n### `initUIManager(folder, screenGuiNames?)`\n\nA generic \"module manager\" scaffold, intended to be wrapped by a project-specific module that knows its own folder and `ScreenGui` dependencies:\n\n1. Waits for each name in `screenGuiNames` to appear under the local player's `PlayerGui`.\n2. Warns for any `StarterGui` `ScreenGui` left with `ResetOnSpawn` enabled.\n3. `require`s every `ModuleScript` directly under `folder`.\n4. Calls `.Init()` on every required module that has one (all modules are required first, so `.Init()` implementations can safely `Get` each other).\n5. Returns a handle: `Get(name)` returns a required module by its instance name; `SetScreenGuiEnabled(guiName, enabled)` toggles a `ScreenGui` under the local player's `PlayerGui`.\n\nThis function carries no project-specific assumptions — it only knows about the `folder` and `screenGuiNames` you pass it, so it can be called more than once for different folders if needed.\n\n### `initFeedbackButton()`\n\nDisplays a left-aligned `TopbarPlus` icon and opens Roblox's feedback prompt (`SocialService:PromptFeedbackSubmissionAsync()`) when selected. Calling it more than once returns the existing icon without creating another one. Pulls in `TopbarPlus` as a transitive dependency — projects that only need `initClickSound`/`initDeviceAdapt`/`initUIManager` still receive it via `wally install`, even if they never call this function.\n\n## License\n\nMIT. See [LICENSE](LICENSE).\n","readmeTruncated":false}