isaacscript-common 24.0.0 → 24.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/dist/index.rollup.d.ts
CHANGED
|
@@ -6465,8 +6465,12 @@ export declare function getScreenBottomLeftPos(): Readonly<Vector>;
|
|
|
6465
6465
|
|
|
6466
6466
|
export declare function getScreenBottomRightPos(): Readonly<Vector>;
|
|
6467
6467
|
|
|
6468
|
+
export declare function getScreenBottomY(): float;
|
|
6469
|
+
|
|
6468
6470
|
export declare function getScreenCenterPos(): Readonly<Vector>;
|
|
6469
6471
|
|
|
6472
|
+
export declare function getScreenRightX(): float;
|
|
6473
|
+
|
|
6470
6474
|
export declare function getScreenTopCenterPos(): Readonly<Vector>;
|
|
6471
6475
|
|
|
6472
6476
|
export declare function getScreenTopLeftPos(): Readonly<Vector>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 24.
|
|
3
|
+
isaacscript-common 24.1.0
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -40587,27 +40587,35 @@ function ____exports.getHeartsUIWidth(self)
|
|
|
40587
40587
|
return width
|
|
40588
40588
|
end
|
|
40589
40589
|
function ____exports.getScreenBottomCenterPos(self)
|
|
40590
|
-
local
|
|
40591
|
-
return Vector(
|
|
40590
|
+
local bottomRightPos = ____exports.getScreenBottomRightPos(nil)
|
|
40591
|
+
return Vector(bottomRightPos.X / 2, bottomRightPos.Y)
|
|
40592
40592
|
end
|
|
40593
40593
|
function ____exports.getScreenBottomLeftPos(self)
|
|
40594
|
-
local
|
|
40595
|
-
return Vector(0,
|
|
40594
|
+
local bottomRightPos = ____exports.getScreenBottomRightPos(nil)
|
|
40595
|
+
return Vector(0, bottomRightPos.Y)
|
|
40596
|
+
end
|
|
40597
|
+
function ____exports.getScreenBottomY(self)
|
|
40598
|
+
local bottomRightPos = ____exports.getScreenBottomRightPos(nil)
|
|
40599
|
+
return bottomRightPos.Y
|
|
40596
40600
|
end
|
|
40597
40601
|
function ____exports.getScreenCenterPos(self)
|
|
40598
|
-
local
|
|
40599
|
-
return
|
|
40602
|
+
local bottomRightPos = ____exports.getScreenBottomRightPos(nil)
|
|
40603
|
+
return bottomRightPos / 2
|
|
40604
|
+
end
|
|
40605
|
+
function ____exports.getScreenRightX(self)
|
|
40606
|
+
local bottomRightPos = ____exports.getScreenBottomRightPos(nil)
|
|
40607
|
+
return bottomRightPos.X
|
|
40600
40608
|
end
|
|
40601
40609
|
function ____exports.getScreenTopCenterPos(self)
|
|
40602
|
-
local
|
|
40603
|
-
return Vector(
|
|
40610
|
+
local bottomRightPos = ____exports.getScreenBottomRightPos(nil)
|
|
40611
|
+
return Vector(bottomRightPos.X / 2, 0)
|
|
40604
40612
|
end
|
|
40605
40613
|
function ____exports.getScreenTopLeftPos(self)
|
|
40606
40614
|
return copyVector(nil, VectorZero)
|
|
40607
40615
|
end
|
|
40608
40616
|
function ____exports.getScreenTopRightPos(self)
|
|
40609
|
-
local
|
|
40610
|
-
return Vector(
|
|
40617
|
+
local bottomRightPos = ____exports.getScreenBottomRightPos(nil)
|
|
40618
|
+
return Vector(bottomRightPos.X, 0)
|
|
40611
40619
|
end
|
|
40612
40620
|
function ____exports.getVisibleHearts(self, player)
|
|
40613
40621
|
local effectiveMaxHearts = player:GetEffectiveMaxHearts()
|
|
@@ -26,7 +26,9 @@ export declare function getHeartsUIWidth(): int;
|
|
|
26
26
|
export declare function getScreenBottomCenterPos(): Readonly<Vector>;
|
|
27
27
|
export declare function getScreenBottomLeftPos(): Readonly<Vector>;
|
|
28
28
|
export declare function getScreenBottomRightPos(): Readonly<Vector>;
|
|
29
|
+
export declare function getScreenBottomY(): float;
|
|
29
30
|
export declare function getScreenCenterPos(): Readonly<Vector>;
|
|
31
|
+
export declare function getScreenRightX(): float;
|
|
30
32
|
export declare function getScreenTopCenterPos(): Readonly<Vector>;
|
|
31
33
|
export declare function getScreenTopLeftPos(): Readonly<Vector>;
|
|
32
34
|
export declare function getScreenTopRightPos(): Readonly<Vector>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../../src/functions/ui.ts"],"names":[],"mappings":";;;AAKA;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAmBrD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,YAAY,GAAG,GAAG,CAU3D;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,GAAG,CAgCtC;AAED,wBAAgB,wBAAwB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAG3D;AAED,wBAAgB,sBAAsB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAGzD;AAED,wBAAgB,uBAAuB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAK1D;AAED,wBAAgB,kBAAkB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAGrD;AAED,wBAAgB,qBAAqB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAGxD;AAED,wBAAgB,mBAAmB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAEtD;AAED,wBAAgB,oBAAoB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAGvD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,GAAG,CAa1D"}
|
|
1
|
+
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../../src/functions/ui.ts"],"names":[],"mappings":";;;AAKA;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAmBrD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,YAAY,GAAG,GAAG,CAU3D;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,GAAG,CAgCtC;AAED,wBAAgB,wBAAwB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAG3D;AAED,wBAAgB,sBAAsB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAGzD;AAED,wBAAgB,uBAAuB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAK1D;AAED,wBAAgB,gBAAgB,IAAI,KAAK,CAGxC;AAED,wBAAgB,kBAAkB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAGrD;AAED,wBAAgB,eAAe,IAAI,KAAK,CAGvC;AAED,wBAAgB,qBAAqB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAGxD;AAED,wBAAgB,mBAAmB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAEtD;AAED,wBAAgB,oBAAoB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAGvD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,GAAG,CAa1D"}
|
|
@@ -79,27 +79,35 @@ function ____exports.getHeartsUIWidth(self)
|
|
|
79
79
|
return width
|
|
80
80
|
end
|
|
81
81
|
function ____exports.getScreenBottomCenterPos(self)
|
|
82
|
-
local
|
|
83
|
-
return Vector(
|
|
82
|
+
local bottomRightPos = ____exports.getScreenBottomRightPos(nil)
|
|
83
|
+
return Vector(bottomRightPos.X / 2, bottomRightPos.Y)
|
|
84
84
|
end
|
|
85
85
|
function ____exports.getScreenBottomLeftPos(self)
|
|
86
|
-
local
|
|
87
|
-
return Vector(0,
|
|
86
|
+
local bottomRightPos = ____exports.getScreenBottomRightPos(nil)
|
|
87
|
+
return Vector(0, bottomRightPos.Y)
|
|
88
|
+
end
|
|
89
|
+
function ____exports.getScreenBottomY(self)
|
|
90
|
+
local bottomRightPos = ____exports.getScreenBottomRightPos(nil)
|
|
91
|
+
return bottomRightPos.Y
|
|
88
92
|
end
|
|
89
93
|
function ____exports.getScreenCenterPos(self)
|
|
90
|
-
local
|
|
91
|
-
return
|
|
94
|
+
local bottomRightPos = ____exports.getScreenBottomRightPos(nil)
|
|
95
|
+
return bottomRightPos / 2
|
|
96
|
+
end
|
|
97
|
+
function ____exports.getScreenRightX(self)
|
|
98
|
+
local bottomRightPos = ____exports.getScreenBottomRightPos(nil)
|
|
99
|
+
return bottomRightPos.X
|
|
92
100
|
end
|
|
93
101
|
function ____exports.getScreenTopCenterPos(self)
|
|
94
|
-
local
|
|
95
|
-
return Vector(
|
|
102
|
+
local bottomRightPos = ____exports.getScreenBottomRightPos(nil)
|
|
103
|
+
return Vector(bottomRightPos.X / 2, 0)
|
|
96
104
|
end
|
|
97
105
|
function ____exports.getScreenTopLeftPos(self)
|
|
98
106
|
return copyVector(nil, VectorZero)
|
|
99
107
|
end
|
|
100
108
|
function ____exports.getScreenTopRightPos(self)
|
|
101
|
-
local
|
|
102
|
-
return Vector(
|
|
109
|
+
local bottomRightPos = ____exports.getScreenBottomRightPos(nil)
|
|
110
|
+
return Vector(bottomRightPos.X, 0)
|
|
103
111
|
end
|
|
104
112
|
--- Get how many hearts are currently being shown on the hearts UI.
|
|
105
113
|
--
|
package/package.json
CHANGED
package/src/functions/ui.ts
CHANGED
|
@@ -90,13 +90,13 @@ export function getHeartsUIWidth(): int {
|
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
export function getScreenBottomCenterPos(): Readonly<Vector> {
|
|
93
|
-
const
|
|
94
|
-
return Vector(
|
|
93
|
+
const bottomRightPos = getScreenBottomRightPos();
|
|
94
|
+
return Vector(bottomRightPos.X / 2, bottomRightPos.Y);
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
export function getScreenBottomLeftPos(): Readonly<Vector> {
|
|
98
|
-
const
|
|
99
|
-
return Vector(0,
|
|
98
|
+
const bottomRightPos = getScreenBottomRightPos();
|
|
99
|
+
return Vector(0, bottomRightPos.Y);
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
export function getScreenBottomRightPos(): Readonly<Vector> {
|
|
@@ -106,14 +106,24 @@ export function getScreenBottomRightPos(): Readonly<Vector> {
|
|
|
106
106
|
return Vector(screenWidth, screenHeight);
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
+
export function getScreenBottomY(): float {
|
|
110
|
+
const bottomRightPos = getScreenBottomRightPos();
|
|
111
|
+
return bottomRightPos.Y;
|
|
112
|
+
}
|
|
113
|
+
|
|
109
114
|
export function getScreenCenterPos(): Readonly<Vector> {
|
|
110
|
-
const
|
|
111
|
-
return
|
|
115
|
+
const bottomRightPos = getScreenBottomRightPos();
|
|
116
|
+
return bottomRightPos.div(2);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export function getScreenRightX(): float {
|
|
120
|
+
const bottomRightPos = getScreenBottomRightPos();
|
|
121
|
+
return bottomRightPos.X;
|
|
112
122
|
}
|
|
113
123
|
|
|
114
124
|
export function getScreenTopCenterPos(): Readonly<Vector> {
|
|
115
|
-
const
|
|
116
|
-
return Vector(
|
|
125
|
+
const bottomRightPos = getScreenBottomRightPos();
|
|
126
|
+
return Vector(bottomRightPos.X / 2, 0);
|
|
117
127
|
}
|
|
118
128
|
|
|
119
129
|
export function getScreenTopLeftPos(): Readonly<Vector> {
|
|
@@ -121,8 +131,8 @@ export function getScreenTopLeftPos(): Readonly<Vector> {
|
|
|
121
131
|
}
|
|
122
132
|
|
|
123
133
|
export function getScreenTopRightPos(): Readonly<Vector> {
|
|
124
|
-
const
|
|
125
|
-
return Vector(
|
|
134
|
+
const bottomRightPos = getScreenBottomRightPos();
|
|
135
|
+
return Vector(bottomRightPos.X, 0);
|
|
126
136
|
}
|
|
127
137
|
|
|
128
138
|
/**
|