@quenty/genericscreenguiprovider 8.3.1-canary.d08dd64.0 → 8.4.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 CHANGED
@@ -3,9 +3,12 @@
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
- ## [8.3.1-canary.d08dd64.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/genericscreenguiprovider@8.3.0...@quenty/genericscreenguiprovider@8.3.1-canary.d08dd64.0) (2024-01-01)
6
+ # [8.4.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/genericscreenguiprovider@8.3.0...@quenty/genericscreenguiprovider@8.4.0) (2024-01-08)
7
7
 
8
- **Note:** Version bump only for package @quenty/genericscreenguiprovider
8
+
9
+ ### Features
10
+
11
+ * Allow SetGuiParent to return a calback ([b2a9239](https://github.com/Quenty/NevermoreEngine/commit/b2a923967653f886f230fc868debb82d698f70b9))
9
12
 
10
13
 
11
14
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/genericscreenguiprovider",
3
- "version": "8.3.1-canary.d08dd64.0",
3
+ "version": "8.4.0",
4
4
  "description": "Providers screenGuis with a given display order for easy use",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -24,16 +24,16 @@
24
24
  "Quenty"
25
25
  ],
26
26
  "dependencies": {
27
- "@quenty/blend": "7.3.1-canary.d08dd64.0",
28
- "@quenty/loader": "7.1.1-canary.d08dd64.0",
29
- "@quenty/maid": "2.6.0",
30
- "@quenty/servicebag": "7.1.1-canary.d08dd64.0",
31
- "@quenty/string": "3.1.0",
32
- "@quenty/uiobjectutils": "3.5.1-canary.d08dd64.0",
33
- "@quenty/valueobject": "8.3.1-canary.d08dd64.0"
27
+ "@quenty/blend": "^7.4.0",
28
+ "@quenty/loader": "^7.3.0",
29
+ "@quenty/maid": "^2.6.0",
30
+ "@quenty/servicebag": "^7.2.0",
31
+ "@quenty/string": "^3.1.0",
32
+ "@quenty/uiobjectutils": "^3.6.0",
33
+ "@quenty/valueobject": "^8.4.0"
34
34
  },
35
35
  "publishConfig": {
36
36
  "access": "public"
37
37
  },
38
- "gitHead": "d08dd641615f51bc83b2fe46f11f41bd95acdec1"
38
+ "gitHead": "075fb03a03f12ade8758f667767ba738204e0c4b"
39
39
  }
@@ -1,4 +1,7 @@
1
1
  --[=[
2
+ Centralized provider so Hoarcekat stories can bootstrap in a fake PlayerGui
3
+
4
+ @client
2
5
  @class ScreenGuiService
3
6
  ]=]
4
7
 
@@ -13,6 +16,11 @@ local PlayerGuiUtils = require("PlayerGuiUtils")
13
16
  local ScreenGuiService = {}
14
17
  ScreenGuiService.ServiceName = "ScreenGuiService"
15
18
 
19
+ --[=[
20
+ Initializes the ScreenGuiService
21
+
22
+ @param serviceBag ServiceBag
23
+ ]=]
16
24
  function ScreenGuiService:Init(serviceBag)
17
25
  assert(not self._serviceBag, "Already initialized")
18
26
  self._serviceBag = assert(serviceBag, "No serviceBag")
@@ -20,18 +28,40 @@ function ScreenGuiService:Init(serviceBag)
20
28
  self:_ensureInit()
21
29
  end
22
30
 
31
+ --[=[
32
+ Gets the current player gui to use
33
+
34
+ return ScreenGui?
35
+ ]=]
23
36
  function ScreenGuiService:GetPlayerGui()
24
37
  self:_ensureInit()
25
38
 
26
39
  return self._playerGui.Value
27
40
  end
28
41
 
42
+ --[=[
43
+ Sets the current playerGui to use
44
+
45
+ @param playerGui PlayerGui | Instance
46
+ return MaidTask
47
+ ]=]
29
48
  function ScreenGuiService:SetGuiParent(playerGui)
30
49
  self:_ensureInit()
31
50
 
32
51
  self._playerGui.Value = playerGui
52
+
53
+ return function()
54
+ if self._playerGui.Value == playerGui then
55
+ self._playerGui.Value = nil
56
+ end
57
+ end
33
58
  end
34
59
 
60
+ --[=[
61
+ Observes the player gui to parent stuff into
62
+
63
+ return Observable<ScreenGui?>
64
+ ]=]
35
65
  function ScreenGuiService:ObservePlayerGui()
36
66
  self:_ensureInit()
37
67
 
@@ -56,6 +86,9 @@ function ScreenGuiService:_ensureInit()
56
86
  end
57
87
  end
58
88
 
89
+ --[=[
90
+ Cleans up the ScreenGuiService
91
+ ]=]
59
92
  function ScreenGuiService:Destroy()
60
93
  self._maid:DoCleaning()
61
94
  end