@quenty/gamescalingutils 13.18.3 → 13.18.4-canary.559.339cfa7.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,6 +3,17 @@
|
|
|
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
|
+
## [13.18.4-canary.559.339cfa7.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/gamescalingutils@13.18.3...@quenty/gamescalingutils@13.18.4-canary.559.339cfa7.0) (2025-05-10)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Additional type checking updates ([05ba29a](https://github.com/Quenty/NevermoreEngine/commit/05ba29a03efc9f3feed74b34f1d9dfb237496214))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [13.18.3](https://github.com/Quenty/NevermoreEngine/compare/@quenty/gamescalingutils@13.18.2...@quenty/gamescalingutils@13.18.3) (2025-04-10)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @quenty/gamescalingutils
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/gamescalingutils",
|
|
3
|
-
"version": "13.18.
|
|
3
|
+
"version": "13.18.4-canary.559.339cfa7.0",
|
|
4
4
|
"description": "Scale ratios for the UI on different devices",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
"access": "public"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@quenty/baseobject": "
|
|
32
|
-
"@quenty/blend": "
|
|
33
|
-
"@quenty/instanceutils": "
|
|
34
|
-
"@quenty/loader": "
|
|
35
|
-
"@quenty/rx": "
|
|
36
|
-
"@quenty/valueobject": "
|
|
31
|
+
"@quenty/baseobject": "10.8.4-canary.559.339cfa7.0",
|
|
32
|
+
"@quenty/blend": "12.18.4-canary.559.339cfa7.0",
|
|
33
|
+
"@quenty/instanceutils": "13.17.4-canary.559.339cfa7.0",
|
|
34
|
+
"@quenty/loader": "10.8.4-canary.559.339cfa7.0",
|
|
35
|
+
"@quenty/rx": "13.17.4-canary.559.339cfa7.0",
|
|
36
|
+
"@quenty/valueobject": "13.17.4-canary.559.339cfa7.0"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "339cfa778736f08768ed7305041f6221faa35bfc"
|
|
39
39
|
}
|
|
@@ -6,11 +6,10 @@
|
|
|
6
6
|
local require = require(script.Parent.loader).load(script)
|
|
7
7
|
|
|
8
8
|
local BaseObject = require("BaseObject")
|
|
9
|
+
local Observable = require("Observable")
|
|
9
10
|
local Rx = require("Rx")
|
|
10
11
|
local RxInstanceUtils = require("RxInstanceUtils")
|
|
11
12
|
local ValueObject = require("ValueObject")
|
|
12
|
-
local _Maid = require("Maid")
|
|
13
|
-
local _Observable = require("Observable")
|
|
14
13
|
|
|
15
14
|
local GameScalingHelper = setmetatable({}, BaseObject)
|
|
16
15
|
GameScalingHelper.ClassName = "GameScalingHelper"
|
|
@@ -71,11 +70,11 @@ function GameScalingHelper.new(screenGui: ScreenGui): GameScalingHelper
|
|
|
71
70
|
return self
|
|
72
71
|
end
|
|
73
72
|
|
|
74
|
-
function GameScalingHelper.ObserveIsSmall(self: GameScalingHelper):
|
|
73
|
+
function GameScalingHelper.ObserveIsSmall(self: GameScalingHelper): Observable.Observable<boolean>
|
|
75
74
|
return self._isSmall:Observe()
|
|
76
75
|
end
|
|
77
76
|
|
|
78
|
-
function GameScalingHelper.ObserveIsVertical(self: GameScalingHelper):
|
|
77
|
+
function GameScalingHelper.ObserveIsVertical(self: GameScalingHelper): Observable.Observable<boolean>
|
|
79
78
|
return self._isVertical:Observe()
|
|
80
79
|
end
|
|
81
80
|
|
|
@@ -90,7 +89,7 @@ end
|
|
|
90
89
|
]=]
|
|
91
90
|
function GameScalingHelper.SetAbsoluteSize(
|
|
92
91
|
self: GameScalingHelper,
|
|
93
|
-
absoluteSize: Vector2 |
|
|
92
|
+
absoluteSize: Vector2 | Observable.Observable<Vector2>
|
|
94
93
|
): () -> ()
|
|
95
94
|
return self._absoluteSize:Mount(absoluteSize)
|
|
96
95
|
end
|
|
@@ -103,4 +102,4 @@ function GameScalingHelper.SetScreenGui(self: GameScalingHelper, screenGui: Scre
|
|
|
103
102
|
return self:SetAbsoluteSize(RxInstanceUtils.observeProperty(screenGui, "AbsoluteSize"))
|
|
104
103
|
end
|
|
105
104
|
|
|
106
|
-
return GameScalingHelper
|
|
105
|
+
return GameScalingHelper
|
|
@@ -9,9 +9,9 @@ local require = require(script.Parent.loader).load(script)
|
|
|
9
9
|
local GuiService = game:GetService("GuiService")
|
|
10
10
|
|
|
11
11
|
local Blend = require("Blend")
|
|
12
|
+
local Observable = require("Observable")
|
|
12
13
|
local Rx = require("Rx")
|
|
13
14
|
local RxInstanceUtils = require("RxInstanceUtils")
|
|
14
|
-
local _Observable = require("Observable")
|
|
15
15
|
|
|
16
16
|
local GameScalingUtils = {}
|
|
17
17
|
|
|
@@ -52,7 +52,7 @@ end
|
|
|
52
52
|
@param screenGui ScreenGui
|
|
53
53
|
@return Observable<number>
|
|
54
54
|
]=]
|
|
55
|
-
function GameScalingUtils.observeUIScale(screenGui: ScreenGui):
|
|
55
|
+
function GameScalingUtils.observeUIScale(screenGui: ScreenGui): Observable.Observable<number>
|
|
56
56
|
return Blend.Spring(
|
|
57
57
|
RxInstanceUtils.observeProperty(screenGui, "AbsoluteSize"):Pipe({
|
|
58
58
|
Rx.map(GameScalingUtils.getUIScale) :: any,
|
|
@@ -66,7 +66,7 @@ end
|
|
|
66
66
|
@param child Instance
|
|
67
67
|
@return Observable<number>
|
|
68
68
|
]=]
|
|
69
|
-
function GameScalingUtils.observeUIScaleForChild(child: Instance):
|
|
69
|
+
function GameScalingUtils.observeUIScaleForChild(child: Instance): Observable.Observable<number>
|
|
70
70
|
return RxInstanceUtils.observeFirstAncestor(child, "ScreenGui"):Pipe({
|
|
71
71
|
Rx.switchMap(function(screenGui: ScreenGui?): any
|
|
72
72
|
if screenGui then
|
|
@@ -84,7 +84,7 @@ end
|
|
|
84
84
|
@param props { Parent: Instance?, ScreenGui: ScreenGui }
|
|
85
85
|
@return Observable<UIScale>
|
|
86
86
|
]=]
|
|
87
|
-
function GameScalingUtils.renderUIScale(props: Props):
|
|
87
|
+
function GameScalingUtils.renderUIScale(props: Props): Observable.Observable<UIScale>
|
|
88
88
|
assert(props.ScreenGui, "No screenGui")
|
|
89
89
|
|
|
90
90
|
return Blend.New("UIScale")({
|
|
@@ -99,7 +99,7 @@ end
|
|
|
99
99
|
@param props { Parent: Instance?, ScreenGui: ScreenGui }
|
|
100
100
|
@return Observable<UIPadding>
|
|
101
101
|
]=]
|
|
102
|
-
function GameScalingUtils.renderDialogPadding(props: Props):
|
|
102
|
+
function GameScalingUtils.renderDialogPadding(props: Props): Observable.Observable<UIPadding>
|
|
103
103
|
assert(props.ScreenGui, "No screenGui")
|
|
104
104
|
|
|
105
105
|
return Blend.New("UIPadding")({
|
|
@@ -116,7 +116,7 @@ end
|
|
|
116
116
|
@param screenGui ScreenGui
|
|
117
117
|
@return Observable<UDim>
|
|
118
118
|
]=]
|
|
119
|
-
function GameScalingUtils.observeDialogPadding(screenGui: ScreenGui):
|
|
119
|
+
function GameScalingUtils.observeDialogPadding(screenGui: ScreenGui): Observable.Observable<UDim>
|
|
120
120
|
return Blend.Spring(
|
|
121
121
|
RxInstanceUtils.observeProperty(screenGui, "AbsoluteSize"):Pipe({
|
|
122
122
|
Rx.map(GameScalingUtils.getDialogPadding) :: any,
|
|
@@ -149,4 +149,4 @@ function GameScalingUtils.getDialogPadding(screenAbsoluteSize: Vector2): number
|
|
|
149
149
|
end
|
|
150
150
|
end
|
|
151
151
|
|
|
152
|
-
return GameScalingUtils
|
|
152
|
+
return GameScalingUtils
|