cluaupp 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/LICENSE +21 -0
- package/README.md +119 -0
- package/bin/cluau.js +4 -0
- package/bin/cluaupp.js +4 -0
- package/docs/README.md +20 -0
- package/docs/architecture.md +110 -0
- package/docs/cli.md +69 -0
- package/docs/comparison.md +37 -0
- package/docs/config.md +31 -0
- package/docs/cpp-advanced.md +71 -0
- package/docs/cpp-const.md +52 -0
- package/docs/cpp-organization.md +61 -0
- package/docs/cpp-safety.md +58 -0
- package/docs/cpp-types.md +66 -0
- package/docs/getting-started.md +169 -0
- package/docs/intro.md +37 -0
- package/docs/libraries.md +77 -0
- package/docs/roblox-api.md +81 -0
- package/docs/syntax.md +131 -0
- package/include/cluaupp/datatypes.hpp +581 -0
- package/include/cluaupp/generated/enums.hpp +4920 -0
- package/include/cluaupp/generated/instances.hpp +12489 -0
- package/include/cluaupp/libs/chrono.hpp +26 -0
- package/include/cluaupp/libs/cmdr.hpp +16 -0
- package/include/cluaupp/libs/dataservice.hpp +141 -0
- package/include/cluaupp/libs/display.hpp +13 -0
- package/include/cluaupp/libs/ezvisual.hpp +18 -0
- package/include/cluaupp/libs/formatnumber.hpp +15 -0
- package/include/cluaupp/libs/fusion.hpp +41 -0
- package/include/cluaupp/libs/iris.hpp +40 -0
- package/include/cluaupp/libs/janitor.hpp +35 -0
- package/include/cluaupp/libs/math.hpp +14 -0
- package/include/cluaupp/libs/module3d.hpp +25 -0
- package/include/cluaupp/libs/net.hpp +42 -0
- package/include/cluaupp/libs/promise.hpp +30 -0
- package/include/cluaupp/libs/spring.hpp +18 -0
- package/include/cluaupp/libs/statemachine.hpp +19 -0
- package/include/cluaupp/libs/stickybillboard.hpp +14 -0
- package/include/cluaupp/libs/topbarplus.hpp +29 -0
- package/include/cluaupp/libs/twinkle.hpp +15 -0
- package/include/cluaupp/libs/vfx.hpp +13 -0
- package/include/cluaupp/libs.hpp +25 -0
- package/include/cluaupp/roblox.hpp +28 -0
- package/package.json +65 -0
- package/runtime/ArrayIndexer/init.luau +144 -0
- package/runtime/Chrono/Client/ClientClock.luau +202 -0
- package/runtime/Chrono/Client/InterpolationBuffer.luau +74 -0
- package/runtime/Chrono/Client/ModelResolver.luau +53 -0
- package/runtime/Chrono/Client/Player.luau +113 -0
- package/runtime/Chrono/Client/Receiver.luau +395 -0
- package/runtime/Chrono/Client/Replicate.luau +333 -0
- package/runtime/Chrono/Client/Sender.luau +205 -0
- package/runtime/Chrono/LICENSE +21 -0
- package/runtime/Chrono/Server/EntityGrid.luau +299 -0
- package/runtime/Chrono/Server/Player.luau +141 -0
- package/runtime/Chrono/Server/Receiver.luau +287 -0
- package/runtime/Chrono/Server/Replicate.luau +415 -0
- package/runtime/Chrono/Server/Sender.luau +306 -0
- package/runtime/Chrono/Server/ServerClock.luau +50 -0
- package/runtime/Chrono/Shared/ApplyMounts.luau +137 -0
- package/runtime/Chrono/Shared/Bin.luau +31 -0
- package/runtime/Chrono/Shared/ClockUnwrap.luau +70 -0
- package/runtime/Chrono/Shared/Config.luau +264 -0
- package/runtime/Chrono/Shared/Entity.luau +1016 -0
- package/runtime/Chrono/Shared/Events.luau +39 -0
- package/runtime/Chrono/Shared/Holder.luau +210 -0
- package/runtime/Chrono/Shared/InterpolationMath.luau +51 -0
- package/runtime/Chrono/Shared/ModelHelper.luau +122 -0
- package/runtime/Chrono/Shared/Remotes/ClientClockRelay.model.json +3 -0
- package/runtime/Chrono/Shared/Remotes/ClientHeartbeat.model.json +3 -0
- package/runtime/Chrono/Shared/Remotes/ClientLoaded.model.json +3 -0
- package/runtime/Chrono/Shared/Remotes/Death.model.json +3 -0
- package/runtime/Chrono/Shared/Remotes/Heartbeat.model.json +3 -0
- package/runtime/Chrono/Shared/Remotes/Replicate.model.json +3 -0
- package/runtime/Chrono/Shared/Remotes/ReplicateFull.model.json +3 -0
- package/runtime/Chrono/Shared/Remotes/SafeReplicate.model.json +3 -0
- package/runtime/Chrono/Shared/ReplicationRules.luau +122 -0
- package/runtime/Chrono/Shared/Signal.luau +219 -0
- package/runtime/Chrono/Shared/Snapshots.luau +218 -0
- package/runtime/Chrono/Shared/Stats.luau +204 -0
- package/runtime/Chrono/Shared/Ticker.luau +112 -0
- package/runtime/Chrono/Shared/Types.luau +247 -0
- package/runtime/Chrono/Shared/Warn.luau +33 -0
- package/runtime/Chrono/Shared/_CUSTOM_MODEL_REP/init.model.json +3 -0
- package/runtime/Chrono/_impl/Client/ClientClock.luau +202 -0
- package/runtime/Chrono/_impl/Client/InterpolationBuffer.luau +74 -0
- package/runtime/Chrono/_impl/Client/ModelResolver.luau +53 -0
- package/runtime/Chrono/_impl/Client/Player.luau +113 -0
- package/runtime/Chrono/_impl/Client/Receiver.luau +395 -0
- package/runtime/Chrono/_impl/Client/Replicate.luau +333 -0
- package/runtime/Chrono/_impl/Client/Sender.luau +205 -0
- package/runtime/Chrono/_impl/LICENSE +21 -0
- package/runtime/Chrono/_impl/Server/EntityGrid.luau +299 -0
- package/runtime/Chrono/_impl/Server/Player.luau +141 -0
- package/runtime/Chrono/_impl/Server/Receiver.luau +287 -0
- package/runtime/Chrono/_impl/Server/Replicate.luau +415 -0
- package/runtime/Chrono/_impl/Server/Sender.luau +306 -0
- package/runtime/Chrono/_impl/Server/ServerClock.luau +50 -0
- package/runtime/Chrono/_impl/Shared/ApplyMounts.luau +137 -0
- package/runtime/Chrono/_impl/Shared/Bin.luau +31 -0
- package/runtime/Chrono/_impl/Shared/ClockUnwrap.luau +70 -0
- package/runtime/Chrono/_impl/Shared/Config.luau +264 -0
- package/runtime/Chrono/_impl/Shared/Entity.luau +1016 -0
- package/runtime/Chrono/_impl/Shared/Events.luau +39 -0
- package/runtime/Chrono/_impl/Shared/Holder.luau +210 -0
- package/runtime/Chrono/_impl/Shared/InterpolationMath.luau +51 -0
- package/runtime/Chrono/_impl/Shared/ModelHelper.luau +122 -0
- package/runtime/Chrono/_impl/Shared/Remotes/ClientClockRelay.model.json +3 -0
- package/runtime/Chrono/_impl/Shared/Remotes/ClientHeartbeat.model.json +3 -0
- package/runtime/Chrono/_impl/Shared/Remotes/ClientLoaded.model.json +3 -0
- package/runtime/Chrono/_impl/Shared/Remotes/Death.model.json +3 -0
- package/runtime/Chrono/_impl/Shared/Remotes/Heartbeat.model.json +3 -0
- package/runtime/Chrono/_impl/Shared/Remotes/Replicate.model.json +3 -0
- package/runtime/Chrono/_impl/Shared/Remotes/ReplicateFull.model.json +3 -0
- package/runtime/Chrono/_impl/Shared/Remotes/SafeReplicate.model.json +3 -0
- package/runtime/Chrono/_impl/Shared/ReplicationRules.luau +122 -0
- package/runtime/Chrono/_impl/Shared/Signal.luau +219 -0
- package/runtime/Chrono/_impl/Shared/Snapshots.luau +218 -0
- package/runtime/Chrono/_impl/Shared/Stats.luau +204 -0
- package/runtime/Chrono/_impl/Shared/Ticker.luau +112 -0
- package/runtime/Chrono/_impl/Shared/Types.luau +247 -0
- package/runtime/Chrono/_impl/Shared/Warn.luau +33 -0
- package/runtime/Chrono/_impl/Shared/_CUSTOM_MODEL_REP/init.model.json +3 -0
- package/runtime/Chrono/_impl/init.luau +96 -0
- package/runtime/Chrono/init.luau +14 -0
- package/runtime/Cmdr/BuiltInCommands/Admin/announce.luau +21 -0
- package/runtime/Cmdr/BuiltInCommands/Admin/announceServer.luau +17 -0
- package/runtime/Cmdr/BuiltInCommands/Admin/ban.luau +59 -0
- package/runtime/Cmdr/BuiltInCommands/Admin/banServer.luau +30 -0
- package/runtime/Cmdr/BuiltInCommands/Admin/gotoPlace.luau +35 -0
- package/runtime/Cmdr/BuiltInCommands/Admin/gotoPlaceServer.luau +17 -0
- package/runtime/Cmdr/BuiltInCommands/Admin/kick.luau +19 -0
- package/runtime/Cmdr/BuiltInCommands/Admin/kickServer.luau +27 -0
- package/runtime/Cmdr/BuiltInCommands/Admin/kill.luau +13 -0
- package/runtime/Cmdr/BuiltInCommands/Admin/killServer.luau +13 -0
- package/runtime/Cmdr/BuiltInCommands/Admin/respawn.luau +15 -0
- package/runtime/Cmdr/BuiltInCommands/Admin/respawnServer.luau +7 -0
- package/runtime/Cmdr/BuiltInCommands/Admin/teleport.luau +30 -0
- package/runtime/Cmdr/BuiltInCommands/Admin/teleportServer.luau +26 -0
- package/runtime/Cmdr/BuiltInCommands/Admin/unban.luau +26 -0
- package/runtime/Cmdr/BuiltInCommands/Admin/unbanServer.luau +10 -0
- package/runtime/Cmdr/BuiltInCommands/Debug/blink.luau +35 -0
- package/runtime/Cmdr/BuiltInCommands/Debug/fetch.luau +12 -0
- package/runtime/Cmdr/BuiltInCommands/Debug/fetchServer.luau +7 -0
- package/runtime/Cmdr/BuiltInCommands/Debug/getPlayerPlaceInstance.luau +20 -0
- package/runtime/Cmdr/BuiltInCommands/Debug/getPlayerPlaceInstanceServer.luau +28 -0
- package/runtime/Cmdr/BuiltInCommands/Debug/position.luau +30 -0
- package/runtime/Cmdr/BuiltInCommands/Debug/thru.luau +50 -0
- package/runtime/Cmdr/BuiltInCommands/Debug/uptime.luau +6 -0
- package/runtime/Cmdr/BuiltInCommands/Debug/uptimeServer.luau +12 -0
- package/runtime/Cmdr/BuiltInCommands/Debug/version.luau +12 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/alias.luau +22 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/bind.luau +104 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/clear.luau +20 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/convertTimestamp.luau +18 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/echo.luau +17 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/edit.luau +75 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/exit.luau +11 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/history.luau +27 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/hover.luau +21 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/jsonArrayDecode.luau +25 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/jsonArrayEncode.luau +18 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/len.luau +16 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/math.luau +36 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/pick.luau +21 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/rand.luau +27 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/replace.luau +32 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/resolve.luau +32 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/run.luau +20 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/runLines.luau +34 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/runif.luau +95 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/unbind.luau +27 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/var.luau +29 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/varServer.luau +37 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/varSet.luau +30 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/varSetServer.luau +29 -0
- package/runtime/Cmdr/BuiltInCommands/help.luau +96 -0
- package/runtime/Cmdr/BuiltInTypes/BrickColor.luau +258 -0
- package/runtime/Cmdr/BuiltInTypes/Color3.luau +59 -0
- package/runtime/Cmdr/BuiltInTypes/Command.luau +23 -0
- package/runtime/Cmdr/BuiltInTypes/Duration.luau +111 -0
- package/runtime/Cmdr/BuiltInTypes/JSON.luau +13 -0
- package/runtime/Cmdr/BuiltInTypes/MathOperator.luau +43 -0
- package/runtime/Cmdr/BuiltInTypes/Player.luau +36 -0
- package/runtime/Cmdr/BuiltInTypes/PlayerId.luau +66 -0
- package/runtime/Cmdr/BuiltInTypes/Primitives.luau +145 -0
- package/runtime/Cmdr/BuiltInTypes/StoredKey.luau +33 -0
- package/runtime/Cmdr/BuiltInTypes/Team.luau +49 -0
- package/runtime/Cmdr/BuiltInTypes/Type.luau +23 -0
- package/runtime/Cmdr/BuiltInTypes/URL.luau +18 -0
- package/runtime/Cmdr/BuiltInTypes/UserInput.luau +32 -0
- package/runtime/Cmdr/BuiltInTypes/Vector.luau +58 -0
- package/runtime/Cmdr/CmdrClient/CmdrInterface/AutoComplete.luau +240 -0
- package/runtime/Cmdr/CmdrClient/CmdrInterface/CreateGui.luau +227 -0
- package/runtime/Cmdr/CmdrClient/CmdrInterface/Window.luau +713 -0
- package/runtime/Cmdr/CmdrClient/CmdrInterface/init.luau +18 -0
- package/runtime/Cmdr/CmdrClient/DefaultEventHandlers.luau +18 -0
- package/runtime/Cmdr/CmdrClient/Shared/Argument.luau +395 -0
- package/runtime/Cmdr/CmdrClient/Shared/BuiltInGuards/HasCharacter.luau +39 -0
- package/runtime/Cmdr/CmdrClient/Shared/BuiltInGuards/IsDataStoreAvailable.luau +36 -0
- package/runtime/Cmdr/CmdrClient/Shared/BuiltInGuards/MaxArrayLength.luau +10 -0
- package/runtime/Cmdr/CmdrClient/Shared/BuiltInGuards/MaxStringLength.luau +10 -0
- package/runtime/Cmdr/CmdrClient/Shared/BuiltInGuards/NonEmptyString.luau +10 -0
- package/runtime/Cmdr/CmdrClient/Shared/BuiltInGuards/NotEquals.luau +8 -0
- package/runtime/Cmdr/CmdrClient/Shared/Command.luau +415 -0
- package/runtime/Cmdr/CmdrClient/Shared/Dispatcher.luau +407 -0
- package/runtime/Cmdr/CmdrClient/Shared/Registry.luau +717 -0
- package/runtime/Cmdr/CmdrClient/Shared/Util.luau +879 -0
- package/runtime/Cmdr/CmdrClient/init.luau +377 -0
- package/runtime/Cmdr/LICENSE +21 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Admin/announce.luau +21 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Admin/announceServer.luau +17 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Admin/ban.luau +59 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Admin/banServer.luau +30 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Admin/gotoPlace.luau +35 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Admin/gotoPlaceServer.luau +17 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Admin/kick.luau +19 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Admin/kickServer.luau +27 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Admin/kill.luau +13 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Admin/killServer.luau +13 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Admin/respawn.luau +15 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Admin/respawnServer.luau +7 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Admin/teleport.luau +30 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Admin/teleportServer.luau +26 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Admin/unban.luau +26 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Admin/unbanServer.luau +10 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Debug/blink.luau +35 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Debug/fetch.luau +12 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Debug/fetchServer.luau +7 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Debug/getPlayerPlaceInstance.luau +20 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Debug/getPlayerPlaceInstanceServer.luau +28 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Debug/position.luau +30 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Debug/thru.luau +50 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Debug/uptime.luau +6 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Debug/uptimeServer.luau +12 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Debug/version.luau +12 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/alias.luau +22 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/bind.luau +104 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/clear.luau +20 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/convertTimestamp.luau +18 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/echo.luau +17 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/edit.luau +75 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/exit.luau +11 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/history.luau +27 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/hover.luau +21 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/jsonArrayDecode.luau +25 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/jsonArrayEncode.luau +18 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/len.luau +16 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/math.luau +36 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/pick.luau +21 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/rand.luau +27 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/replace.luau +32 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/resolve.luau +32 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/run.luau +20 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/runLines.luau +34 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/runif.luau +95 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/unbind.luau +27 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/var.luau +29 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/varServer.luau +37 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/varSet.luau +30 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/varSetServer.luau +29 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/help.luau +96 -0
- package/runtime/Cmdr/_impl/BuiltInTypes/BrickColor.luau +258 -0
- package/runtime/Cmdr/_impl/BuiltInTypes/Color3.luau +59 -0
- package/runtime/Cmdr/_impl/BuiltInTypes/Command.luau +23 -0
- package/runtime/Cmdr/_impl/BuiltInTypes/Duration.luau +111 -0
- package/runtime/Cmdr/_impl/BuiltInTypes/JSON.luau +13 -0
- package/runtime/Cmdr/_impl/BuiltInTypes/MathOperator.luau +43 -0
- package/runtime/Cmdr/_impl/BuiltInTypes/Player.luau +36 -0
- package/runtime/Cmdr/_impl/BuiltInTypes/PlayerId.luau +66 -0
- package/runtime/Cmdr/_impl/BuiltInTypes/Primitives.luau +145 -0
- package/runtime/Cmdr/_impl/BuiltInTypes/StoredKey.luau +33 -0
- package/runtime/Cmdr/_impl/BuiltInTypes/Team.luau +49 -0
- package/runtime/Cmdr/_impl/BuiltInTypes/Type.luau +23 -0
- package/runtime/Cmdr/_impl/BuiltInTypes/URL.luau +18 -0
- package/runtime/Cmdr/_impl/BuiltInTypes/UserInput.luau +32 -0
- package/runtime/Cmdr/_impl/BuiltInTypes/Vector.luau +58 -0
- package/runtime/Cmdr/_impl/CmdrClient/CmdrInterface/AutoComplete.luau +240 -0
- package/runtime/Cmdr/_impl/CmdrClient/CmdrInterface/CreateGui.luau +227 -0
- package/runtime/Cmdr/_impl/CmdrClient/CmdrInterface/Window.luau +713 -0
- package/runtime/Cmdr/_impl/CmdrClient/CmdrInterface/init.luau +18 -0
- package/runtime/Cmdr/_impl/CmdrClient/DefaultEventHandlers.luau +18 -0
- package/runtime/Cmdr/_impl/CmdrClient/Shared/Argument.luau +395 -0
- package/runtime/Cmdr/_impl/CmdrClient/Shared/BuiltInGuards/HasCharacter.luau +39 -0
- package/runtime/Cmdr/_impl/CmdrClient/Shared/BuiltInGuards/IsDataStoreAvailable.luau +36 -0
- package/runtime/Cmdr/_impl/CmdrClient/Shared/BuiltInGuards/MaxArrayLength.luau +10 -0
- package/runtime/Cmdr/_impl/CmdrClient/Shared/BuiltInGuards/MaxStringLength.luau +10 -0
- package/runtime/Cmdr/_impl/CmdrClient/Shared/BuiltInGuards/NonEmptyString.luau +10 -0
- package/runtime/Cmdr/_impl/CmdrClient/Shared/BuiltInGuards/NotEquals.luau +8 -0
- package/runtime/Cmdr/_impl/CmdrClient/Shared/Command.luau +415 -0
- package/runtime/Cmdr/_impl/CmdrClient/Shared/Dispatcher.luau +407 -0
- package/runtime/Cmdr/_impl/CmdrClient/Shared/Registry.luau +717 -0
- package/runtime/Cmdr/_impl/CmdrClient/Shared/Util.luau +879 -0
- package/runtime/Cmdr/_impl/CmdrClient/init.luau +377 -0
- package/runtime/Cmdr/_impl/LICENSE +21 -0
- package/runtime/Cmdr/_impl/init.luau +178 -0
- package/runtime/Cmdr/init.luau +8 -0
- package/runtime/DataService/Client.luau +209 -0
- package/runtime/DataService/Data.luau +886 -0
- package/runtime/DataService/Enum.luau +6 -0
- package/runtime/DataService/Enums.luau +10 -0
- package/runtime/DataService/Packages/quicknet/DataTypes.luau +70 -0
- package/runtime/DataService/Packages/quicknet/Enums.luau +85 -0
- package/runtime/DataService/Packages/quicknet/EnumsToNativeTypes.luau +57 -0
- package/runtime/DataService/Packages/quicknet/Parser.luau +355 -0
- package/runtime/DataService/Packages/quicknet/QuickNet.luau +953 -0
- package/runtime/DataService/Packages/quicknet/Serialize.luau +2020 -0
- package/runtime/DataService/Packages/quicknet/Types.luau +72 -0
- package/runtime/DataService/Packages/quicknet/init.luau +1 -0
- package/runtime/DataService/Packages/signal/init.luau +433 -0
- package/runtime/DataService/Path.luau +236 -0
- package/runtime/DataService/ProfileStore.luau +2243 -0
- package/runtime/DataService/Replicator.luau +172 -0
- package/runtime/DataService/Server.luau +412 -0
- package/runtime/DataService/init.luau +204 -0
- package/runtime/Display/LICENSE +201 -0
- package/runtime/Display/_impl/LICENSE +201 -0
- package/runtime/Display/_impl/init.luau +269 -0
- package/runtime/Display/_impl/option.luau +237 -0
- package/runtime/Display/init.luau +10 -0
- package/runtime/Display/option.luau +237 -0
- package/runtime/EzVisualz/Dropshadow.luau +148 -0
- package/runtime/EzVisualz/Gradient.luau +452 -0
- package/runtime/EzVisualz/GradientTemplates/Bubblegum.luau +16 -0
- package/runtime/EzVisualz/GradientTemplates/Chrome.luau +16 -0
- package/runtime/EzVisualz/GradientTemplates/Death.luau +15 -0
- package/runtime/EzVisualz/GradientTemplates/Electric.luau +14 -0
- package/runtime/EzVisualz/GradientTemplates/Fire.luau +13 -0
- package/runtime/EzVisualz/GradientTemplates/Galaxy.luau +11 -0
- package/runtime/EzVisualz/GradientTemplates/Ghost.luau +16 -0
- package/runtime/EzVisualz/GradientTemplates/Gold.luau +14 -0
- package/runtime/EzVisualz/GradientTemplates/Green.luau +14 -0
- package/runtime/EzVisualz/GradientTemplates/Ice.luau +14 -0
- package/runtime/EzVisualz/GradientTemplates/Lava.luau +15 -0
- package/runtime/EzVisualz/GradientTemplates/Matrix.luau +19 -0
- package/runtime/EzVisualz/GradientTemplates/Neon.luau +12 -0
- package/runtime/EzVisualz/GradientTemplates/Oceanic.luau +15 -0
- package/runtime/EzVisualz/GradientTemplates/Rainbow.luau +13 -0
- package/runtime/EzVisualz/GradientTemplates/Silver.luau +12 -0
- package/runtime/EzVisualz/GradientTemplates/Sunset.luau +11 -0
- package/runtime/EzVisualz/GradientTemplates/Zebra.luau +18 -0
- package/runtime/EzVisualz/GradientTemplates/init.luau +9 -0
- package/runtime/EzVisualz/LICENSE.md +21 -0
- package/runtime/EzVisualz/Presets/Bubblegum.luau +36 -0
- package/runtime/EzVisualz/Presets/ChromeStroke.luau +15 -0
- package/runtime/EzVisualz/Presets/DeathStroke.luau +15 -0
- package/runtime/EzVisualz/Presets/ElectricStroke.luau +54 -0
- package/runtime/EzVisualz/Presets/FireStroke.luau +29 -0
- package/runtime/EzVisualz/Presets/GalaxyStroke.luau +31 -0
- package/runtime/EzVisualz/Presets/Ghost.luau +10 -0
- package/runtime/EzVisualz/Presets/GhostStroke.luau +15 -0
- package/runtime/EzVisualz/Presets/Gold.luau +10 -0
- package/runtime/EzVisualz/Presets/GoldStroke.luau +15 -0
- package/runtime/EzVisualz/Presets/GreenOutline.luau +23 -0
- package/runtime/EzVisualz/Presets/IceStroke.luau +15 -0
- package/runtime/EzVisualz/Presets/Lava.luau +9 -0
- package/runtime/EzVisualz/Presets/LavaStroke.luau +13 -0
- package/runtime/EzVisualz/Presets/Matrix.luau +21 -0
- package/runtime/EzVisualz/Presets/NeonStroke.luau +30 -0
- package/runtime/EzVisualz/Presets/OceanicStroke.luau +15 -0
- package/runtime/EzVisualz/Presets/Rainbow.luau +9 -0
- package/runtime/EzVisualz/Presets/RainbowOutline.luau +23 -0
- package/runtime/EzVisualz/Presets/RainbowStroke.luau +13 -0
- package/runtime/EzVisualz/Presets/Shine.luau +48 -0
- package/runtime/EzVisualz/Presets/ShineOutline.luau +66 -0
- package/runtime/EzVisualz/Presets/Silver.luau +10 -0
- package/runtime/EzVisualz/Presets/SilverStroke.luau +15 -0
- package/runtime/EzVisualz/Presets/SunsetStroke.luau +31 -0
- package/runtime/EzVisualz/Presets/WaveStroke.luau +33 -0
- package/runtime/EzVisualz/Presets/Zebra.luau +21 -0
- package/runtime/EzVisualz/Presets/init.luau +9 -0
- package/runtime/EzVisualz/Stroke.luau +167 -0
- package/runtime/EzVisualz/Util.luau +7 -0
- package/runtime/EzVisualz/_impl/Dropshadow.luau +148 -0
- package/runtime/EzVisualz/_impl/Gradient.luau +452 -0
- package/runtime/EzVisualz/_impl/GradientTemplates/Bubblegum.luau +16 -0
- package/runtime/EzVisualz/_impl/GradientTemplates/Chrome.luau +16 -0
- package/runtime/EzVisualz/_impl/GradientTemplates/Death.luau +15 -0
- package/runtime/EzVisualz/_impl/GradientTemplates/Electric.luau +14 -0
- package/runtime/EzVisualz/_impl/GradientTemplates/Fire.luau +13 -0
- package/runtime/EzVisualz/_impl/GradientTemplates/Galaxy.luau +11 -0
- package/runtime/EzVisualz/_impl/GradientTemplates/Ghost.luau +16 -0
- package/runtime/EzVisualz/_impl/GradientTemplates/Gold.luau +14 -0
- package/runtime/EzVisualz/_impl/GradientTemplates/Green.luau +14 -0
- package/runtime/EzVisualz/_impl/GradientTemplates/Ice.luau +14 -0
- package/runtime/EzVisualz/_impl/GradientTemplates/Lava.luau +15 -0
- package/runtime/EzVisualz/_impl/GradientTemplates/Matrix.luau +19 -0
- package/runtime/EzVisualz/_impl/GradientTemplates/Neon.luau +12 -0
- package/runtime/EzVisualz/_impl/GradientTemplates/Oceanic.luau +15 -0
- package/runtime/EzVisualz/_impl/GradientTemplates/Rainbow.luau +13 -0
- package/runtime/EzVisualz/_impl/GradientTemplates/Silver.luau +12 -0
- package/runtime/EzVisualz/_impl/GradientTemplates/Sunset.luau +11 -0
- package/runtime/EzVisualz/_impl/GradientTemplates/Zebra.luau +18 -0
- package/runtime/EzVisualz/_impl/GradientTemplates/init.luau +9 -0
- package/runtime/EzVisualz/_impl/LICENSE.md +21 -0
- package/runtime/EzVisualz/_impl/Presets/Bubblegum.luau +36 -0
- package/runtime/EzVisualz/_impl/Presets/ChromeStroke.luau +15 -0
- package/runtime/EzVisualz/_impl/Presets/DeathStroke.luau +15 -0
- package/runtime/EzVisualz/_impl/Presets/ElectricStroke.luau +54 -0
- package/runtime/EzVisualz/_impl/Presets/FireStroke.luau +29 -0
- package/runtime/EzVisualz/_impl/Presets/GalaxyStroke.luau +31 -0
- package/runtime/EzVisualz/_impl/Presets/Ghost.luau +10 -0
- package/runtime/EzVisualz/_impl/Presets/GhostStroke.luau +15 -0
- package/runtime/EzVisualz/_impl/Presets/Gold.luau +10 -0
- package/runtime/EzVisualz/_impl/Presets/GoldStroke.luau +15 -0
- package/runtime/EzVisualz/_impl/Presets/GreenOutline.luau +23 -0
- package/runtime/EzVisualz/_impl/Presets/IceStroke.luau +15 -0
- package/runtime/EzVisualz/_impl/Presets/Lava.luau +9 -0
- package/runtime/EzVisualz/_impl/Presets/LavaStroke.luau +13 -0
- package/runtime/EzVisualz/_impl/Presets/Matrix.luau +21 -0
- package/runtime/EzVisualz/_impl/Presets/NeonStroke.luau +30 -0
- package/runtime/EzVisualz/_impl/Presets/OceanicStroke.luau +15 -0
- package/runtime/EzVisualz/_impl/Presets/Rainbow.luau +9 -0
- package/runtime/EzVisualz/_impl/Presets/RainbowOutline.luau +23 -0
- package/runtime/EzVisualz/_impl/Presets/RainbowStroke.luau +13 -0
- package/runtime/EzVisualz/_impl/Presets/Shine.luau +48 -0
- package/runtime/EzVisualz/_impl/Presets/ShineOutline.luau +66 -0
- package/runtime/EzVisualz/_impl/Presets/Silver.luau +10 -0
- package/runtime/EzVisualz/_impl/Presets/SilverStroke.luau +15 -0
- package/runtime/EzVisualz/_impl/Presets/SunsetStroke.luau +31 -0
- package/runtime/EzVisualz/_impl/Presets/WaveStroke.luau +33 -0
- package/runtime/EzVisualz/_impl/Presets/Zebra.luau +21 -0
- package/runtime/EzVisualz/_impl/Presets/init.luau +9 -0
- package/runtime/EzVisualz/_impl/Stroke.luau +167 -0
- package/runtime/EzVisualz/_impl/Util.luau +7 -0
- package/runtime/EzVisualz/_impl/init.luau +319 -0
- package/runtime/EzVisualz/_impl/wally.lock +8 -0
- package/runtime/EzVisualz/_impl/wally.toml +8 -0
- package/runtime/EzVisualz/init.luau +9 -0
- package/runtime/EzVisualz/wally.lock +8 -0
- package/runtime/EzVisualz/wally.toml +8 -0
- package/runtime/FormatNumber/LICENSE.md +25 -0
- package/runtime/FormatNumber/Main/DecimalFormatSymbols.lua +43 -0
- package/runtime/FormatNumber/Main/IntegerWidth.lua +41 -0
- package/runtime/FormatNumber/Main/Notation.lua +116 -0
- package/runtime/FormatNumber/Main/Precision.lua +179 -0
- package/runtime/FormatNumber/Main/init.lua +199 -0
- package/runtime/FormatNumber/Simple/init.lua +76 -0
- package/runtime/FormatNumber/Version.lua +82 -0
- package/runtime/FormatNumber/_impl/LICENSE.md +25 -0
- package/runtime/FormatNumber/_impl/Main/DecimalFormatSymbols.lua +43 -0
- package/runtime/FormatNumber/_impl/Main/IntegerWidth.lua +41 -0
- package/runtime/FormatNumber/_impl/Main/Notation.lua +116 -0
- package/runtime/FormatNumber/_impl/Main/Precision.lua +179 -0
- package/runtime/FormatNumber/_impl/Main/init.lua +199 -0
- package/runtime/FormatNumber/_impl/Simple/init.lua +76 -0
- package/runtime/FormatNumber/_impl/Version.lua +82 -0
- package/runtime/FormatNumber/_impl/_internal/class.lua +204 -0
- package/runtime/FormatNumber/_impl/_internal/decimal_conversion.lua +30 -0
- package/runtime/FormatNumber/_impl/_internal/enums.lua +55 -0
- package/runtime/FormatNumber/_impl/_internal/format.lua +342 -0
- package/runtime/FormatNumber/_impl/_internal/formatter_settings.lua +160 -0
- package/runtime/FormatNumber/_impl/_internal/init.lua +8 -0
- package/runtime/FormatNumber/_impl/_internal/skeleton.lua +541 -0
- package/runtime/FormatNumber/_impl/init.lua +20 -0
- package/runtime/FormatNumber/_internal/class.lua +204 -0
- package/runtime/FormatNumber/_internal/decimal_conversion.lua +30 -0
- package/runtime/FormatNumber/_internal/enums.lua +55 -0
- package/runtime/FormatNumber/_internal/format.lua +342 -0
- package/runtime/FormatNumber/_internal/formatter_settings.lua +160 -0
- package/runtime/FormatNumber/_internal/init.lua +8 -0
- package/runtime/FormatNumber/_internal/skeleton.lua +541 -0
- package/runtime/FormatNumber/init.lua +20 -0
- package/runtime/FormatNumber/init.luau +20 -0
- package/runtime/Fusion/Animation/ExternalTime.luau +84 -0
- package/runtime/Fusion/Animation/Spring.luau +313 -0
- package/runtime/Fusion/Animation/Stopwatch.luau +128 -0
- package/runtime/Fusion/Animation/Tween.luau +178 -0
- package/runtime/Fusion/Animation/getTweenDuration.luau +27 -0
- package/runtime/Fusion/Animation/getTweenRatio.luau +47 -0
- package/runtime/Fusion/Animation/lerpType.luau +164 -0
- package/runtime/Fusion/Animation/packType.luau +100 -0
- package/runtime/Fusion/Animation/springCoefficients.luau +80 -0
- package/runtime/Fusion/Animation/unpackType.luau +103 -0
- package/runtime/Fusion/Colour/Oklab.luau +70 -0
- package/runtime/Fusion/Colour/sRGB.luau +47 -0
- package/runtime/Fusion/External.luau +156 -0
- package/runtime/Fusion/ExternalDebug.luau +70 -0
- package/runtime/Fusion/Graph/Observer.luau +111 -0
- package/runtime/Fusion/Graph/castToGraph.luau +29 -0
- package/runtime/Fusion/Graph/change.luau +81 -0
- package/runtime/Fusion/Graph/depend.luau +33 -0
- package/runtime/Fusion/Graph/evaluate.luau +56 -0
- package/runtime/Fusion/Instances/Attribute.luau +58 -0
- package/runtime/Fusion/Instances/AttributeChange.luau +47 -0
- package/runtime/Fusion/Instances/AttributeOut.luau +63 -0
- package/runtime/Fusion/Instances/Child.luau +21 -0
- package/runtime/Fusion/Instances/Children.luau +148 -0
- package/runtime/Fusion/Instances/Hydrate.luau +29 -0
- package/runtime/Fusion/Instances/New.luau +48 -0
- package/runtime/Fusion/Instances/OnChange.luau +50 -0
- package/runtime/Fusion/Instances/OnEvent.luau +54 -0
- package/runtime/Fusion/Instances/Out.luau +69 -0
- package/runtime/Fusion/Instances/Tag.luau +61 -0
- package/runtime/Fusion/Instances/applyInstanceProps.luau +149 -0
- package/runtime/Fusion/Instances/defaultProps.luau +194 -0
- package/runtime/Fusion/LICENSE +21 -0
- package/runtime/Fusion/Logging/formatError.luau +49 -0
- package/runtime/Fusion/Logging/messages.luau +46 -0
- package/runtime/Fusion/Logging/parseError.luau +25 -0
- package/runtime/Fusion/Memory/checkLifetime.luau +134 -0
- package/runtime/Fusion/Memory/deriveScope.luau +24 -0
- package/runtime/Fusion/Memory/deriveScopeImpl.luau +40 -0
- package/runtime/Fusion/Memory/doCleanup.luau +91 -0
- package/runtime/Fusion/Memory/innerScope.luau +34 -0
- package/runtime/Fusion/Memory/insert.luau +22 -0
- package/runtime/Fusion/Memory/needsDestruction.luau +17 -0
- package/runtime/Fusion/Memory/scoped.luau +24 -0
- package/runtime/Fusion/RobloxExternal.luau +98 -0
- package/runtime/Fusion/State/Computed.luau +122 -0
- package/runtime/Fusion/State/For/Disassembly.luau +207 -0
- package/runtime/Fusion/State/For/ForTypes.luau +30 -0
- package/runtime/Fusion/State/For/init.luau +101 -0
- package/runtime/Fusion/State/ForKeys.luau +88 -0
- package/runtime/Fusion/State/ForPairs.luau +91 -0
- package/runtime/Fusion/State/ForValues.luau +88 -0
- package/runtime/Fusion/State/Value.luau +76 -0
- package/runtime/Fusion/State/castToState.luau +26 -0
- package/runtime/Fusion/State/peek.luau +31 -0
- package/runtime/Fusion/State/updateAll.luau +1 -0
- package/runtime/Fusion/Types.luau +318 -0
- package/runtime/Fusion/Utility/Contextual.luau +91 -0
- package/runtime/Fusion/Utility/Safe.luau +23 -0
- package/runtime/Fusion/Utility/isSimilar.luau +29 -0
- package/runtime/Fusion/Utility/merge.luau +35 -0
- package/runtime/Fusion/Utility/nameOf.luau +35 -0
- package/runtime/Fusion/Utility/never.luau +14 -0
- package/runtime/Fusion/Utility/nicknames.luau +11 -0
- package/runtime/Fusion/Utility/xtypeof.luau +27 -0
- package/runtime/Fusion/_impl/Animation/ExternalTime.luau +84 -0
- package/runtime/Fusion/_impl/Animation/Spring.luau +313 -0
- package/runtime/Fusion/_impl/Animation/Stopwatch.luau +128 -0
- package/runtime/Fusion/_impl/Animation/Tween.luau +178 -0
- package/runtime/Fusion/_impl/Animation/getTweenDuration.luau +27 -0
- package/runtime/Fusion/_impl/Animation/getTweenRatio.luau +47 -0
- package/runtime/Fusion/_impl/Animation/lerpType.luau +164 -0
- package/runtime/Fusion/_impl/Animation/packType.luau +100 -0
- package/runtime/Fusion/_impl/Animation/springCoefficients.luau +80 -0
- package/runtime/Fusion/_impl/Animation/unpackType.luau +103 -0
- package/runtime/Fusion/_impl/Colour/Oklab.luau +70 -0
- package/runtime/Fusion/_impl/Colour/sRGB.luau +47 -0
- package/runtime/Fusion/_impl/External.luau +156 -0
- package/runtime/Fusion/_impl/ExternalDebug.luau +70 -0
- package/runtime/Fusion/_impl/Graph/Observer.luau +111 -0
- package/runtime/Fusion/_impl/Graph/castToGraph.luau +29 -0
- package/runtime/Fusion/_impl/Graph/change.luau +81 -0
- package/runtime/Fusion/_impl/Graph/depend.luau +33 -0
- package/runtime/Fusion/_impl/Graph/evaluate.luau +56 -0
- package/runtime/Fusion/_impl/Instances/Attribute.luau +58 -0
- package/runtime/Fusion/_impl/Instances/AttributeChange.luau +47 -0
- package/runtime/Fusion/_impl/Instances/AttributeOut.luau +63 -0
- package/runtime/Fusion/_impl/Instances/Child.luau +21 -0
- package/runtime/Fusion/_impl/Instances/Children.luau +148 -0
- package/runtime/Fusion/_impl/Instances/Hydrate.luau +29 -0
- package/runtime/Fusion/_impl/Instances/New.luau +48 -0
- package/runtime/Fusion/_impl/Instances/OnChange.luau +50 -0
- package/runtime/Fusion/_impl/Instances/OnEvent.luau +54 -0
- package/runtime/Fusion/_impl/Instances/Out.luau +69 -0
- package/runtime/Fusion/_impl/Instances/Tag.luau +61 -0
- package/runtime/Fusion/_impl/Instances/applyInstanceProps.luau +149 -0
- package/runtime/Fusion/_impl/Instances/defaultProps.luau +194 -0
- package/runtime/Fusion/_impl/LICENSE +21 -0
- package/runtime/Fusion/_impl/Logging/formatError.luau +49 -0
- package/runtime/Fusion/_impl/Logging/messages.luau +46 -0
- package/runtime/Fusion/_impl/Logging/parseError.luau +25 -0
- package/runtime/Fusion/_impl/Memory/checkLifetime.luau +134 -0
- package/runtime/Fusion/_impl/Memory/deriveScope.luau +24 -0
- package/runtime/Fusion/_impl/Memory/deriveScopeImpl.luau +40 -0
- package/runtime/Fusion/_impl/Memory/doCleanup.luau +91 -0
- package/runtime/Fusion/_impl/Memory/innerScope.luau +34 -0
- package/runtime/Fusion/_impl/Memory/insert.luau +22 -0
- package/runtime/Fusion/_impl/Memory/needsDestruction.luau +17 -0
- package/runtime/Fusion/_impl/Memory/scoped.luau +24 -0
- package/runtime/Fusion/_impl/RobloxExternal.luau +98 -0
- package/runtime/Fusion/_impl/State/Computed.luau +122 -0
- package/runtime/Fusion/_impl/State/For/Disassembly.luau +207 -0
- package/runtime/Fusion/_impl/State/For/ForTypes.luau +30 -0
- package/runtime/Fusion/_impl/State/For/init.luau +101 -0
- package/runtime/Fusion/_impl/State/ForKeys.luau +88 -0
- package/runtime/Fusion/_impl/State/ForPairs.luau +91 -0
- package/runtime/Fusion/_impl/State/ForValues.luau +88 -0
- package/runtime/Fusion/_impl/State/Value.luau +76 -0
- package/runtime/Fusion/_impl/State/castToState.luau +26 -0
- package/runtime/Fusion/_impl/State/peek.luau +31 -0
- package/runtime/Fusion/_impl/State/updateAll.luau +1 -0
- package/runtime/Fusion/_impl/Types.luau +318 -0
- package/runtime/Fusion/_impl/Utility/Contextual.luau +91 -0
- package/runtime/Fusion/_impl/Utility/Safe.luau +23 -0
- package/runtime/Fusion/_impl/Utility/isSimilar.luau +29 -0
- package/runtime/Fusion/_impl/Utility/merge.luau +35 -0
- package/runtime/Fusion/_impl/Utility/nameOf.luau +35 -0
- package/runtime/Fusion/_impl/Utility/never.luau +14 -0
- package/runtime/Fusion/_impl/Utility/nicknames.luau +11 -0
- package/runtime/Fusion/_impl/Utility/xtypeof.luau +27 -0
- package/runtime/Fusion/_impl/init.luau +83 -0
- package/runtime/Fusion/init.luau +27 -0
- package/runtime/Iris/API.lua +2085 -0
- package/runtime/Iris/Internal.lua +895 -0
- package/runtime/Iris/LICENSE.txt +21 -0
- package/runtime/Iris/PubTypes.lua +43 -0
- package/runtime/Iris/Types.lua +660 -0
- package/runtime/Iris/WidgetTypes.lua +521 -0
- package/runtime/Iris/_impl/API.lua +2085 -0
- package/runtime/Iris/_impl/Internal.lua +895 -0
- package/runtime/Iris/_impl/LICENSE.txt +21 -0
- package/runtime/Iris/_impl/PubTypes.lua +43 -0
- package/runtime/Iris/_impl/Types.lua +660 -0
- package/runtime/Iris/_impl/WidgetTypes.lua +521 -0
- package/runtime/Iris/_impl/config.lua +305 -0
- package/runtime/Iris/_impl/init.lua +696 -0
- package/runtime/Iris/_impl/widgets/Button.lua +90 -0
- package/runtime/Iris/_impl/widgets/Checkbox.lua +115 -0
- package/runtime/Iris/_impl/widgets/Combo.lua +492 -0
- package/runtime/Iris/_impl/widgets/Format.lua +140 -0
- package/runtime/Iris/_impl/widgets/Image.lua +155 -0
- package/runtime/Iris/_impl/widgets/Input.lua +1232 -0
- package/runtime/Iris/_impl/widgets/Menu.lua +599 -0
- package/runtime/Iris/_impl/widgets/Plot.lua +639 -0
- package/runtime/Iris/_impl/widgets/RadioButton.lua +126 -0
- package/runtime/Iris/_impl/widgets/Root.lua +143 -0
- package/runtime/Iris/_impl/widgets/Tab.lua +333 -0
- package/runtime/Iris/_impl/widgets/Table.lua +635 -0
- package/runtime/Iris/_impl/widgets/Text.lua +132 -0
- package/runtime/Iris/_impl/widgets/Tree.lua +287 -0
- package/runtime/Iris/_impl/widgets/Window.lua +1075 -0
- package/runtime/Iris/_impl/widgets/init.lua +447 -0
- package/runtime/Iris/config.lua +305 -0
- package/runtime/Iris/init.lua +696 -0
- package/runtime/Iris/init.luau +12 -0
- package/runtime/Iris/widgets/Button.lua +90 -0
- package/runtime/Iris/widgets/Checkbox.lua +115 -0
- package/runtime/Iris/widgets/Combo.lua +492 -0
- package/runtime/Iris/widgets/Format.lua +140 -0
- package/runtime/Iris/widgets/Image.lua +155 -0
- package/runtime/Iris/widgets/Input.lua +1232 -0
- package/runtime/Iris/widgets/Menu.lua +599 -0
- package/runtime/Iris/widgets/Plot.lua +639 -0
- package/runtime/Iris/widgets/RadioButton.lua +126 -0
- package/runtime/Iris/widgets/Root.lua +143 -0
- package/runtime/Iris/widgets/Tab.lua +333 -0
- package/runtime/Iris/widgets/Table.lua +635 -0
- package/runtime/Iris/widgets/Text.lua +132 -0
- package/runtime/Iris/widgets/Tree.lua +287 -0
- package/runtime/Iris/widgets/Window.lua +1075 -0
- package/runtime/Iris/widgets/init.lua +447 -0
- package/runtime/Janitor/FastDefer.luau +33 -0
- package/runtime/Janitor/LICENSE +21 -0
- package/runtime/Janitor/_impl/FastDefer.luau +33 -0
- package/runtime/Janitor/_impl/LICENSE +21 -0
- package/runtime/Janitor/_impl/init.luau +999 -0
- package/runtime/Janitor/init.luau +45 -0
- package/runtime/MathUtils/init.luau +100 -0
- package/runtime/Module3D/LICENSE +21 -0
- package/runtime/Module3D/_impl/LICENSE +21 -0
- package/runtime/Module3D/_impl/init.luau +269 -0
- package/runtime/Module3D/init.luau +14 -0
- package/runtime/Net/init.luau +125 -0
- package/runtime/Net/src/codec.luau +153 -0
- package/runtime/Occlude/init.luau +54 -0
- package/runtime/Promise/LICENSE +21 -0
- package/runtime/Promise/_impl/LICENSE +21 -0
- package/runtime/Promise/_impl/init.lua +1991 -0
- package/runtime/Promise/init.lua +1990 -0
- package/runtime/Promise/init.luau +13 -0
- package/runtime/Promise/types.luau +46 -0
- package/runtime/SOURCES.md +22 -0
- package/runtime/Spring/LICENSE +201 -0
- package/runtime/Spring/_impl/LICENSE +201 -0
- package/runtime/Spring/_impl/init.luau +111 -0
- package/runtime/Spring/init.luau +24 -0
- package/runtime/StateMachine/Classes/State.lua +375 -0
- package/runtime/StateMachine/Classes/Transition.lua +336 -0
- package/runtime/StateMachine/Functions/deepCopy.lua +19 -0
- package/runtime/StateMachine/Functions/mergeTables.lua +22 -0
- package/runtime/StateMachine/LICENSE +19 -0
- package/runtime/StateMachine/Vendor/Signal.lua +386 -0
- package/runtime/StateMachine/Vendor/Trove.lua +188 -0
- package/runtime/StateMachine/_impl/Classes/State.lua +375 -0
- package/runtime/StateMachine/_impl/Classes/Transition.lua +336 -0
- package/runtime/StateMachine/_impl/Functions/deepCopy.lua +19 -0
- package/runtime/StateMachine/_impl/Functions/mergeTables.lua +22 -0
- package/runtime/StateMachine/_impl/LICENSE +19 -0
- package/runtime/StateMachine/_impl/Vendor/Signal.lua +386 -0
- package/runtime/StateMachine/_impl/Vendor/Trove.lua +188 -0
- package/runtime/StateMachine/_impl/init.lua +595 -0
- package/runtime/StateMachine/init.lua +595 -0
- package/runtime/StateMachine/init.luau +10 -0
- package/runtime/StickyBillboard/init.luau +167 -0
- package/runtime/TopbarPlus/Attribute.lua +35 -0
- package/runtime/TopbarPlus/Elements/Caption.lua +316 -0
- package/runtime/TopbarPlus/Elements/Container.lua +215 -0
- package/runtime/TopbarPlus/Elements/Dropdown.lua +315 -0
- package/runtime/TopbarPlus/Elements/Indicator.lua +91 -0
- package/runtime/TopbarPlus/Elements/Menu.lua +180 -0
- package/runtime/TopbarPlus/Elements/Notice.lua +113 -0
- package/runtime/TopbarPlus/Elements/Selection.lua +49 -0
- package/runtime/TopbarPlus/Elements/Widget.lua +437 -0
- package/runtime/TopbarPlus/Features/Gamepad.lua +201 -0
- package/runtime/TopbarPlus/Features/Overflow.lua +360 -0
- package/runtime/TopbarPlus/Features/Themes/Classic.lua +27 -0
- package/runtime/TopbarPlus/Features/Themes/Default.lua +75 -0
- package/runtime/TopbarPlus/Features/Themes/init.lua +353 -0
- package/runtime/TopbarPlus/LICENSE +381 -0
- package/runtime/TopbarPlus/Packages/GoodSignal.lua +182 -0
- package/runtime/TopbarPlus/Packages/Janitor.lua +322 -0
- package/runtime/TopbarPlus/Reference.lua +30 -0
- package/runtime/TopbarPlus/Types.lua +477 -0
- package/runtime/TopbarPlus/Utility.lua +462 -0
- package/runtime/TopbarPlus/VERSION.lua +51 -0
- package/runtime/TopbarPlus/_impl/Attribute.lua +35 -0
- package/runtime/TopbarPlus/_impl/Elements/Caption.lua +316 -0
- package/runtime/TopbarPlus/_impl/Elements/Container.lua +215 -0
- package/runtime/TopbarPlus/_impl/Elements/Dropdown.lua +315 -0
- package/runtime/TopbarPlus/_impl/Elements/Indicator.lua +91 -0
- package/runtime/TopbarPlus/_impl/Elements/Menu.lua +180 -0
- package/runtime/TopbarPlus/_impl/Elements/Notice.lua +113 -0
- package/runtime/TopbarPlus/_impl/Elements/Selection.lua +49 -0
- package/runtime/TopbarPlus/_impl/Elements/Widget.lua +437 -0
- package/runtime/TopbarPlus/_impl/Features/Gamepad.lua +201 -0
- package/runtime/TopbarPlus/_impl/Features/Overflow.lua +360 -0
- package/runtime/TopbarPlus/_impl/Features/Themes/Classic.lua +27 -0
- package/runtime/TopbarPlus/_impl/Features/Themes/Default.lua +75 -0
- package/runtime/TopbarPlus/_impl/Features/Themes/init.lua +353 -0
- package/runtime/TopbarPlus/_impl/LICENSE +381 -0
- package/runtime/TopbarPlus/_impl/Packages/GoodSignal.lua +182 -0
- package/runtime/TopbarPlus/_impl/Packages/Janitor.lua +322 -0
- package/runtime/TopbarPlus/_impl/Reference.lua +30 -0
- package/runtime/TopbarPlus/_impl/Types.lua +477 -0
- package/runtime/TopbarPlus/_impl/Utility.lua +462 -0
- package/runtime/TopbarPlus/_impl/VERSION.lua +51 -0
- package/runtime/TopbarPlus/_impl/init.lua +1249 -0
- package/runtime/TopbarPlus/init.lua +1249 -0
- package/runtime/TopbarPlus/init.luau +8 -0
- package/runtime/Twinkle/init.luau +157 -0
- package/runtime/VfxUtil/init.luau +164 -0
- package/src/api.generated.js +3675 -0
- package/src/api.js +57 -0
- package/src/architecture.js +393 -0
- package/src/cli.js +192 -0
- package/src/compile.js +40 -0
- package/src/emit.js +213 -0
- package/src/lex.js +149 -0
- package/src/libs.js +355 -0
- package/src/parse.js +421 -0
- package/src/preprocess.js +80 -0
- package/src/understand.js +453 -0
- package/templates/game/.clangd +5 -0
- package/templates/game/.vscode/c_cpp_properties.json +23 -0
- package/templates/game/.vscode/settings.json +12 -0
- package/templates/game/Packages/.gitkeep +0 -0
- package/templates/game/cluaupp.config.json +6 -0
- package/templates/game/compile_flags.txt +3 -0
- package/templates/game/default.project.json +39 -0
- package/templates/game/package.json +9 -0
- package/templates/game/src/client/init.client.cpp +5 -0
- package/templates/game/src/server/leaderstats.server.cpp +28 -0
- package/templates/game/src/shared/config.cpp +5 -0
- package/templates/game/src/shared/config.h +3 -0
- package/templates/game/wally.toml +11 -0
|
@@ -0,0 +1,1075 @@
|
|
|
1
|
+
local Types = require(script.Parent.Parent.Types)
|
|
2
|
+
|
|
3
|
+
return function(Iris: Types.Internal, widgets: Types.WidgetUtility)
|
|
4
|
+
local function relocateTooltips()
|
|
5
|
+
if Iris._rootInstance == nil then
|
|
6
|
+
return
|
|
7
|
+
end
|
|
8
|
+
local PopupScreenGui = Iris._rootInstance:FindFirstChild("PopupScreenGui")
|
|
9
|
+
local TooltipContainer: Frame = PopupScreenGui.TooltipContainer
|
|
10
|
+
local mouseLocation = widgets.getMouseLocation()
|
|
11
|
+
local newPosition = widgets.findBestWindowPosForPopup(mouseLocation, TooltipContainer.AbsoluteSize, Iris._config.DisplaySafeAreaPadding, PopupScreenGui.AbsoluteSize)
|
|
12
|
+
TooltipContainer.Position = UDim2.fromOffset(newPosition.X, newPosition.Y)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
widgets.registerEvent("InputChanged", function()
|
|
16
|
+
if not Iris._started then
|
|
17
|
+
return
|
|
18
|
+
end
|
|
19
|
+
relocateTooltips()
|
|
20
|
+
end)
|
|
21
|
+
|
|
22
|
+
--stylua: ignore
|
|
23
|
+
Iris.WidgetConstructor("Tooltip", {
|
|
24
|
+
hasState = false,
|
|
25
|
+
hasChildren = false,
|
|
26
|
+
Args = {
|
|
27
|
+
["Text"] = 1,
|
|
28
|
+
},
|
|
29
|
+
Events = {},
|
|
30
|
+
Generate = function(thisWidget: Types.Tooltip)
|
|
31
|
+
thisWidget.parentWidget = Iris._rootWidget -- only allow root as parent
|
|
32
|
+
|
|
33
|
+
local Tooltip = Instance.new("Frame")
|
|
34
|
+
Tooltip.Name = "Iris_Tooltip"
|
|
35
|
+
Tooltip.AutomaticSize = Enum.AutomaticSize.Y
|
|
36
|
+
Tooltip.Size = UDim2.new(Iris._config.ContentWidth, UDim.new(0, 0))
|
|
37
|
+
Tooltip.BorderSizePixel = 0
|
|
38
|
+
Tooltip.BackgroundTransparency = 1
|
|
39
|
+
|
|
40
|
+
local TooltipText = Instance.new("TextLabel")
|
|
41
|
+
TooltipText.Name = "TooltipText"
|
|
42
|
+
TooltipText.AutomaticSize = Enum.AutomaticSize.XY
|
|
43
|
+
TooltipText.Size = UDim2.fromOffset(0, 0)
|
|
44
|
+
TooltipText.BackgroundColor3 = Iris._config.PopupBgColor
|
|
45
|
+
TooltipText.BackgroundTransparency = Iris._config.PopupBgTransparency
|
|
46
|
+
|
|
47
|
+
widgets.applyTextStyle(TooltipText)
|
|
48
|
+
widgets.UIStroke(TooltipText, Iris._config.PopupBorderSize, Iris._config.BorderActiveColor, Iris._config.BorderActiveTransparency)
|
|
49
|
+
widgets.UIPadding(TooltipText, Iris._config.WindowPadding)
|
|
50
|
+
if Iris._config.PopupRounding > 0 then
|
|
51
|
+
widgets.UICorner(TooltipText, Iris._config.PopupRounding)
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
TooltipText.Parent = Tooltip
|
|
55
|
+
|
|
56
|
+
return Tooltip
|
|
57
|
+
end,
|
|
58
|
+
Update = function(thisWidget: Types.Tooltip)
|
|
59
|
+
local Tooltip = thisWidget.Instance :: Frame
|
|
60
|
+
local TooltipText: TextLabel = Tooltip.TooltipText
|
|
61
|
+
if thisWidget.arguments.Text == nil then
|
|
62
|
+
error("Text argument is required for Iris.Tooltip().", 5)
|
|
63
|
+
end
|
|
64
|
+
TooltipText.Text = thisWidget.arguments.Text
|
|
65
|
+
relocateTooltips()
|
|
66
|
+
end,
|
|
67
|
+
Discard = function(thisWidget: Types.Tooltip)
|
|
68
|
+
thisWidget.Instance:Destroy()
|
|
69
|
+
end,
|
|
70
|
+
} :: Types.WidgetClass)
|
|
71
|
+
|
|
72
|
+
local windowDisplayOrder = 0 -- incremental count which is used for determining focused windows ZIndex
|
|
73
|
+
local dragWindow: Types.Window? -- window being dragged, may be nil
|
|
74
|
+
local isDragging = false
|
|
75
|
+
local moveDeltaCursorPosition: Vector2 -- cursor offset from drag origin (top left of window)
|
|
76
|
+
|
|
77
|
+
local resizeWindow: Types.Window? -- window being resized, may be nil
|
|
78
|
+
local isResizing = false
|
|
79
|
+
local isInsideResize = false -- is cursor inside of the focused window resize outer padding
|
|
80
|
+
local isInsideWindow = false -- is cursor inside of the focused window
|
|
81
|
+
local resizeFromTopBottom = Enum.TopBottom.Top
|
|
82
|
+
local resizeFromLeftRight = Enum.LeftRight.Left
|
|
83
|
+
|
|
84
|
+
local lastCursorPosition: Vector2
|
|
85
|
+
|
|
86
|
+
local focusedWindow: Types.Window? -- window with focus, may be nil
|
|
87
|
+
local anyFocusedWindow = false -- is there any focused window?
|
|
88
|
+
|
|
89
|
+
local windowWidgets: { [Types.ID]: Types.Window } = {} -- array of widget objects of type window
|
|
90
|
+
|
|
91
|
+
local function quickSwapWindows()
|
|
92
|
+
-- ctrl + tab swapping functionality
|
|
93
|
+
if Iris._config.UseScreenGUIs == false then
|
|
94
|
+
return
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
local lowest = 0xFFFF
|
|
98
|
+
local lowestWidget: Types.Window
|
|
99
|
+
|
|
100
|
+
for _, widget in windowWidgets do
|
|
101
|
+
if widget.state.isOpened.value and not widget.arguments.NoNav then
|
|
102
|
+
if widget.Instance:IsA("ScreenGui") then
|
|
103
|
+
local value = widget.Instance.DisplayOrder
|
|
104
|
+
if value < lowest then
|
|
105
|
+
lowest = value
|
|
106
|
+
lowestWidget = widget
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
if not lowestWidget then
|
|
113
|
+
return
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
if lowestWidget.state.isUncollapsed.value == false then
|
|
117
|
+
lowestWidget.state.isUncollapsed:set(true)
|
|
118
|
+
end
|
|
119
|
+
Iris.SetFocusedWindow(lowestWidget)
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
local function fitSizeToWindowBounds(thisWidget: Types.Window, intentedSize: Vector2)
|
|
123
|
+
local windowSize = Vector2.new(thisWidget.state.position.value.X, thisWidget.state.position.value.Y)
|
|
124
|
+
local minWindowSize = (Iris._config.TextSize + 2 * Iris._config.FramePadding.Y) * 2
|
|
125
|
+
local usableSize = widgets.getScreenSizeForWindow(thisWidget)
|
|
126
|
+
local safeAreaPadding = Vector2.new(Iris._config.WindowBorderSize + Iris._config.DisplaySafeAreaPadding.X, Iris._config.WindowBorderSize + Iris._config.DisplaySafeAreaPadding.Y)
|
|
127
|
+
|
|
128
|
+
local maxWindowSize = (usableSize - windowSize - safeAreaPadding)
|
|
129
|
+
return Vector2.new(math.clamp(intentedSize.X, minWindowSize, math.max(maxWindowSize.X, minWindowSize)), math.clamp(intentedSize.Y, minWindowSize, math.max(maxWindowSize.Y, minWindowSize)))
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
local function fitPositionToWindowBounds(thisWidget: Types.Window, intendedPosition: Vector2)
|
|
133
|
+
local thisWidgetInstance = thisWidget.Instance
|
|
134
|
+
local usableSize = widgets.getScreenSizeForWindow(thisWidget)
|
|
135
|
+
local safeAreaPadding = Vector2.new(Iris._config.WindowBorderSize + Iris._config.DisplaySafeAreaPadding.X, Iris._config.WindowBorderSize + Iris._config.DisplaySafeAreaPadding.Y)
|
|
136
|
+
|
|
137
|
+
return Vector2.new(
|
|
138
|
+
math.clamp(intendedPosition.X, safeAreaPadding.X, math.max(safeAreaPadding.X, usableSize.X - thisWidgetInstance.WindowButton.AbsoluteSize.X - safeAreaPadding.X)),
|
|
139
|
+
math.clamp(intendedPosition.Y, safeAreaPadding.Y, math.max(safeAreaPadding.Y, usableSize.Y - thisWidgetInstance.WindowButton.AbsoluteSize.Y - safeAreaPadding.Y))
|
|
140
|
+
)
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
Iris.SetFocusedWindow = function(thisWidget: Types.Window?)
|
|
144
|
+
if focusedWindow == thisWidget then
|
|
145
|
+
return
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
if anyFocusedWindow and focusedWindow ~= nil then
|
|
149
|
+
if windowWidgets[focusedWindow.ID] then
|
|
150
|
+
local Window = focusedWindow.Instance :: Frame
|
|
151
|
+
local WindowButton = Window.WindowButton :: TextButton
|
|
152
|
+
local Content = WindowButton.Content :: Frame
|
|
153
|
+
local TitleBar: Frame = Content.TitleBar
|
|
154
|
+
-- update appearance to unfocus
|
|
155
|
+
if focusedWindow.state.isUncollapsed.value then
|
|
156
|
+
TitleBar.BackgroundColor3 = Iris._config.TitleBgColor
|
|
157
|
+
TitleBar.BackgroundTransparency = Iris._config.TitleBgTransparency
|
|
158
|
+
else
|
|
159
|
+
TitleBar.BackgroundColor3 = Iris._config.TitleBgCollapsedColor
|
|
160
|
+
TitleBar.BackgroundTransparency = Iris._config.TitleBgCollapsedTransparency
|
|
161
|
+
end
|
|
162
|
+
WindowButton.UIStroke.Color = Iris._config.BorderColor
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
anyFocusedWindow = false
|
|
166
|
+
focusedWindow = nil
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
if thisWidget ~= nil then
|
|
170
|
+
-- update appearance to focus
|
|
171
|
+
anyFocusedWindow = true
|
|
172
|
+
focusedWindow = thisWidget
|
|
173
|
+
local Window = thisWidget.Instance :: Frame
|
|
174
|
+
local WindowButton = Window.WindowButton :: TextButton
|
|
175
|
+
local Content = WindowButton.Content :: Frame
|
|
176
|
+
local TitleBar: Frame = Content.TitleBar
|
|
177
|
+
|
|
178
|
+
TitleBar.BackgroundColor3 = Iris._config.TitleBgActiveColor
|
|
179
|
+
TitleBar.BackgroundTransparency = Iris._config.TitleBgActiveTransparency
|
|
180
|
+
WindowButton.UIStroke.Color = Iris._config.BorderActiveColor
|
|
181
|
+
|
|
182
|
+
windowDisplayOrder += 1
|
|
183
|
+
if thisWidget.usesScreenGuis then
|
|
184
|
+
Window.DisplayOrder = windowDisplayOrder + Iris._config.DisplayOrderOffset
|
|
185
|
+
else
|
|
186
|
+
Window.ZIndex = windowDisplayOrder + Iris._config.DisplayOrderOffset
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
if thisWidget.state.isUncollapsed.value == false then
|
|
190
|
+
thisWidget.state.isUncollapsed:set(true)
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
local firstSelectedObject: GuiObject? = widgets.GuiService.SelectedObject
|
|
194
|
+
if firstSelectedObject then
|
|
195
|
+
if TitleBar.Visible then
|
|
196
|
+
widgets.GuiService:Select(TitleBar)
|
|
197
|
+
else
|
|
198
|
+
widgets.GuiService:Select(thisWidget.ChildContainer)
|
|
199
|
+
end
|
|
200
|
+
end
|
|
201
|
+
end
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
widgets.registerEvent("InputBegan", function(input: InputObject)
|
|
205
|
+
if not Iris._started then
|
|
206
|
+
return
|
|
207
|
+
end
|
|
208
|
+
if input.UserInputType == Enum.UserInputType.MouseButton1 then
|
|
209
|
+
local inWindow = false
|
|
210
|
+
local position = widgets.getMouseLocation()
|
|
211
|
+
for _, window in windowWidgets do
|
|
212
|
+
local Window = window.Instance
|
|
213
|
+
if not Window then
|
|
214
|
+
continue
|
|
215
|
+
end
|
|
216
|
+
local WindowButton = Window.WindowButton :: TextButton
|
|
217
|
+
local ResizeBorder: TextButton = WindowButton.ResizeBorder
|
|
218
|
+
if ResizeBorder and widgets.isPosInsideRect(position, ResizeBorder.AbsolutePosition - widgets.GuiOffset, ResizeBorder.AbsolutePosition - widgets.GuiOffset + ResizeBorder.AbsoluteSize) then
|
|
219
|
+
inWindow = true
|
|
220
|
+
break
|
|
221
|
+
end
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
if not inWindow then
|
|
225
|
+
Iris.SetFocusedWindow(nil)
|
|
226
|
+
end
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
if input.KeyCode == Enum.KeyCode.Tab and (widgets.UserInputService:IsKeyDown(Enum.KeyCode.LeftControl) or widgets.UserInputService:IsKeyDown(Enum.KeyCode.RightControl)) then
|
|
230
|
+
quickSwapWindows()
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
if input.UserInputType == Enum.UserInputType.MouseButton1 and isInsideResize and not isInsideWindow and anyFocusedWindow and focusedWindow then
|
|
234
|
+
local midWindow = focusedWindow.state.position.value + (focusedWindow.state.size.value / 2)
|
|
235
|
+
local cursorPosition = widgets.getMouseLocation() - midWindow
|
|
236
|
+
|
|
237
|
+
-- check which axis its closest to, then check which side is closest with math.sign
|
|
238
|
+
if math.abs(cursorPosition.X) * focusedWindow.state.size.value.Y >= math.abs(cursorPosition.Y) * focusedWindow.state.size.value.X then
|
|
239
|
+
resizeFromTopBottom = Enum.TopBottom.Center
|
|
240
|
+
resizeFromLeftRight = if math.sign(cursorPosition.X) == -1 then Enum.LeftRight.Left else Enum.LeftRight.Right
|
|
241
|
+
else
|
|
242
|
+
resizeFromLeftRight = Enum.LeftRight.Center
|
|
243
|
+
resizeFromTopBottom = if math.sign(cursorPosition.Y) == -1 then Enum.TopBottom.Top else Enum.TopBottom.Bottom
|
|
244
|
+
end
|
|
245
|
+
isResizing = true
|
|
246
|
+
resizeWindow = focusedWindow
|
|
247
|
+
end
|
|
248
|
+
end)
|
|
249
|
+
|
|
250
|
+
widgets.registerEvent("TouchTapInWorld", function(_, gameProcessedEvent: boolean)
|
|
251
|
+
if not Iris._started then
|
|
252
|
+
return
|
|
253
|
+
end
|
|
254
|
+
if not gameProcessedEvent then
|
|
255
|
+
Iris.SetFocusedWindow(nil)
|
|
256
|
+
end
|
|
257
|
+
end)
|
|
258
|
+
|
|
259
|
+
widgets.registerEvent("InputChanged", function(input: InputObject)
|
|
260
|
+
if not Iris._started then
|
|
261
|
+
return
|
|
262
|
+
end
|
|
263
|
+
if isDragging and dragWindow then
|
|
264
|
+
local mouseLocation
|
|
265
|
+
if input.UserInputType == Enum.UserInputType.Touch then
|
|
266
|
+
local location = input.Position
|
|
267
|
+
mouseLocation = Vector2.new(location.X, location.Y)
|
|
268
|
+
else
|
|
269
|
+
mouseLocation = widgets.getMouseLocation()
|
|
270
|
+
end
|
|
271
|
+
local Window = dragWindow.Instance :: Frame
|
|
272
|
+
local dragInstance: TextButton = Window.WindowButton
|
|
273
|
+
local intendedPosition = mouseLocation - moveDeltaCursorPosition
|
|
274
|
+
local newPos = fitPositionToWindowBounds(dragWindow, intendedPosition)
|
|
275
|
+
|
|
276
|
+
-- state shouldnt be used like this, but calling :set would run the entire UpdateState function for the window, which is slow.
|
|
277
|
+
dragInstance.Position = UDim2.fromOffset(newPos.X, newPos.Y)
|
|
278
|
+
dragWindow.state.position.value = newPos
|
|
279
|
+
end
|
|
280
|
+
if isResizing and resizeWindow and resizeWindow.arguments.NoResize ~= true then
|
|
281
|
+
local Window = resizeWindow.Instance :: Frame
|
|
282
|
+
local resizeInstance: TextButton = Window.WindowButton
|
|
283
|
+
local windowPosition = Vector2.new(resizeInstance.Position.X.Offset, resizeInstance.Position.Y.Offset)
|
|
284
|
+
local windowSize = Vector2.new(resizeInstance.Size.X.Offset, resizeInstance.Size.Y.Offset)
|
|
285
|
+
|
|
286
|
+
local mouseDelta
|
|
287
|
+
if input.UserInputType == Enum.UserInputType.Touch then
|
|
288
|
+
mouseDelta = input.Delta
|
|
289
|
+
else
|
|
290
|
+
mouseDelta = widgets.getMouseLocation() - lastCursorPosition
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
local intendedPosition = windowPosition + Vector2.new(if resizeFromLeftRight == Enum.LeftRight.Left then mouseDelta.X else 0, if resizeFromTopBottom == Enum.TopBottom.Top then mouseDelta.Y else 0)
|
|
294
|
+
|
|
295
|
+
local intendedSize = windowSize
|
|
296
|
+
+ Vector2.new(
|
|
297
|
+
if resizeFromLeftRight == Enum.LeftRight.Left then -mouseDelta.X elseif resizeFromLeftRight == Enum.LeftRight.Right then mouseDelta.X else 0,
|
|
298
|
+
if resizeFromTopBottom == Enum.TopBottom.Top then -mouseDelta.Y elseif resizeFromTopBottom == Enum.TopBottom.Bottom then mouseDelta.Y else 0
|
|
299
|
+
)
|
|
300
|
+
|
|
301
|
+
local newSize = fitSizeToWindowBounds(resizeWindow, intendedSize)
|
|
302
|
+
local newPosition = fitPositionToWindowBounds(resizeWindow, intendedPosition)
|
|
303
|
+
|
|
304
|
+
resizeInstance.Size = UDim2.fromOffset(newSize.X, newSize.Y)
|
|
305
|
+
resizeWindow.state.size.value = newSize
|
|
306
|
+
resizeInstance.Position = UDim2.fromOffset(newPosition.X, newPosition.Y)
|
|
307
|
+
resizeWindow.state.position.value = newPosition
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
lastCursorPosition = widgets.getMouseLocation()
|
|
311
|
+
end)
|
|
312
|
+
|
|
313
|
+
widgets.registerEvent("InputEnded", function(input, _)
|
|
314
|
+
if not Iris._started then
|
|
315
|
+
return
|
|
316
|
+
end
|
|
317
|
+
if (input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch) and isDragging and dragWindow then
|
|
318
|
+
local Window = dragWindow.Instance :: Frame
|
|
319
|
+
local dragInstance: TextButton = Window.WindowButton
|
|
320
|
+
isDragging = false
|
|
321
|
+
dragWindow.state.position:set(Vector2.new(dragInstance.Position.X.Offset, dragInstance.Position.Y.Offset))
|
|
322
|
+
end
|
|
323
|
+
if (input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch) and isResizing and resizeWindow then
|
|
324
|
+
local Window = resizeWindow.Instance :: Instance
|
|
325
|
+
isResizing = false
|
|
326
|
+
resizeWindow.state.size:set(Window.WindowButton.AbsoluteSize)
|
|
327
|
+
end
|
|
328
|
+
|
|
329
|
+
if input.KeyCode == Enum.KeyCode.ButtonX then
|
|
330
|
+
quickSwapWindows()
|
|
331
|
+
end
|
|
332
|
+
end)
|
|
333
|
+
|
|
334
|
+
--stylua: ignore
|
|
335
|
+
Iris.WidgetConstructor("Window", {
|
|
336
|
+
hasState = true,
|
|
337
|
+
hasChildren = true,
|
|
338
|
+
Args = {
|
|
339
|
+
["Title"] = 1,
|
|
340
|
+
["NoTitleBar"] = 2,
|
|
341
|
+
["NoBackground"] = 3,
|
|
342
|
+
["NoCollapse"] = 4,
|
|
343
|
+
["NoClose"] = 5,
|
|
344
|
+
["NoMove"] = 6,
|
|
345
|
+
["NoScrollbar"] = 7,
|
|
346
|
+
["NoResize"] = 8,
|
|
347
|
+
["NoNav"] = 9,
|
|
348
|
+
["NoMenu"] = 10,
|
|
349
|
+
},
|
|
350
|
+
Events = {
|
|
351
|
+
["closed"] = {
|
|
352
|
+
["Init"] = function(_thisWidget: Types.Window) end,
|
|
353
|
+
["Get"] = function(thisWidget: Types.Window)
|
|
354
|
+
return thisWidget.lastClosedTick == Iris._cycleTick
|
|
355
|
+
end,
|
|
356
|
+
},
|
|
357
|
+
["opened"] = {
|
|
358
|
+
["Init"] = function(_thisWidget: Types.Window) end,
|
|
359
|
+
["Get"] = function(thisWidget: Types.Window)
|
|
360
|
+
return thisWidget.lastOpenedTick == Iris._cycleTick
|
|
361
|
+
end,
|
|
362
|
+
},
|
|
363
|
+
["collapsed"] = {
|
|
364
|
+
["Init"] = function(_thisWidget: Types.Window) end,
|
|
365
|
+
["Get"] = function(thisWidget: Types.Window)
|
|
366
|
+
return thisWidget.lastCollapsedTick == Iris._cycleTick
|
|
367
|
+
end,
|
|
368
|
+
},
|
|
369
|
+
["uncollapsed"] = {
|
|
370
|
+
["Init"] = function(_thisWidget: Types.Window) end,
|
|
371
|
+
["Get"] = function(thisWidget: Types.Window)
|
|
372
|
+
return thisWidget.lastUncollapsedTick == Iris._cycleTick
|
|
373
|
+
end,
|
|
374
|
+
},
|
|
375
|
+
["hovered"] = widgets.EVENTS.hover(function(thisWidget: Types.Widget)
|
|
376
|
+
local Window = thisWidget.Instance :: Frame
|
|
377
|
+
return Window.WindowButton
|
|
378
|
+
end),
|
|
379
|
+
},
|
|
380
|
+
Generate = function(thisWidget: Types.Window)
|
|
381
|
+
thisWidget.parentWidget = Iris._rootWidget -- only allow root as parent
|
|
382
|
+
|
|
383
|
+
thisWidget.usesScreenGuis = Iris._config.UseScreenGUIs
|
|
384
|
+
windowWidgets[thisWidget.ID] = thisWidget
|
|
385
|
+
|
|
386
|
+
local Window
|
|
387
|
+
if thisWidget.usesScreenGuis then
|
|
388
|
+
Window = Instance.new("ScreenGui")
|
|
389
|
+
Window.ResetOnSpawn = false
|
|
390
|
+
Window.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
|
|
391
|
+
Window.DisplayOrder = Iris._config.DisplayOrderOffset
|
|
392
|
+
Window.ScreenInsets = Iris._config.ScreenInsets
|
|
393
|
+
Window.IgnoreGuiInset = Iris._config.IgnoreGuiInset
|
|
394
|
+
else
|
|
395
|
+
Window = Instance.new("Frame")
|
|
396
|
+
Window.AnchorPoint = Vector2.new(0.5, 0.5)
|
|
397
|
+
Window.Position = UDim2.fromScale(0.5, 0.5)
|
|
398
|
+
Window.Size = UDim2.fromScale(1, 1)
|
|
399
|
+
Window.BackgroundTransparency = 1
|
|
400
|
+
Window.ZIndex = Iris._config.DisplayOrderOffset
|
|
401
|
+
end
|
|
402
|
+
Window.Name = "Iris_Window"
|
|
403
|
+
|
|
404
|
+
local WindowButton = Instance.new("TextButton")
|
|
405
|
+
WindowButton.Name = "WindowButton"
|
|
406
|
+
WindowButton.Size = UDim2.fromOffset(0, 0)
|
|
407
|
+
WindowButton.BackgroundTransparency = 1
|
|
408
|
+
WindowButton.BorderSizePixel = 0
|
|
409
|
+
WindowButton.Text = ""
|
|
410
|
+
WindowButton.AutoButtonColor = false
|
|
411
|
+
WindowButton.ClipsDescendants = false
|
|
412
|
+
WindowButton.Selectable = false
|
|
413
|
+
|
|
414
|
+
WindowButton.SelectionImageObject = Iris.SelectionImageObject
|
|
415
|
+
WindowButton.SelectionGroup = true
|
|
416
|
+
WindowButton.SelectionBehaviorUp = Enum.SelectionBehavior.Stop
|
|
417
|
+
WindowButton.SelectionBehaviorDown = Enum.SelectionBehavior.Stop
|
|
418
|
+
WindowButton.SelectionBehaviorLeft = Enum.SelectionBehavior.Stop
|
|
419
|
+
WindowButton.SelectionBehaviorRight = Enum.SelectionBehavior.Stop
|
|
420
|
+
|
|
421
|
+
widgets.UIStroke(WindowButton, Iris._config.WindowBorderSize, Iris._config.BorderColor, Iris._config.BorderTransparency)
|
|
422
|
+
|
|
423
|
+
WindowButton.Parent = Window
|
|
424
|
+
|
|
425
|
+
widgets.applyInputBegan(WindowButton, function(input)
|
|
426
|
+
if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Keyboard then
|
|
427
|
+
return
|
|
428
|
+
end
|
|
429
|
+
if thisWidget.state.isUncollapsed.value then
|
|
430
|
+
Iris.SetFocusedWindow(thisWidget)
|
|
431
|
+
end
|
|
432
|
+
if not thisWidget.arguments.NoMove and input.UserInputType == Enum.UserInputType.MouseButton1 then
|
|
433
|
+
dragWindow = thisWidget
|
|
434
|
+
isDragging = true
|
|
435
|
+
moveDeltaCursorPosition = widgets.getMouseLocation() - thisWidget.state.position.value
|
|
436
|
+
end
|
|
437
|
+
end)
|
|
438
|
+
|
|
439
|
+
local Content = Instance.new("Frame")
|
|
440
|
+
Content.Name = "Content"
|
|
441
|
+
Content.AnchorPoint = Vector2.new(0.5, 0.5)
|
|
442
|
+
Content.Position = UDim2.fromScale(0.5, 0.5)
|
|
443
|
+
Content.Size = UDim2.fromScale(1, 1)
|
|
444
|
+
Content.BackgroundTransparency = 1
|
|
445
|
+
Content.ClipsDescendants = true
|
|
446
|
+
Content.Parent = WindowButton
|
|
447
|
+
|
|
448
|
+
local UIListLayout = widgets.UIListLayout(Content, Enum.FillDirection.Vertical, UDim.new(0, 0))
|
|
449
|
+
UIListLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
|
|
450
|
+
UIListLayout.VerticalAlignment = Enum.VerticalAlignment.Top
|
|
451
|
+
|
|
452
|
+
local ChildContainer = Instance.new("ScrollingFrame")
|
|
453
|
+
ChildContainer.Name = "WindowContainer"
|
|
454
|
+
ChildContainer.Size = UDim2.fromScale(1, 1)
|
|
455
|
+
ChildContainer.BackgroundColor3 = Iris._config.WindowBgColor
|
|
456
|
+
ChildContainer.BackgroundTransparency = Iris._config.WindowBgTransparency
|
|
457
|
+
ChildContainer.BorderSizePixel = 0
|
|
458
|
+
|
|
459
|
+
ChildContainer.AutomaticCanvasSize = Enum.AutomaticSize.Y
|
|
460
|
+
ChildContainer.ScrollBarImageTransparency = Iris._config.ScrollbarGrabTransparency
|
|
461
|
+
ChildContainer.ScrollBarImageColor3 = Iris._config.ScrollbarGrabColor
|
|
462
|
+
ChildContainer.CanvasSize = UDim2.fromScale(0, 0)
|
|
463
|
+
ChildContainer.VerticalScrollBarInset = Enum.ScrollBarInset.ScrollBar
|
|
464
|
+
ChildContainer.TopImage = widgets.ICONS.BLANK_SQUARE
|
|
465
|
+
ChildContainer.MidImage = widgets.ICONS.BLANK_SQUARE
|
|
466
|
+
ChildContainer.BottomImage = widgets.ICONS.BLANK_SQUARE
|
|
467
|
+
|
|
468
|
+
ChildContainer.LayoutOrder = thisWidget.ZIndex + 0xFFFF
|
|
469
|
+
ChildContainer.ClipsDescendants = true
|
|
470
|
+
|
|
471
|
+
widgets.UIPadding(ChildContainer, Iris._config.WindowPadding)
|
|
472
|
+
|
|
473
|
+
ChildContainer.Parent = Content
|
|
474
|
+
|
|
475
|
+
local UIFlexItem = Instance.new("UIFlexItem")
|
|
476
|
+
UIFlexItem.FlexMode = Enum.UIFlexMode.Fill
|
|
477
|
+
UIFlexItem.ItemLineAlignment = Enum.ItemLineAlignment.End
|
|
478
|
+
UIFlexItem.Parent = ChildContainer
|
|
479
|
+
|
|
480
|
+
ChildContainer:GetPropertyChangedSignal("CanvasPosition"):Connect(function()
|
|
481
|
+
-- "wrong" use of state here, for optimization
|
|
482
|
+
thisWidget.state.scrollDistance.value = ChildContainer.CanvasPosition.Y
|
|
483
|
+
end)
|
|
484
|
+
|
|
485
|
+
widgets.applyInputBegan(ChildContainer, function(input)
|
|
486
|
+
if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Keyboard then
|
|
487
|
+
return
|
|
488
|
+
end
|
|
489
|
+
if thisWidget.state.isUncollapsed.value then
|
|
490
|
+
Iris.SetFocusedWindow(thisWidget)
|
|
491
|
+
end
|
|
492
|
+
end)
|
|
493
|
+
|
|
494
|
+
local TerminatingFrame = Instance.new("Frame")
|
|
495
|
+
TerminatingFrame.Name = "TerminatingFrame"
|
|
496
|
+
TerminatingFrame.Size = UDim2.fromOffset(0, Iris._config.WindowPadding.Y + Iris._config.FramePadding.Y)
|
|
497
|
+
TerminatingFrame.BackgroundTransparency = 1
|
|
498
|
+
TerminatingFrame.BorderSizePixel = 0
|
|
499
|
+
TerminatingFrame.LayoutOrder = 0x7FFFFFF0
|
|
500
|
+
|
|
501
|
+
widgets.UIListLayout(ChildContainer, Enum.FillDirection.Vertical, UDim.new(0, Iris._config.ItemSpacing.Y)).VerticalAlignment = Enum.VerticalAlignment.Top
|
|
502
|
+
|
|
503
|
+
TerminatingFrame.Parent = ChildContainer
|
|
504
|
+
|
|
505
|
+
local TitleBar = Instance.new("Frame")
|
|
506
|
+
TitleBar.Name = "TitleBar"
|
|
507
|
+
TitleBar.AutomaticSize = Enum.AutomaticSize.Y
|
|
508
|
+
TitleBar.Size = UDim2.fromScale(1, 0)
|
|
509
|
+
TitleBar.BorderSizePixel = 0
|
|
510
|
+
TitleBar.ClipsDescendants = true
|
|
511
|
+
|
|
512
|
+
TitleBar.Parent = Content
|
|
513
|
+
|
|
514
|
+
widgets.UIPadding(TitleBar, Vector2.new(Iris._config.FramePadding.X))
|
|
515
|
+
widgets.UIListLayout(TitleBar, Enum.FillDirection.Horizontal, UDim.new(0, Iris._config.ItemInnerSpacing.X)).VerticalAlignment = Enum.VerticalAlignment.Center
|
|
516
|
+
widgets.applyInputBegan(TitleBar, function(input)
|
|
517
|
+
if input.UserInputType == Enum.UserInputType.Touch then
|
|
518
|
+
if not thisWidget.arguments.NoMove then
|
|
519
|
+
dragWindow = thisWidget
|
|
520
|
+
isDragging = true
|
|
521
|
+
local location = input.Position
|
|
522
|
+
moveDeltaCursorPosition = Vector2.new(location.X, location.Y) - thisWidget.state.position.value
|
|
523
|
+
end
|
|
524
|
+
end
|
|
525
|
+
end)
|
|
526
|
+
|
|
527
|
+
local TitleButtonSize = Iris._config.TextSize + ((Iris._config.FramePadding.Y - 1) * 2)
|
|
528
|
+
|
|
529
|
+
local CollapseButton = Instance.new("TextButton")
|
|
530
|
+
CollapseButton.Name = "CollapseButton"
|
|
531
|
+
CollapseButton.AutomaticSize = Enum.AutomaticSize.None
|
|
532
|
+
CollapseButton.AnchorPoint = Vector2.new(0, 0.5)
|
|
533
|
+
CollapseButton.Size = UDim2.fromOffset(TitleButtonSize, TitleButtonSize)
|
|
534
|
+
CollapseButton.Position = UDim2.fromScale(0, 0.5)
|
|
535
|
+
CollapseButton.BackgroundTransparency = 1
|
|
536
|
+
CollapseButton.BorderSizePixel = 0
|
|
537
|
+
CollapseButton.AutoButtonColor = false
|
|
538
|
+
CollapseButton.Text = ""
|
|
539
|
+
|
|
540
|
+
widgets.UICorner(CollapseButton)
|
|
541
|
+
|
|
542
|
+
CollapseButton.Parent = TitleBar
|
|
543
|
+
|
|
544
|
+
widgets.applyButtonClick(CollapseButton, function()
|
|
545
|
+
thisWidget.state.isUncollapsed:set(not thisWidget.state.isUncollapsed.value)
|
|
546
|
+
end)
|
|
547
|
+
|
|
548
|
+
widgets.applyInteractionHighlights("Background", CollapseButton, CollapseButton, {
|
|
549
|
+
Color = Iris._config.ButtonColor,
|
|
550
|
+
Transparency = 1,
|
|
551
|
+
HoveredColor = Iris._config.ButtonHoveredColor,
|
|
552
|
+
HoveredTransparency = Iris._config.ButtonHoveredTransparency,
|
|
553
|
+
ActiveColor = Iris._config.ButtonActiveColor,
|
|
554
|
+
ActiveTransparency = Iris._config.ButtonActiveTransparency,
|
|
555
|
+
})
|
|
556
|
+
|
|
557
|
+
local CollapseArrow = Instance.new("ImageLabel")
|
|
558
|
+
CollapseArrow.Name = "Arrow"
|
|
559
|
+
CollapseArrow.AnchorPoint = Vector2.new(0.5, 0.5)
|
|
560
|
+
CollapseArrow.Size = UDim2.fromOffset(math.floor(0.7 * TitleButtonSize), math.floor(0.7 * TitleButtonSize))
|
|
561
|
+
CollapseArrow.Position = UDim2.fromScale(0.5, 0.5)
|
|
562
|
+
CollapseArrow.BackgroundTransparency = 1
|
|
563
|
+
CollapseArrow.BorderSizePixel = 0
|
|
564
|
+
CollapseArrow.Image = widgets.ICONS.MULTIPLICATION_SIGN
|
|
565
|
+
CollapseArrow.ImageColor3 = Iris._config.TextColor
|
|
566
|
+
CollapseArrow.ImageTransparency = Iris._config.TextTransparency
|
|
567
|
+
CollapseArrow.Parent = CollapseButton
|
|
568
|
+
|
|
569
|
+
local CloseButton = Instance.new("TextButton")
|
|
570
|
+
CloseButton.Name = "CloseButton"
|
|
571
|
+
CloseButton.AutomaticSize = Enum.AutomaticSize.None
|
|
572
|
+
CloseButton.AnchorPoint = Vector2.new(1, 0.5)
|
|
573
|
+
CloseButton.Size = UDim2.fromOffset(TitleButtonSize, TitleButtonSize)
|
|
574
|
+
CloseButton.Position = UDim2.fromScale(1, 0.5)
|
|
575
|
+
CloseButton.BackgroundTransparency = 1
|
|
576
|
+
CloseButton.BorderSizePixel = 0
|
|
577
|
+
CloseButton.Text = ""
|
|
578
|
+
CloseButton.AutoButtonColor = false
|
|
579
|
+
CloseButton.LayoutOrder = 2
|
|
580
|
+
|
|
581
|
+
widgets.UICorner(CloseButton)
|
|
582
|
+
|
|
583
|
+
widgets.applyButtonClick(CloseButton, function()
|
|
584
|
+
thisWidget.state.isOpened:set(false)
|
|
585
|
+
end)
|
|
586
|
+
|
|
587
|
+
widgets.applyInteractionHighlights("Background", CloseButton, CloseButton, {
|
|
588
|
+
Color = Iris._config.ButtonColor,
|
|
589
|
+
Transparency = 1,
|
|
590
|
+
HoveredColor = Iris._config.ButtonHoveredColor,
|
|
591
|
+
HoveredTransparency = Iris._config.ButtonHoveredTransparency,
|
|
592
|
+
ActiveColor = Iris._config.ButtonActiveColor,
|
|
593
|
+
ActiveTransparency = Iris._config.ButtonActiveTransparency,
|
|
594
|
+
})
|
|
595
|
+
|
|
596
|
+
CloseButton.Parent = TitleBar
|
|
597
|
+
|
|
598
|
+
local CloseIcon = Instance.new("ImageLabel")
|
|
599
|
+
CloseIcon.Name = "Icon"
|
|
600
|
+
CloseIcon.AnchorPoint = Vector2.new(0.5, 0.5)
|
|
601
|
+
CloseIcon.Size = UDim2.fromOffset(math.floor(0.7 * TitleButtonSize), math.floor(0.7 * TitleButtonSize))
|
|
602
|
+
CloseIcon.Position = UDim2.fromScale(0.5, 0.5)
|
|
603
|
+
CloseIcon.BackgroundTransparency = 1
|
|
604
|
+
CloseIcon.BorderSizePixel = 0
|
|
605
|
+
CloseIcon.Image = widgets.ICONS.MULTIPLICATION_SIGN
|
|
606
|
+
CloseIcon.ImageColor3 = Iris._config.TextColor
|
|
607
|
+
CloseIcon.ImageTransparency = Iris._config.TextTransparency
|
|
608
|
+
CloseIcon.Parent = CloseButton
|
|
609
|
+
|
|
610
|
+
-- allowing fractional titlebar title location dosent seem useful, as opposed to Enum.LeftRight.
|
|
611
|
+
|
|
612
|
+
local Title = Instance.new("TextLabel")
|
|
613
|
+
Title.Name = "Title"
|
|
614
|
+
Title.AutomaticSize = Enum.AutomaticSize.XY
|
|
615
|
+
Title.BorderSizePixel = 0
|
|
616
|
+
Title.BackgroundTransparency = 1
|
|
617
|
+
Title.LayoutOrder = 1
|
|
618
|
+
Title.ClipsDescendants = true
|
|
619
|
+
|
|
620
|
+
widgets.UIPadding(Title, Vector2.new(0, Iris._config.FramePadding.Y))
|
|
621
|
+
widgets.applyTextStyle(Title)
|
|
622
|
+
Title.TextXAlignment = Enum.TextXAlignment[Iris._config.WindowTitleAlign.Name] :: Enum.TextXAlignment
|
|
623
|
+
|
|
624
|
+
local TitleFlexItem = Instance.new("UIFlexItem")
|
|
625
|
+
TitleFlexItem.FlexMode = Enum.UIFlexMode.Fill
|
|
626
|
+
TitleFlexItem.ItemLineAlignment = Enum.ItemLineAlignment.Center
|
|
627
|
+
|
|
628
|
+
TitleFlexItem.Parent = Title
|
|
629
|
+
|
|
630
|
+
Title.Parent = TitleBar
|
|
631
|
+
|
|
632
|
+
local ResizeButtonSize = Iris._config.TextSize + Iris._config.FramePadding.X
|
|
633
|
+
|
|
634
|
+
local LeftResizeGrip = Instance.new("ImageButton")
|
|
635
|
+
LeftResizeGrip.Name = "LeftResizeGrip"
|
|
636
|
+
LeftResizeGrip.AnchorPoint = Vector2.yAxis
|
|
637
|
+
LeftResizeGrip.Rotation = 180
|
|
638
|
+
LeftResizeGrip.Position = UDim2.fromScale(0, 1)
|
|
639
|
+
LeftResizeGrip.Size = UDim2.fromOffset(ResizeButtonSize, ResizeButtonSize)
|
|
640
|
+
LeftResizeGrip.BackgroundTransparency = 1
|
|
641
|
+
LeftResizeGrip.BorderSizePixel = 0
|
|
642
|
+
LeftResizeGrip.Image = widgets.ICONS.BOTTOM_RIGHT_CORNER
|
|
643
|
+
LeftResizeGrip.ImageColor3 = Iris._config.ResizeGripColor
|
|
644
|
+
LeftResizeGrip.ImageTransparency = 1
|
|
645
|
+
LeftResizeGrip.AutoButtonColor = false
|
|
646
|
+
LeftResizeGrip.ZIndex = 3
|
|
647
|
+
LeftResizeGrip.Parent = WindowButton
|
|
648
|
+
|
|
649
|
+
widgets.applyInteractionHighlights("Image", LeftResizeGrip, LeftResizeGrip, {
|
|
650
|
+
Color = Iris._config.ResizeGripColor,
|
|
651
|
+
Transparency = 1,
|
|
652
|
+
HoveredColor = Iris._config.ResizeGripHoveredColor,
|
|
653
|
+
HoveredTransparency = Iris._config.ResizeGripHoveredTransparency,
|
|
654
|
+
ActiveColor = Iris._config.ResizeGripActiveColor,
|
|
655
|
+
ActiveTransparency = Iris._config.ResizeGripActiveTransparency,
|
|
656
|
+
})
|
|
657
|
+
|
|
658
|
+
widgets.applyButtonDown(LeftResizeGrip, function()
|
|
659
|
+
if not anyFocusedWindow or not (focusedWindow == thisWidget) then
|
|
660
|
+
Iris.SetFocusedWindow(thisWidget)
|
|
661
|
+
-- mitigating wrong focus when clicking on buttons inside of a window without clicking the window itself
|
|
662
|
+
end
|
|
663
|
+
isResizing = true
|
|
664
|
+
resizeFromTopBottom = Enum.TopBottom.Bottom
|
|
665
|
+
resizeFromLeftRight = Enum.LeftRight.Left
|
|
666
|
+
resizeWindow = thisWidget
|
|
667
|
+
end)
|
|
668
|
+
|
|
669
|
+
-- each border uses an image, allowing it to have a visible borde which is larger than the UI
|
|
670
|
+
local RightResizeGrip = Instance.new("ImageButton")
|
|
671
|
+
RightResizeGrip.Name = "RightResizeGrip"
|
|
672
|
+
RightResizeGrip.AnchorPoint = Vector2.one
|
|
673
|
+
RightResizeGrip.Rotation = 90
|
|
674
|
+
RightResizeGrip.Position = UDim2.fromScale(1, 1)
|
|
675
|
+
RightResizeGrip.Size = UDim2.fromOffset(ResizeButtonSize, ResizeButtonSize)
|
|
676
|
+
RightResizeGrip.BackgroundTransparency = 1
|
|
677
|
+
RightResizeGrip.BorderSizePixel = 0
|
|
678
|
+
RightResizeGrip.Image = widgets.ICONS.BOTTOM_RIGHT_CORNER
|
|
679
|
+
RightResizeGrip.ImageColor3 = Iris._config.ResizeGripColor
|
|
680
|
+
RightResizeGrip.ImageTransparency = Iris._config.ResizeGripTransparency
|
|
681
|
+
RightResizeGrip.AutoButtonColor = false
|
|
682
|
+
RightResizeGrip.ZIndex = 3
|
|
683
|
+
RightResizeGrip.Parent = WindowButton
|
|
684
|
+
|
|
685
|
+
widgets.applyInteractionHighlights("Image", RightResizeGrip, RightResizeGrip, {
|
|
686
|
+
Color = Iris._config.ResizeGripColor,
|
|
687
|
+
Transparency = Iris._config.ResizeGripTransparency,
|
|
688
|
+
HoveredColor = Iris._config.ResizeGripHoveredColor,
|
|
689
|
+
HoveredTransparency = Iris._config.ResizeGripHoveredTransparency,
|
|
690
|
+
ActiveColor = Iris._config.ResizeGripActiveColor,
|
|
691
|
+
ActiveTransparency = Iris._config.ResizeGripActiveTransparency,
|
|
692
|
+
})
|
|
693
|
+
|
|
694
|
+
widgets.applyButtonDown(RightResizeGrip, function()
|
|
695
|
+
if not anyFocusedWindow or not (focusedWindow == thisWidget) then
|
|
696
|
+
Iris.SetFocusedWindow(thisWidget)
|
|
697
|
+
-- mitigating wrong focus when clicking on buttons inside of a window without clicking the window itself
|
|
698
|
+
end
|
|
699
|
+
isResizing = true
|
|
700
|
+
resizeFromTopBottom = Enum.TopBottom.Bottom
|
|
701
|
+
resizeFromLeftRight = Enum.LeftRight.Right
|
|
702
|
+
resizeWindow = thisWidget
|
|
703
|
+
end)
|
|
704
|
+
|
|
705
|
+
local LeftResizeBorder = Instance.new("ImageButton")
|
|
706
|
+
LeftResizeBorder.Name = "LeftResizeBorder"
|
|
707
|
+
LeftResizeBorder.AnchorPoint = Vector2.new(1, .5)
|
|
708
|
+
LeftResizeBorder.Position = UDim2.fromScale(0, .5)
|
|
709
|
+
LeftResizeBorder.Size = UDim2.new(0, Iris._config.WindowResizePadding.X, 1, 2 * Iris._config.WindowBorderSize)
|
|
710
|
+
LeftResizeBorder.Transparency = 1
|
|
711
|
+
LeftResizeBorder.Image = widgets.ICONS.BORDER
|
|
712
|
+
LeftResizeBorder.ResampleMode = Enum.ResamplerMode.Pixelated
|
|
713
|
+
LeftResizeBorder.ScaleType = Enum.ScaleType.Slice
|
|
714
|
+
LeftResizeBorder.SliceCenter = Rect.new(0, 0, 1, 1)
|
|
715
|
+
LeftResizeBorder.ImageRectOffset = Vector2.new(2, 2)
|
|
716
|
+
LeftResizeBorder.ImageRectSize = Vector2.new(2, 1)
|
|
717
|
+
LeftResizeBorder.ImageTransparency = 1
|
|
718
|
+
LeftResizeBorder.AutoButtonColor = false
|
|
719
|
+
LeftResizeBorder.ZIndex = 4
|
|
720
|
+
|
|
721
|
+
LeftResizeBorder.Parent = WindowButton
|
|
722
|
+
|
|
723
|
+
local RightResizeBorder = Instance.new("ImageButton")
|
|
724
|
+
RightResizeBorder.Name = "RightResizeBorder"
|
|
725
|
+
RightResizeBorder.AnchorPoint = Vector2.new(0, .5)
|
|
726
|
+
RightResizeBorder.Position = UDim2.fromScale(1, .5)
|
|
727
|
+
RightResizeBorder.Size = UDim2.new(0, Iris._config.WindowResizePadding.X, 1, 2 * Iris._config.WindowBorderSize)
|
|
728
|
+
RightResizeBorder.Transparency = 1
|
|
729
|
+
RightResizeBorder.Image = widgets.ICONS.BORDER
|
|
730
|
+
RightResizeBorder.ResampleMode = Enum.ResamplerMode.Pixelated
|
|
731
|
+
RightResizeBorder.ScaleType = Enum.ScaleType.Slice
|
|
732
|
+
RightResizeBorder.SliceCenter = Rect.new(1, 0, 2, 1)
|
|
733
|
+
RightResizeBorder.ImageRectOffset = Vector2.new(1, 2)
|
|
734
|
+
RightResizeBorder.ImageRectSize = Vector2.new(2, 1)
|
|
735
|
+
RightResizeBorder.ImageTransparency = 1
|
|
736
|
+
RightResizeBorder.AutoButtonColor = false
|
|
737
|
+
RightResizeBorder.ZIndex = 4
|
|
738
|
+
|
|
739
|
+
RightResizeBorder.Parent = WindowButton
|
|
740
|
+
|
|
741
|
+
local TopResizeBorder = Instance.new("ImageButton")
|
|
742
|
+
TopResizeBorder.Name = "TopResizeBorder"
|
|
743
|
+
TopResizeBorder.AnchorPoint = Vector2.new(.5, 1)
|
|
744
|
+
TopResizeBorder.Position = UDim2.fromScale(.5, 0)
|
|
745
|
+
TopResizeBorder.Size = UDim2.new(1, 2 * Iris._config.WindowBorderSize, 0, Iris._config.WindowResizePadding.Y)
|
|
746
|
+
TopResizeBorder.Transparency = 1
|
|
747
|
+
TopResizeBorder.Image = widgets.ICONS.BORDER
|
|
748
|
+
TopResizeBorder.ResampleMode = Enum.ResamplerMode.Pixelated
|
|
749
|
+
TopResizeBorder.ScaleType = Enum.ScaleType.Slice
|
|
750
|
+
TopResizeBorder.SliceCenter = Rect.new(0, 0, 1, 1)
|
|
751
|
+
TopResizeBorder.ImageRectOffset = Vector2.new(2, 2)
|
|
752
|
+
TopResizeBorder.ImageRectSize = Vector2.new(1, 2)
|
|
753
|
+
TopResizeBorder.ImageTransparency = 1
|
|
754
|
+
TopResizeBorder.AutoButtonColor = false
|
|
755
|
+
TopResizeBorder.ZIndex = 4
|
|
756
|
+
|
|
757
|
+
TopResizeBorder.Parent = WindowButton
|
|
758
|
+
|
|
759
|
+
local BottomResizeBorder = Instance.new("ImageButton")
|
|
760
|
+
BottomResizeBorder.Name = "BottomResizeBorder"
|
|
761
|
+
BottomResizeBorder.AnchorPoint = Vector2.new(.5, 0)
|
|
762
|
+
BottomResizeBorder.Position = UDim2.fromScale(.5, 1)
|
|
763
|
+
BottomResizeBorder.Size = UDim2.new(1, 2 * Iris._config.WindowBorderSize, 0, Iris._config.WindowResizePadding.Y)
|
|
764
|
+
BottomResizeBorder.Transparency = 1
|
|
765
|
+
BottomResizeBorder.Image = widgets.ICONS.BORDER
|
|
766
|
+
BottomResizeBorder.ResampleMode = Enum.ResamplerMode.Pixelated
|
|
767
|
+
BottomResizeBorder.ScaleType = Enum.ScaleType.Slice
|
|
768
|
+
BottomResizeBorder.SliceCenter = Rect.new(0, 1, 1, 2)
|
|
769
|
+
BottomResizeBorder.ImageRectOffset = Vector2.new(2, 1)
|
|
770
|
+
BottomResizeBorder.ImageRectSize = Vector2.new(1, 2)
|
|
771
|
+
BottomResizeBorder.ImageTransparency = 1
|
|
772
|
+
BottomResizeBorder.AutoButtonColor = false
|
|
773
|
+
BottomResizeBorder.ZIndex = 4
|
|
774
|
+
|
|
775
|
+
BottomResizeBorder.Parent = WindowButton
|
|
776
|
+
|
|
777
|
+
widgets.applyInteractionHighlights("Image", LeftResizeBorder, LeftResizeBorder, {
|
|
778
|
+
Color = Iris._config.ResizeGripColor,
|
|
779
|
+
Transparency = 1,
|
|
780
|
+
HoveredColor = Iris._config.ResizeGripHoveredColor,
|
|
781
|
+
HoveredTransparency = Iris._config.ResizeGripHoveredTransparency,
|
|
782
|
+
ActiveColor = Iris._config.ResizeGripActiveColor,
|
|
783
|
+
ActiveTransparency = Iris._config.ResizeGripActiveTransparency,
|
|
784
|
+
})
|
|
785
|
+
|
|
786
|
+
widgets.applyInteractionHighlights("Image", RightResizeBorder, RightResizeBorder, {
|
|
787
|
+
Color = Iris._config.ResizeGripColor,
|
|
788
|
+
Transparency = 1,
|
|
789
|
+
HoveredColor = Iris._config.ResizeGripHoveredColor,
|
|
790
|
+
HoveredTransparency = Iris._config.ResizeGripHoveredTransparency,
|
|
791
|
+
ActiveColor = Iris._config.ResizeGripActiveColor,
|
|
792
|
+
ActiveTransparency = Iris._config.ResizeGripActiveTransparency,
|
|
793
|
+
})
|
|
794
|
+
|
|
795
|
+
widgets.applyInteractionHighlights("Image", TopResizeBorder, TopResizeBorder, {
|
|
796
|
+
Color = Iris._config.ResizeGripColor,
|
|
797
|
+
Transparency = 1,
|
|
798
|
+
HoveredColor = Iris._config.ResizeGripHoveredColor,
|
|
799
|
+
HoveredTransparency = Iris._config.ResizeGripHoveredTransparency,
|
|
800
|
+
ActiveColor = Iris._config.ResizeGripActiveColor,
|
|
801
|
+
ActiveTransparency = Iris._config.ResizeGripActiveTransparency,
|
|
802
|
+
})
|
|
803
|
+
|
|
804
|
+
widgets.applyInteractionHighlights("Image", BottomResizeBorder, BottomResizeBorder, {
|
|
805
|
+
Color = Iris._config.ResizeGripColor,
|
|
806
|
+
Transparency = 1,
|
|
807
|
+
HoveredColor = Iris._config.ResizeGripHoveredColor,
|
|
808
|
+
HoveredTransparency = Iris._config.ResizeGripHoveredTransparency,
|
|
809
|
+
ActiveColor = Iris._config.ResizeGripActiveColor,
|
|
810
|
+
ActiveTransparency = Iris._config.ResizeGripActiveTransparency,
|
|
811
|
+
})
|
|
812
|
+
|
|
813
|
+
local ResizeBorder = Instance.new("Frame")
|
|
814
|
+
ResizeBorder.Name = "ResizeBorder"
|
|
815
|
+
ResizeBorder.Position = UDim2.fromOffset(-Iris._config.WindowResizePadding.X, -Iris._config.WindowResizePadding.Y)
|
|
816
|
+
ResizeBorder.Size = UDim2.new(1, Iris._config.WindowResizePadding.X * 2, 1, Iris._config.WindowResizePadding.Y * 2)
|
|
817
|
+
ResizeBorder.BackgroundTransparency = 1
|
|
818
|
+
ResizeBorder.BorderSizePixel = 0
|
|
819
|
+
ResizeBorder.Active = false
|
|
820
|
+
ResizeBorder.Selectable = false
|
|
821
|
+
ResizeBorder.ClipsDescendants = false
|
|
822
|
+
ResizeBorder.Parent = WindowButton
|
|
823
|
+
|
|
824
|
+
widgets.applyMouseEnter(ResizeBorder, function()
|
|
825
|
+
if focusedWindow == thisWidget then
|
|
826
|
+
isInsideResize = true
|
|
827
|
+
end
|
|
828
|
+
end)
|
|
829
|
+
widgets.applyMouseLeave(ResizeBorder, function()
|
|
830
|
+
if focusedWindow == thisWidget then
|
|
831
|
+
isInsideResize = false
|
|
832
|
+
end
|
|
833
|
+
end)
|
|
834
|
+
widgets.applyInputBegan(ResizeBorder, function(input)
|
|
835
|
+
if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Keyboard then
|
|
836
|
+
return
|
|
837
|
+
end
|
|
838
|
+
if thisWidget.state.isUncollapsed.value then
|
|
839
|
+
Iris.SetFocusedWindow(thisWidget)
|
|
840
|
+
end
|
|
841
|
+
end)
|
|
842
|
+
|
|
843
|
+
widgets.applyMouseEnter(WindowButton, function()
|
|
844
|
+
if focusedWindow == thisWidget then
|
|
845
|
+
isInsideWindow = true
|
|
846
|
+
end
|
|
847
|
+
end)
|
|
848
|
+
widgets.applyMouseLeave(WindowButton, function()
|
|
849
|
+
if focusedWindow == thisWidget then
|
|
850
|
+
isInsideWindow = false
|
|
851
|
+
end
|
|
852
|
+
end)
|
|
853
|
+
|
|
854
|
+
thisWidget.ChildContainer = ChildContainer
|
|
855
|
+
return Window
|
|
856
|
+
end,
|
|
857
|
+
GenerateState = function(thisWidget: Types.Window)
|
|
858
|
+
if thisWidget.state.size == nil then
|
|
859
|
+
thisWidget.state.size = Iris._widgetState(thisWidget, "size", Vector2.new(400, 300))
|
|
860
|
+
end
|
|
861
|
+
if thisWidget.state.position == nil then
|
|
862
|
+
thisWidget.state.position = Iris._widgetState(thisWidget, "position", if anyFocusedWindow and focusedWindow then focusedWindow.state.position.value + Vector2.new(15, 45) else Vector2.new(150, 250))
|
|
863
|
+
end
|
|
864
|
+
thisWidget.state.position.value = fitPositionToWindowBounds(thisWidget, thisWidget.state.position.value)
|
|
865
|
+
thisWidget.state.size.value = fitSizeToWindowBounds(thisWidget, thisWidget.state.size.value)
|
|
866
|
+
|
|
867
|
+
if thisWidget.state.isUncollapsed == nil then
|
|
868
|
+
thisWidget.state.isUncollapsed = Iris._widgetState(thisWidget, "isUncollapsed", true)
|
|
869
|
+
end
|
|
870
|
+
if thisWidget.state.isOpened == nil then
|
|
871
|
+
thisWidget.state.isOpened = Iris._widgetState(thisWidget, "isOpened", true)
|
|
872
|
+
end
|
|
873
|
+
if thisWidget.state.scrollDistance == nil then
|
|
874
|
+
thisWidget.state.scrollDistance = Iris._widgetState(thisWidget, "scrollDistance", 0)
|
|
875
|
+
end
|
|
876
|
+
end,
|
|
877
|
+
Update = function(thisWidget: Types.Window)
|
|
878
|
+
local Window = thisWidget.Instance :: GuiObject
|
|
879
|
+
local ChildContainer = thisWidget.ChildContainer :: ScrollingFrame
|
|
880
|
+
local WindowButton = Window.WindowButton :: TextButton
|
|
881
|
+
local Content = WindowButton.Content :: Frame
|
|
882
|
+
local TitleBar = Content.TitleBar :: Frame
|
|
883
|
+
local Title: TextLabel = TitleBar.Title
|
|
884
|
+
local MenuBar: Frame? = Content:FindFirstChild("Iris_MenuBar")
|
|
885
|
+
local LeftResizeGrip: TextButton = WindowButton.LeftResizeGrip
|
|
886
|
+
local RightResizeGrip: TextButton = WindowButton.RightResizeGrip
|
|
887
|
+
local LeftResizeBorder: Frame = WindowButton.LeftResizeBorder
|
|
888
|
+
local RightResizeBorder: Frame = WindowButton.RightResizeBorder
|
|
889
|
+
local TopResizeBorder: Frame = WindowButton.TopResizeBorder
|
|
890
|
+
local BottomResizeBorder: Frame = WindowButton.BottomResizeBorder
|
|
891
|
+
|
|
892
|
+
if thisWidget.arguments.NoResize ~= true then
|
|
893
|
+
LeftResizeGrip.Visible = true
|
|
894
|
+
RightResizeGrip.Visible = true
|
|
895
|
+
LeftResizeBorder.Visible = true
|
|
896
|
+
RightResizeBorder.Visible = true
|
|
897
|
+
TopResizeBorder.Visible = true
|
|
898
|
+
BottomResizeBorder.Visible = true
|
|
899
|
+
else
|
|
900
|
+
LeftResizeGrip.Visible = false
|
|
901
|
+
RightResizeGrip.Visible = false
|
|
902
|
+
LeftResizeBorder.Visible = false
|
|
903
|
+
RightResizeBorder.Visible = false
|
|
904
|
+
TopResizeBorder.Visible = false
|
|
905
|
+
BottomResizeBorder.Visible = false
|
|
906
|
+
end
|
|
907
|
+
if thisWidget.arguments.NoScrollbar then
|
|
908
|
+
ChildContainer.ScrollBarThickness = 0
|
|
909
|
+
else
|
|
910
|
+
ChildContainer.ScrollBarThickness = Iris._config.ScrollbarSize
|
|
911
|
+
end
|
|
912
|
+
if thisWidget.arguments.NoTitleBar then
|
|
913
|
+
TitleBar.Visible = false
|
|
914
|
+
else
|
|
915
|
+
TitleBar.Visible = true
|
|
916
|
+
end
|
|
917
|
+
if MenuBar then
|
|
918
|
+
if thisWidget.arguments.NoMenu then
|
|
919
|
+
MenuBar.Visible = false
|
|
920
|
+
else
|
|
921
|
+
MenuBar.Visible = true
|
|
922
|
+
end
|
|
923
|
+
end
|
|
924
|
+
if thisWidget.arguments.NoBackground then
|
|
925
|
+
ChildContainer.BackgroundTransparency = 1
|
|
926
|
+
else
|
|
927
|
+
ChildContainer.BackgroundTransparency = Iris._config.WindowBgTransparency
|
|
928
|
+
end
|
|
929
|
+
|
|
930
|
+
-- TitleBar buttons
|
|
931
|
+
if thisWidget.arguments.NoCollapse then
|
|
932
|
+
TitleBar.CollapseButton.Visible = false
|
|
933
|
+
else
|
|
934
|
+
TitleBar.CollapseButton.Visible = true
|
|
935
|
+
end
|
|
936
|
+
if thisWidget.arguments.NoClose then
|
|
937
|
+
TitleBar.CloseButton.Visible = false
|
|
938
|
+
else
|
|
939
|
+
TitleBar.CloseButton.Visible = true
|
|
940
|
+
end
|
|
941
|
+
|
|
942
|
+
Title.Text = thisWidget.arguments.Title or ""
|
|
943
|
+
end,
|
|
944
|
+
UpdateState = function(thisWidget: Types.Window)
|
|
945
|
+
local stateSize = thisWidget.state.size.value
|
|
946
|
+
local statePosition = thisWidget.state.position.value
|
|
947
|
+
local stateIsUncollapsed = thisWidget.state.isUncollapsed.value
|
|
948
|
+
local stateIsOpened = thisWidget.state.isOpened.value
|
|
949
|
+
local stateScrollDistance = thisWidget.state.scrollDistance.value
|
|
950
|
+
|
|
951
|
+
local Window = thisWidget.Instance :: Frame
|
|
952
|
+
local ChildContainer = thisWidget.ChildContainer :: ScrollingFrame
|
|
953
|
+
local WindowButton = Window.WindowButton :: TextButton
|
|
954
|
+
local Content = WindowButton.Content :: Frame
|
|
955
|
+
local TitleBar = Content.TitleBar :: Frame
|
|
956
|
+
local MenuBar: Frame? = Content:FindFirstChild("Iris_MenuBar")
|
|
957
|
+
local LeftResizeGrip: TextButton = WindowButton.LeftResizeGrip
|
|
958
|
+
local RightResizeGrip: TextButton = WindowButton.RightResizeGrip
|
|
959
|
+
local LeftResizeBorder: Frame = WindowButton.LeftResizeBorder
|
|
960
|
+
local RightResizeBorder: Frame = WindowButton.RightResizeBorder
|
|
961
|
+
local TopResizeBorder: Frame = WindowButton.TopResizeBorder
|
|
962
|
+
local BottomResizeBorder: Frame = WindowButton.BottomResizeBorder
|
|
963
|
+
|
|
964
|
+
WindowButton.Size = UDim2.fromOffset(stateSize.X, stateSize.Y)
|
|
965
|
+
WindowButton.Position = UDim2.fromOffset(statePosition.X, statePosition.Y)
|
|
966
|
+
|
|
967
|
+
if stateIsOpened then
|
|
968
|
+
if thisWidget.usesScreenGuis then
|
|
969
|
+
Window.Enabled = true
|
|
970
|
+
WindowButton.Visible = true
|
|
971
|
+
else
|
|
972
|
+
Window.Visible = true
|
|
973
|
+
WindowButton.Visible = true
|
|
974
|
+
end
|
|
975
|
+
thisWidget.lastOpenedTick = Iris._cycleTick + 1
|
|
976
|
+
else
|
|
977
|
+
if thisWidget.usesScreenGuis then
|
|
978
|
+
Window.Enabled = false
|
|
979
|
+
WindowButton.Visible = false
|
|
980
|
+
else
|
|
981
|
+
Window.Visible = false
|
|
982
|
+
WindowButton.Visible = false
|
|
983
|
+
end
|
|
984
|
+
thisWidget.lastClosedTick = Iris._cycleTick + 1
|
|
985
|
+
end
|
|
986
|
+
|
|
987
|
+
if stateIsUncollapsed then
|
|
988
|
+
TitleBar.CollapseButton.Arrow.Image = widgets.ICONS.DOWN_POINTING_TRIANGLE
|
|
989
|
+
if MenuBar then
|
|
990
|
+
MenuBar.Visible = not thisWidget.arguments.NoMenu
|
|
991
|
+
end
|
|
992
|
+
ChildContainer.Visible = true
|
|
993
|
+
if thisWidget.arguments.NoResize ~= true then
|
|
994
|
+
LeftResizeGrip.Visible = true
|
|
995
|
+
RightResizeGrip.Visible = true
|
|
996
|
+
LeftResizeBorder.Visible = true
|
|
997
|
+
RightResizeBorder.Visible = true
|
|
998
|
+
TopResizeBorder.Visible = true
|
|
999
|
+
BottomResizeBorder.Visible = true
|
|
1000
|
+
end
|
|
1001
|
+
WindowButton.AutomaticSize = Enum.AutomaticSize.None
|
|
1002
|
+
thisWidget.lastUncollapsedTick = Iris._cycleTick + 1
|
|
1003
|
+
else
|
|
1004
|
+
local collapsedHeight: number = TitleBar.AbsoluteSize.Y -- Iris._config.TextSize + Iris._config.FramePadding.Y * 2
|
|
1005
|
+
TitleBar.CollapseButton.Arrow.Image = widgets.ICONS.RIGHT_POINTING_TRIANGLE
|
|
1006
|
+
|
|
1007
|
+
if MenuBar then
|
|
1008
|
+
MenuBar.Visible = false
|
|
1009
|
+
end
|
|
1010
|
+
ChildContainer.Visible = false
|
|
1011
|
+
LeftResizeGrip.Visible = false
|
|
1012
|
+
RightResizeGrip.Visible = false
|
|
1013
|
+
LeftResizeBorder.Visible = false
|
|
1014
|
+
RightResizeBorder.Visible = false
|
|
1015
|
+
TopResizeBorder.Visible = false
|
|
1016
|
+
BottomResizeBorder.Visible = false
|
|
1017
|
+
WindowButton.Size = UDim2.fromOffset(stateSize.X, collapsedHeight)
|
|
1018
|
+
thisWidget.lastCollapsedTick = Iris._cycleTick + 1
|
|
1019
|
+
end
|
|
1020
|
+
|
|
1021
|
+
if stateIsOpened and stateIsUncollapsed then
|
|
1022
|
+
Iris.SetFocusedWindow(thisWidget)
|
|
1023
|
+
else
|
|
1024
|
+
TitleBar.BackgroundColor3 = Iris._config.TitleBgCollapsedColor
|
|
1025
|
+
TitleBar.BackgroundTransparency = Iris._config.TitleBgCollapsedTransparency
|
|
1026
|
+
WindowButton.UIStroke.Color = Iris._config.BorderColor
|
|
1027
|
+
|
|
1028
|
+
Iris.SetFocusedWindow(nil)
|
|
1029
|
+
end
|
|
1030
|
+
|
|
1031
|
+
-- cant update canvasPosition in this cycle because scrollingframe isint ready to be changed
|
|
1032
|
+
if stateScrollDistance and stateScrollDistance ~= 0 then
|
|
1033
|
+
local callbackIndex = #Iris._postCycleCallbacks + 1
|
|
1034
|
+
local desiredCycleTick = Iris._cycleTick + 1
|
|
1035
|
+
Iris._postCycleCallbacks[callbackIndex] = function()
|
|
1036
|
+
if Iris._cycleTick >= desiredCycleTick then
|
|
1037
|
+
if thisWidget.lastCycleTick ~= -1 then
|
|
1038
|
+
ChildContainer.CanvasPosition = Vector2.new(0, stateScrollDistance)
|
|
1039
|
+
end
|
|
1040
|
+
Iris._postCycleCallbacks[callbackIndex] = nil
|
|
1041
|
+
end
|
|
1042
|
+
end
|
|
1043
|
+
end
|
|
1044
|
+
end,
|
|
1045
|
+
ChildAdded = function(thisWidget: Types.Window, thisChid: Types.Widget)
|
|
1046
|
+
local Window = thisWidget.Instance :: Frame
|
|
1047
|
+
local WindowButton = Window.WindowButton :: TextButton
|
|
1048
|
+
local Content = WindowButton.Content :: Frame
|
|
1049
|
+
if thisChid.type == "MenuBar" then
|
|
1050
|
+
local ChildContainer = thisWidget.ChildContainer :: ScrollingFrame
|
|
1051
|
+
thisChid.Instance.ZIndex = ChildContainer.ZIndex + 1
|
|
1052
|
+
thisChid.Instance.LayoutOrder = ChildContainer.LayoutOrder - 1
|
|
1053
|
+
return Content
|
|
1054
|
+
end
|
|
1055
|
+
return thisWidget.ChildContainer
|
|
1056
|
+
end,
|
|
1057
|
+
Discard = function(thisWidget: Types.Window)
|
|
1058
|
+
if focusedWindow == thisWidget then
|
|
1059
|
+
focusedWindow = nil
|
|
1060
|
+
anyFocusedWindow = false
|
|
1061
|
+
end
|
|
1062
|
+
if dragWindow == thisWidget then
|
|
1063
|
+
dragWindow = nil
|
|
1064
|
+
isDragging = false
|
|
1065
|
+
end
|
|
1066
|
+
if resizeWindow == thisWidget then
|
|
1067
|
+
resizeWindow = nil
|
|
1068
|
+
isResizing = false
|
|
1069
|
+
end
|
|
1070
|
+
windowWidgets[thisWidget.ID] = nil
|
|
1071
|
+
thisWidget.Instance:Destroy()
|
|
1072
|
+
widgets.discardState(thisWidget)
|
|
1073
|
+
end,
|
|
1074
|
+
} :: Types.WidgetClass)
|
|
1075
|
+
end
|