@quenty/screenshothudservice 7.18.2-canary.547.ba47c62.0 → 7.18.3-canary.550.afa1b3b.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,7 +3,15 @@
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
- ## [7.18.2-canary.547.ba47c62.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/screenshothudservice@7.18.0...@quenty/screenshothudservice@7.18.2-canary.547.ba47c62.0) (2025-04-07)
6
+ ## [7.18.3-canary.550.afa1b3b.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/screenshothudservice@7.18.2...@quenty/screenshothudservice@7.18.3-canary.550.afa1b3b.0) (2025-04-10)
7
+
8
+ **Note:** Version bump only for package @quenty/screenshothudservice
9
+
10
+
11
+
12
+
13
+
14
+ ## [7.18.2](https://github.com/Quenty/NevermoreEngine/compare/@quenty/screenshothudservice@7.18.0...@quenty/screenshothudservice@7.18.2) (2025-04-07)
7
15
 
8
16
 
9
17
  ### Bug Fixes
package/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2014-2024 James Onnen (Quenty)
3
+ Copyright (c) 2014-2025 James Onnen (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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/screenshothudservice",
3
- "version": "7.18.2-canary.547.ba47c62.0",
3
+ "version": "7.18.3-canary.550.afa1b3b.0",
4
4
  "description": "Provides centralized API surface for screenshot hud API",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -25,20 +25,20 @@
25
25
  "Quenty"
26
26
  ],
27
27
  "dependencies": {
28
- "@quenty/baseobject": "10.8.2-canary.547.ba47c62.0",
29
- "@quenty/brio": "14.17.2-canary.547.ba47c62.0",
30
- "@quenty/instanceutils": "13.17.2-canary.547.ba47c62.0",
31
- "@quenty/loader": "10.8.2-canary.547.ba47c62.0",
32
- "@quenty/maid": "3.4.2-canary.547.ba47c62.0",
33
- "@quenty/promise": "10.10.3-canary.547.ba47c62.0",
34
- "@quenty/rx": "13.17.2-canary.547.ba47c62.0",
35
- "@quenty/servicebag": "11.11.3-canary.547.ba47c62.0",
36
- "@quenty/signal": "7.10.2-canary.547.ba47c62.0",
37
- "@quenty/statestack": "14.18.2-canary.547.ba47c62.0",
38
- "@quenty/valueobject": "13.17.2-canary.547.ba47c62.0"
28
+ "@quenty/baseobject": "10.8.3-canary.550.afa1b3b.0",
29
+ "@quenty/brio": "14.17.3-canary.550.afa1b3b.0",
30
+ "@quenty/instanceutils": "13.17.3-canary.550.afa1b3b.0",
31
+ "@quenty/loader": "10.8.3-canary.550.afa1b3b.0",
32
+ "@quenty/maid": "3.4.3-canary.550.afa1b3b.0",
33
+ "@quenty/promise": "10.10.4-canary.550.afa1b3b.0",
34
+ "@quenty/rx": "13.17.3-canary.550.afa1b3b.0",
35
+ "@quenty/servicebag": "11.11.4-canary.550.afa1b3b.0",
36
+ "@quenty/signal": "7.10.3-canary.550.afa1b3b.0",
37
+ "@quenty/statestack": "14.18.3-canary.550.afa1b3b.0",
38
+ "@quenty/valueobject": "13.17.3-canary.550.afa1b3b.0"
39
39
  },
40
40
  "publishConfig": {
41
41
  "access": "public"
42
42
  },
43
- "gitHead": "ba47c62e32170bf74377b0c658c60b84306dc294"
43
+ "gitHead": "afa1b3b99b862698c3ab46009497bd507150867c"
44
44
  }
@@ -1,3 +1,4 @@
1
+ --!strict
1
2
  --[=[
2
3
  @class ScreenshotHudModel
3
4
  ]=]
@@ -7,36 +8,45 @@ local require = require(script.Parent.loader).load(script)
7
8
  local BaseObject = require("BaseObject")
8
9
  local ValueObject = require("ValueObject")
9
10
  local Signal = require("Signal")
