react-simple-game-engine 0.2.87 → 0.2.88
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.
@@ -8,6 +8,7 @@ export declare type ControlProps = {
|
|
8
8
|
xAxisOriginCenter?: boolean;
|
9
9
|
yAxisOriginCenter?: boolean;
|
10
10
|
orientation?: "vertical" | "horizontal";
|
11
|
+
alignment?: "flex-start" | "center" | "flex-end";
|
11
12
|
};
|
12
|
-
export declare function Control({ xAxisOriginCenter, yAxisOriginCenter, top, left, right, bottom, children, orientation, }: ControlProps): JSX.Element;
|
13
|
+
export declare function Control({ xAxisOriginCenter, yAxisOriginCenter, top, left, right, bottom, children, orientation, alignment, }: ControlProps): JSX.Element;
|
13
14
|
//# sourceMappingURL=control.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"control.d.ts","sourceRoot":"","sources":["../../src/ui-components/control.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAW,MAAM,OAAO,CAAC;AAE3C,oBAAY,YAAY,GAAG;IACzB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,SAAS,CAAC;IACpB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,WAAW,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;
|
1
|
+
{"version":3,"file":"control.d.ts","sourceRoot":"","sources":["../../src/ui-components/control.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAW,MAAM,OAAO,CAAC;AAE3C,oBAAY,YAAY,GAAG;IACzB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,SAAS,CAAC;IACpB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,WAAW,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;IACxC,SAAS,CAAC,EAAE,YAAY,GAAG,QAAQ,GAAG,UAAU,CAAC;CAClD,CAAC;AAEF,wBAAgB,OAAO,CAAC,EACtB,iBAAyB,EACzB,iBAAyB,EACzB,GAAG,EACH,IAAI,EACJ,KAAK,EACL,MAAM,EACN,QAAQ,EACR,WAAwB,EACxB,SAAwB,GACzB,EAAE,YAAY,eAwBd"}
|
@@ -12,7 +12,7 @@ var __assign = (this && this.__assign) || function () {
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
13
13
|
import { useMemo } from "react";
|
14
14
|
export function Control(_a) {
|
15
|
-
var _b = _a.xAxisOriginCenter, xAxisOriginCenter = _b === void 0 ? false : _b, _c = _a.yAxisOriginCenter, yAxisOriginCenter = _c === void 0 ? false : _c, top = _a.top, left = _a.left, right = _a.right, bottom = _a.bottom, children = _a.children, _d = _a.orientation, orientation = _d === void 0 ? "vertical" : _d;
|
15
|
+
var _b = _a.xAxisOriginCenter, xAxisOriginCenter = _b === void 0 ? false : _b, _c = _a.yAxisOriginCenter, yAxisOriginCenter = _c === void 0 ? false : _c, top = _a.top, left = _a.left, right = _a.right, bottom = _a.bottom, children = _a.children, _d = _a.orientation, orientation = _d === void 0 ? "vertical" : _d, _e = _a.alignment, alignment = _e === void 0 ? "flex-start" : _e;
|
16
16
|
var transform = useMemo(function () {
|
17
17
|
var x = xAxisOriginCenter ? "".concat(left != null ? -50 : 50, "%") : 0;
|
18
18
|
var y = yAxisOriginCenter ? "".concat(top != null ? -50 : 50, "%") : 0;
|
@@ -26,6 +26,7 @@ export function Control(_a) {
|
|
26
26
|
bottom: bottom,
|
27
27
|
display: "inline-flex",
|
28
28
|
flexDirection: orientation === "vertical" ? "column" : "row",
|
29
|
+
alignItems: alignment,
|
29
30
|
transform: transform,
|
30
31
|
} }, { children: children })));
|
31
32
|
}
|