@quenty/genericscreenguiprovider 3.3.1-canary.c50dead.0 → 3.4.1

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 CHANGED
@@ -3,12 +3,20 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [3.3.1-canary.c50dead.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/genericscreenguiprovider@3.3.0...@quenty/genericscreenguiprovider@3.3.1-canary.c50dead.0) (2021-11-20)
6
+ ## [3.4.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/genericscreenguiprovider@3.4.0...@quenty/genericscreenguiprovider@3.4.1) (2021-12-30)
7
+
8
+ **Note:** Version bump only for package @quenty/genericscreenguiprovider
9
+
10
+
11
+
12
+
13
+
14
+ # [3.4.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/genericscreenguiprovider@3.3.0...@quenty/genericscreenguiprovider@3.4.0) (2021-11-20)
7
15
 
8
16
 
9
17
  ### Bug Fixes
10
18
 
11
- * Support MacOS syncing ([c50dead](https://github.com/Quenty/NevermoreEngine/commit/c50deadbe5ebe479aded04e1619441a08ff0e9a8))
19
+ * Support MacOS syncing ([#225](https://github.com/Quenty/NevermoreEngine/issues/225)) ([03f9183](https://github.com/Quenty/NevermoreEngine/commit/03f918392c6a5bdd33f8a17c38de371d1e06c67a))
12
20
 
13
21
 
14
22
 
package/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2014 Quenty
3
+ Copyright (c) 2014-2021 Quenty
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  ## GenericScreenGuiProvider
2
2
  <div align="center">
3
- <a href="http://quenty.github.io/api/">
4
- <img src="https://img.shields.io/badge/docs-website-green.svg" alt="Documentation" />
3
+ <a href="http://quenty.github.io/NevermoreEngine/">
4
+ <img src="https://github.com/Quenty/NevermoreEngine/actions/workflows/docs.yml/badge.svg" alt="Documentation status" />
5
5
  </a>
6
6
  <a href="https://discord.gg/mhtGUS8">
7
- <img src="https://img.shields.io/badge/discord-nevermore-blue.svg" alt="Discord" />
7
+ <img src="https://img.shields.io/discord/385151591524597761?color=5865F2&label=discord&logo=discord&logoColor=white" alt="Discord" />
8
8
  </a>
9
9
  <a href="https://github.com/Quenty/NevermoreEngine/actions">
10
10
  <img src="https://github.com/Quenty/NevermoreEngine/actions/workflows/build.yml/badge.svg" alt="Build and release status" />
@@ -13,44 +13,9 @@
13
13
 
14
14
  Providers screenGuis with a given display order for easy use
15
15
 
16
+ <div align="center"><a href="https://quenty.github.io/NevermoreEngine/api/GenericScreenGuiProvider">View docs →</a></div>
17
+
16
18
  ## Installation
17
19
  ```
18
20
  npm install @quenty/genericscreenguiprovider --save
19
- ```
20
-
21
- ## Usage
22
- Usage is designed to be simple.
23
-
24
- ```lua
25
- -- ScreenGuiProvider.lua
26
-
27
-
28
- return GenericScreenGuiProvider.new({
29
- CLOCK = 5; -- Register layers here
30
- BLAH = 8;
31
- CHAT = 10;
32
- })
33
- ```
34
-
35
- In a script that needs a new screen gui, do this:
36
-
37
- ```lua
38
- -- Load your games provider (see above for the registration)
39
- local screenGuiProvider = require("ScreenGuiProvider")
40
-
41
- -- Yay, you now have a new screen gui
42
- local screenGui = screenGuiProvider:Get("CLOCK")
43
- gui.Parent = screenGui
44
- ```
45
-
46
- ## API
47
-
48
- ### `GenericScreenGuiProvider.new(orders)`
49
-
50
- ### `GenericScreenGuiProvider:Get(orderName)`
51
- Returns a new ScreenGui at DisplayOrder specified
52
-
53
- ### `GenericScreenGuiProvider:GetDisplayOrder(orderName)`
54
-
55
- ### `GenericScreenGuiProvider:SetupMockParent(target)`
56
-
21
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/genericscreenguiprovider",
3
- "version": "3.3.1-canary.c50dead.0",
3
+ "version": "3.4.1",
4
4
  "description": "Providers screenGuis with a given display order for easy use",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -24,12 +24,12 @@
24
24
  "Quenty"
25
25
  ],
26
26
  "dependencies": {
27
- "@quenty/loader": "3.1.1",
28
- "@quenty/string": "2.2.0",
29
- "@quenty/uiobjectutils": "2.0.0"
27
+ "@quenty/loader": "^3.1.2",
28
+ "@quenty/string": "^2.2.1",
29
+ "@quenty/uiobjectutils": "^2.0.1"
30
30
  },
31
31
  "publishConfig": {
32
32
  "access": "public"
33
33
  },
34
- "gitHead": "c50deadbe5ebe479aded04e1619441a08ff0e9a8"
34
+ "gitHead": "d146c77d0a8e452824de0ab0b4b03ba0370bcc1b"
35
35
  }
@@ -1,6 +1,27 @@
1
- --- Providers screenGuis with a given display order for easy use
2
- -- @module GenericScreenGuiProvider
3
- -- @author Quenty
1
+ --[=[
2
+ Providers screenGuis with a given display order for easy use.
3
+
4
+ ```lua
5
+ return GenericScreenGuiProvider.new({
6
+ CLOCK = 5; -- Register layers here
7
+ BLAH = 8;
8
+ CHAT = 10;
9
+ })
10
+ ```
11
+
12
+ In a script that needs a new screen gui, do this:
13
+
14
+ ```lua
15
+ -- Load your games provider (see above for the registration)
16
+ local screenGuiProvider = require("ScreenGuiProvider")
17
+
18
+ -- Yay, you now have a new screen gui
19
+ local screenGui = screenGuiProvider:Get("CLOCK")
20
+ gui.Parent = screenGui
21
+ ```
22
+
23
+ @class GenericScreenGuiProvider
24
+ ]=]
4
25
 
5
26
  local require = require(script.Parent.loader).load(script)
6
27
 
@@ -13,6 +34,11 @@ local PlayerGuiUtils = require("PlayerGuiUtils")
13
34
  local GenericScreenGuiProvider = {}
14
35
  GenericScreenGuiProvider.ClassName = GenericScreenGuiProvider
15
36
 
37
+ --[=[
38
+ Constructs a new screen gui provider.
39
+ @param orders { [string]: number }
40
+ @return GenericScreenGuiProvider
41
+ ]=]
16
42
  function GenericScreenGuiProvider.new(orders)
17
43
  assert(type(orders) == "table", "Bad orders")
18
44
 
@@ -35,8 +61,11 @@ function GenericScreenGuiProvider:__newindex(index, _)
35
61
  error(("Bad index %q"):format(tostring(index)), 2)
36
62
  end
37
63
 
38
- --- Returns a new ScreenGui at DisplayOrder specified
39
- -- @tparam string orderName Order name of screenGui
64
+ --[=[
65
+ Returns a new ScreenGui at DisplayOrder specified
66
+ @param orderName string -- Order name of display order
67
+ @return ScreenGui
68
+ ]=]
40
69
  function GenericScreenGuiProvider:Get(orderName)
41
70
  if not RunService:IsRunning() then
42
71
  return self:_mockScreenGui(orderName)
@@ -58,6 +87,11 @@ function GenericScreenGuiProvider:Get(orderName)
58
87
  return screenGui
59
88
  end
60
89
 
90
+ --[=[
91
+ Retrieve the display order for a given order.
92
+ @param orderName string -- Order name of display order
93
+ @return number
94
+ ]=]
61
95
  function GenericScreenGuiProvider:GetDisplayOrder(orderName)
62
96
  assert(type(orderName) == "string", "Bad orderName")
63
97
  assert(self._order[orderName], ("No DisplayOrder with orderName '%s'"):format(tostring(orderName)))
@@ -65,6 +99,11 @@ function GenericScreenGuiProvider:GetDisplayOrder(orderName)
65
99
  return self._order[orderName]
66
100
  end
67
101
 
102
+ --[=[
103
+ Sets up a mock parent for the given target during test mode.
104
+ @param target GuiBase
105
+ @return function -- Cleanup function to reset mock parent
106
+ ]=]
68
107
  function GenericScreenGuiProvider:SetupMockParent(target)
69
108
  assert(not RunService:IsRunning(), "Bad target")
70
109
  assert(target, "Bad target")