11
+ local _Observable = require("Observable")
10
12
 
11
13
  local ScreenshotHudModel = setmetatable({}, BaseObject)
12
14
  ScreenshotHudModel.ClassName = "ScreenshotHudModel"
13
15
  ScreenshotHudModel.__index = ScreenshotHudModel
14
16
 
15
- function ScreenshotHudModel.new()
16
- local self = setmetatable(BaseObject.new(), ScreenshotHudModel)
17
+ export type ScreenshotHudModel = typeof(setmetatable(
18
+ {} :: {
19
+ _cameraButtonIcon: ValueObject.ValueObject<string>,
20
+ _cameraButtonPosition: ValueObject.ValueObject<UDim2>,
21
+ _closeButtonPosition: ValueObject.ValueObject<UDim2>,
22
+ _closeWhenScreenshotTaken: ValueObject.ValueObject<boolean>,
23
+ _experienceNameOverlayEnabled: ValueObject.ValueObject<boolean>,
24
+ _overlayFont: ValueObject.ValueObject<Enum.Font>,
25
+ _usernameOverlayEnabled: ValueObject.ValueObject<boolean>,
26
+ _visible: ValueObject.ValueObject<boolean>,
27
+ _cameraButtonVisible: ValueObject.ValueObject<boolean>,
28
+ _closeButtonVisible: ValueObject.ValueObject<boolean>,
29
+ _keepOpen: ValueObject.ValueObject<boolean>,
30
+
31
+ CloseRequested: Signal.Signal<()>,
32
+ },
33
+ {} :: typeof({ __index = ScreenshotHudModel })
34
+ )) & BaseObject.BaseObject
35
+
36
+ function ScreenshotHudModel.new(): ScreenshotHudModel
37
+ local self: ScreenshotHudModel = setmetatable(BaseObject.new() :: any, ScreenshotHudModel)
17
38
 
18
39
  self._cameraButtonIcon = self._maid:Add(ValueObject.new("", "string"))
19
40
 
20
- self._cameraButtonPosition = ValueObject.new(UDim2.new(0, 0, 0, 0))
21
- self._maid:GiveTask(self._cameraButtonPosition)
22
-
23
- self._closeButtonPosition = ValueObject.new(UDim2.new(0, 0, 0, 0))
24
- self._maid:GiveTask(self._closeButtonPosition)
25
-
41
+ self._cameraButtonPosition = self._maid:Add(ValueObject.new(UDim2.new(0, 0, 0, 0)))
42
+ self._closeButtonPosition = self._maid:Add(ValueObject.new(UDim2.new(0, 0, 0, 0)))
26
43
  self._closeWhenScreenshotTaken = self._maid:Add(ValueObject.new(false, "boolean"))
27
-
28
44
  self._experienceNameOverlayEnabled = self._maid:Add(ValueObject.new(false, "boolean"))
29
-
30
45
  self._overlayFont = self._maid:Add(ValueObject.new(Enum.Font.SourceSans))
31
-
32
46
  self._usernameOverlayEnabled = self._maid:Add(ValueObject.new(false, "boolean"))
33
-
34
47
  self._visible = self._maid:Add(ValueObject.new(false, "boolean"))
35
-
36
48
  self._cameraButtonVisible = self._maid:Add(ValueObject.new(true, "boolean"))
37
-
38
49
  self._closeButtonVisible = self._maid:Add(ValueObject.new(false, "boolean"))
39
-
40
50
  self._keepOpen = self._maid:Add(ValueObject.new(true, "boolean"))
41
51
 
42
52
  self.CloseRequested = self._maid:Add(Signal.new())
@@ -48,7 +58,7 @@ end
48
58
  Sets whether the close button is visible
49
59
  @param closeButtonVisible boolean
50
60
  ]=]
51
- function ScreenshotHudModel:SetCloseButtonVisible(closeButtonVisible)
61
+ function ScreenshotHudModel.SetCloseButtonVisible(self: ScreenshotHudModel, closeButtonVisible: boolean): ()
52
62
  assert(typeof(closeButtonVisible) == "boolean", "Bad closeButtonVisible")
53
63
 
54
64
  self._closeButtonVisible.Value = closeButtonVisible
@@ -58,7 +68,7 @@ end
58
68
  Observes close button visiblity
59
69
  @return Observable<boolean>
60
70
  ]=]
61
- function ScreenshotHudModel:ObserveCloseButtonVisible()
71
+ function ScreenshotHudModel.ObserveCloseButtonVisible(self: ScreenshotHudModel): _Observable.Observable<boolean>
62
72
  return self._closeButtonVisible:Observe()
63
73
  end
64
74
 
@@ -66,7 +76,7 @@ end
66
76
  Sets whether the camera button is visible
67
77
  @param cameraButtonVisible boolean
68
78
  ]=]
69
- function ScreenshotHudModel:SetCameraButtonVisible(cameraButtonVisible)
79
+ function ScreenshotHudModel.SetCameraButtonVisible(self: ScreenshotHudModel, cameraButtonVisible: boolean): ()
70
80
  assert(typeof(cameraButtonVisible) == "boolean", "Bad cameraButtonVisible")
71
81
 
72
82
  self._cameraButtonVisible.Value = cameraButtonVisible
@@ -76,7 +86,7 @@ end
76
86
  Observes camera button visiblity
77
87
  @return Observable<boolean>
78
88
  ]=]
79
- function ScreenshotHudModel:ObserveCameraButtonVisible()
89
+ function ScreenshotHudModel.ObserveCameraButtonVisible(self: ScreenshotHudModel): _Observable.Observable<boolean>
80
90
  return self._cameraButtonVisible:Observe()
81
91
  end
82
92
 
@@ -84,7 +94,7 @@ end
84
94
  Sets whether we should try to keep the UI open
85
95
  @param keepOpen boolean
86
96
  ]=]
87
- function ScreenshotHudModel:SetKeepOpen(keepOpen)
97
+ function ScreenshotHudModel.SetKeepOpen(self: ScreenshotHudModel, keepOpen: boolean): ()
88
98
  assert(typeof(keepOpen) == "boolean", "Bad keepOpen")
89
99
 
90
100
  self._keepOpen.Value = keepOpen
@@ -94,7 +104,7 @@ end
94
104
  Gets whether we should try to keep the UI open
95
105
  @return boolean
96
106
  ]=]
97
- function ScreenshotHudModel:GetKeepOpen()
107
+ function ScreenshotHudModel.GetKeepOpen(self: ScreenshotHudModel): boolean
98
108
  return self._keepOpen.Value
99
109
  end
100
110
 
@@ -103,7 +113,7 @@ end
103
113
 
104
114
  @param visible boolean
105
115
  ]=]
106
- function ScreenshotHudModel:SetVisible(visible: boolean)
116
+ function ScreenshotHudModel.SetVisible(self: ScreenshotHudModel, visible: boolean): ()
107
117
  assert(type(visible) == "boolean", "Bad visible")
108
118
 
109
119
  self._visible.Value = visible
@@ -113,7 +123,7 @@ end
113
123
  Sets the close button's position
114
124
  @param position UDim2 | nil
115
125
  ]=]
116
- function ScreenshotHudModel:SetCloseButtonPosition(position)
126
+ function ScreenshotHudModel.SetCloseButtonPosition(self: ScreenshotHudModel, position: UDim2 | nil): ()
117
127
  assert(typeof(position) == "UDim2" or position == nil, "Bad position")
118
128
 
119
129
  self._closeButtonPosition.Value = position or UDim2.new(0, 0, 0, 0)
@@ -123,7 +133,7 @@ end
123
133
  Observes the close button's position
124
134
  @return Observable<UDim2>
125
135
  ]=]
126
- function ScreenshotHudModel:ObserveCloseButtonPosition()
136
+ function ScreenshotHudModel.ObserveCloseButtonPosition(self: ScreenshotHudModel): _Observable.Observable<UDim2>
127
137
  return self._closeButtonPosition:Observe()
128
138
  end
129
139
 
@@ -131,7 +141,7 @@ end
131
141
  Sets the camera button's position
132
142
  @param position UDim2 | nil
133
143
  ]=]
134
- function ScreenshotHudModel:SetCameraButtonPosition(position)
144
+ function ScreenshotHudModel.SetCameraButtonPosition(self: ScreenshotHudModel, position: UDim2 | nil): ()
135
145
  assert(typeof(position) == "UDim2" or position == nil, "Bad position")
136
146
 
137
147
  self._cameraButtonPosition.Value = position or UDim2.new(0, 0, 0, 0)
@@ -141,25 +151,25 @@ end
141
151
  Observes the camera button's position
142
152
  @return Observable<UDim2>
143
153
  ]=]
144
- function ScreenshotHudModel:ObserveCameraButtonPosition()
154
+ function ScreenshotHudModel.ObserveCameraButtonPosition(self: ScreenshotHudModel): _Observable.Observable<UDim2>
145
155
  return self._cameraButtonPosition:Observe()
146
156
  end
147
157
 
148
158
  --[=[
149
159
  Sets the overlay font
150
- @param overlayFont Font
160
+ @param overlayFont Enum.Font
151
161
  ]=]
152
- function ScreenshotHudModel:SetOverlayFont(overlayFont)
162
+ function ScreenshotHudModel.SetOverlayFont(self: ScreenshotHudModel, overlayFont: Enum.Font | nil): ()
153
163
  assert(typeof(overlayFont) == "EnumItem" or overlayFont == nil, "Bad overlayFont")
154
164
 
155
- self._overlayFont.Value = overlayFont
165
+ self._overlayFont.Value = overlayFont or Enum.Font.SourceSans
156
166
  end
157
167
 
158
168
  --[=[
159
169
  Observes the overlay font
160
- @return Observable<Font>
170
+ @return Observable<Enum.Font>
161
171
  ]=]
162
- function ScreenshotHudModel:ObserveOverlayFont()
172
+ function ScreenshotHudModel.ObserveOverlayFont(self: ScreenshotHudModel): _Observable.Observable<Enum.Font>
163
173
  return self._overlayFont:Observe()
164
174
  end
165
175
 
@@ -168,7 +178,7 @@ end
168
178
 
169
179
  @param icon string?
170
180
  ]=]
171
- function ScreenshotHudModel:SetCameraButtonIcon(icon)
181
+ function ScreenshotHudModel.SetCameraButtonIcon(self: ScreenshotHudModel, icon: string | nil)
172
182
  assert(type(icon) == "string" or icon == nil, "Bad icon")
173
183
 
174
184
  self._cameraButtonIcon.Value = icon or ""
@@ -179,7 +189,7 @@ end
179
189
 
180
190
  @return Observable<string>
181
191
  ]=]
182
- function ScreenshotHudModel:ObserveCameraButtonIcon()
192
+ function ScreenshotHudModel.ObserveCameraButtonIcon(self: ScreenshotHudModel): _Observable.Observable<string>
183
193
  return self._cameraButtonIcon:Observe()
184
194
  end
185
195
 
@@ -188,7 +198,7 @@ end
188
198
 
189
199
  @param closeWhenScreenshotTaken boolean
190
200
  ]=]
191
- function ScreenshotHudModel:SetCloseWhenScreenshotTaken(closeWhenScreenshotTaken: boolean)
201
+ function ScreenshotHudModel.SetCloseWhenScreenshotTaken(self: ScreenshotHudModel, closeWhenScreenshotTaken: boolean): ()
192
202
  assert(type(closeWhenScreenshotTaken) == "boolean", "Bad closeWhenScreenshotTaken")
193
203
 
194
204
  self._closeWhenScreenshotTaken.Value = closeWhenScreenshotTaken
@@ -198,7 +208,7 @@ end
198
208
  Returns whether the model will try to close if a screenshot is taken
199
209
  @return boolean
200
210
  ]=]
201
- function ScreenshotHudModel:GetCloseWhenScreenshotTaken()
211
+ function ScreenshotHudModel.GetCloseWhenScreenshotTaken(self: ScreenshotHudModel): boolean
202
212
  return self._closeWhenScreenshotTaken.Value
203
213
  end
204
214
 
@@ -206,7 +216,7 @@ end
206
216
  Observes whether a screenshot is taken
207
217
  @return Observable<boolean>
208
218
  ]=]
209
- function ScreenshotHudModel:ObserveCloseWhenScreenshotTaken()
219
+ function ScreenshotHudModel.ObserveCloseWhenScreenshotTaken(self: ScreenshotHudModel): _Observable.Observable<boolean>
210
220
  return self._closeWhenScreenshotTaken:Observe()
211
221
  end
212
222
 
@@ -214,7 +224,10 @@ end
214
224
  Sets whether to experience name overlay should be enabled
215
225
  @param experienceNameOverlayEnabled boolean
216
226
  ]=]
217
- function ScreenshotHudModel:SetExperienceNameOverlayEnabled(experienceNameOverlayEnabled: boolean)
227
+ function ScreenshotHudModel.SetExperienceNameOverlayEnabled(
228
+ self: ScreenshotHudModel,
229
+ experienceNameOverlayEnabled: boolean
230
+ ): ()
218
231
  assert(type(experienceNameOverlayEnabled) == "boolean", "Bad experienceNameOverlayEnabled")
219
232
 
220
233
  self._experienceNameOverlayEnabled.Value = experienceNameOverlayEnabled
@@ -224,7 +237,9 @@ end
224
237
  Observes whether the experience name overlay is enabled
225
238
  @return Observable<boolean>
226
239
  ]=]
227
- function ScreenshotHudModel:ObserveExperienceNameOverlayEnabled()
240
+ function ScreenshotHudModel.ObserveExperienceNameOverlayEnabled(
241
+ self: ScreenshotHudModel
242
+ ): _Observable.Observable<boolean>
228
243
  return self._experienceNameOverlayEnabled:Observe()
229
244
  end
230
245
 
@@ -232,7 +247,7 @@ end
232
247
  Sets whether to username overlay should be enabled
233
248
  @param usernameOverlayEnabled boolean
234
249
  ]=]
235
- function ScreenshotHudModel:SetUsernameOverlayEnabled(usernameOverlayEnabled: boolean)
250
+ function ScreenshotHudModel.SetUsernameOverlayEnabled(self: ScreenshotHudModel, usernameOverlayEnabled: boolean): ()
236
251
  assert(type(usernameOverlayEnabled) == "boolean", "Bad usernameOverlayEnabled")
237
252
 
238
253
  self._usernameOverlayEnabled.Value = usernameOverlayEnabled
@@ -242,7 +257,7 @@ end
242
257
  Observes whether the username name overlay is enabled
243
258
  @return Observable<boolean>
244
259
  ]=]
245
- function ScreenshotHudModel:ObserveUsernameOverlayEnabled()
260
+ function ScreenshotHudModel.ObserveUsernameOverlayEnabled(self: ScreenshotHudModel): _Observable.Observable<boolean>
246
261
  return self._usernameOverlayEnabled:Observe()
247
262
  end
248
263
 
@@ -250,15 +265,15 @@ end
250
265
  Observes whilet he model is visible
251
266
  @return Observable<boolean>
252
267
  ]=]
253
- function ScreenshotHudModel:ObserveVisible()
268
+ function ScreenshotHudModel.ObserveVisible(self: ScreenshotHudModel): _Observable.Observable<boolean>
254
269
  return self._visible:Observe()
255
270
  end
256
271
 
257
- function ScreenshotHudModel:InternalNotifyVisible(isVisible)
272
+ function ScreenshotHudModel.InternalNotifyVisible(self: ScreenshotHudModel, isVisible: boolean): ()
258
273
  self._visible.Value = isVisible
259
274
  end
260
275
 
261
- function ScreenshotHudModel:InternalFireClosedRequested()
276
+ function ScreenshotHudModel.InternalFireClosedRequested(self: ScreenshotHudModel): ()
262
277
  self.CloseRequested:Fire()
263
278
  end
264
279