neos-script
Version:
[neos-script-sample](https://github.com/rheniumNV/neos-script-sample)
23 lines (22 loc) • 16.7 kB
JavaScript
;
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Button = void 0;
var jsx_runtime_1 = require("neos-script/jsx-runtime");
var core_1 = require("../../../core");
function Button(props) {
var id = props.id, persistentId = props.persistentId, updateOrder = props.updateOrder, Enabled = props.Enabled, BaseColor = props.BaseColor, ColorDrivers = props.ColorDrivers, __legacy_NormalColor = props.__legacy_NormalColor, __legacy_HighlightColor = props.__legacy_HighlightColor, __legacy_PressColor = props.__legacy_PressColor, __legacy_DisabledColor = props.__legacy_DisabledColor, __legacy_TintColorMode = props.__legacy_TintColorMode, __legacy_ColorDrive = props.__legacy_ColorDrive, IsPressed = props.IsPressed, IsHovering = props.IsHovering, HoverVibrate = props.HoverVibrate, PressVibrate = props.PressVibrate, ClearFocusOnPress = props.ClearFocusOnPress, PassThroughHorizontalMovement = props.PassThroughHorizontalMovement, PassThroughVerticalMovement = props.PassThroughVerticalMovement, RequireLockInToPress = props.RequireLockInToPress, RequireInitialPress = props.RequireInitialPress, PressPoint = props.PressPoint, Pressed = props.Pressed, Pressing = props.Pressing, Released = props.Released, HoverEnter = props.HoverEnter, HoverStay = props.HoverStay, HoverLeave = props.HoverLeave;
return ((0, jsx_runtime_1.jsxs)(core_1.Component, __assign({ type: "FrooxEngine.UIX.Button", id: id, persistentId: persistentId, updateOrder: updateOrder }, { children: [(0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[System.Boolean]", name: "Enabled", id: typeof Enabled === "object" && "id" in Enabled ? Enabled === null || Enabled === void 0 ? void 0 : Enabled.id : undefined, value: typeof Enabled === "object" && "value" in Enabled ? Enabled === null || Enabled === void 0 ? void 0 : Enabled.value : Enabled !== null && Enabled !== void 0 ? Enabled : true, isRaw: typeof Enabled === "object" && "isRaw" in Enabled && Enabled.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[BaseX.color]", name: "BaseColor", id: typeof BaseColor === "object" && "id" in BaseColor ? BaseColor === null || BaseColor === void 0 ? void 0 : BaseColor.id : undefined, value: typeof BaseColor === "object" && "value" in BaseColor ? BaseColor === null || BaseColor === void 0 ? void 0 : BaseColor.value : BaseColor, isRaw: typeof BaseColor === "object" && "isRaw" in BaseColor && BaseColor.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.SyncList`1[FrooxEngine.UIX.InteractionElement+ColorDriver]", name: "ColorDrivers", id: typeof ColorDrivers === "object" && "id" in ColorDrivers ? ColorDrivers === null || ColorDrivers === void 0 ? void 0 : ColorDrivers.id : undefined, value: typeof ColorDrivers === "object" && "value" in ColorDrivers ? ColorDrivers === null || ColorDrivers === void 0 ? void 0 : ColorDrivers.value : ColorDrivers, isRaw: typeof ColorDrivers === "object" && "isRaw" in ColorDrivers && ColorDrivers.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[BaseX.color]", name: "__legacy_NormalColor-ID", id: typeof __legacy_NormalColor === "object" && "id" in __legacy_NormalColor ? __legacy_NormalColor === null || __legacy_NormalColor === void 0 ? void 0 : __legacy_NormalColor.id : undefined, value: typeof __legacy_NormalColor === "object" && "value" in __legacy_NormalColor ? __legacy_NormalColor === null || __legacy_NormalColor === void 0 ? void 0 : __legacy_NormalColor.value : __legacy_NormalColor, readOnly: true, isRaw: typeof __legacy_NormalColor === "object" && "isRaw" in __legacy_NormalColor && __legacy_NormalColor.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[BaseX.color]", name: "__legacy_HighlightColor-ID", id: typeof __legacy_HighlightColor === "object" && "id" in __legacy_HighlightColor ? __legacy_HighlightColor === null || __legacy_HighlightColor === void 0 ? void 0 : __legacy_HighlightColor.id : undefined, value: typeof __legacy_HighlightColor === "object" && "value" in __legacy_HighlightColor ? __legacy_HighlightColor === null || __legacy_HighlightColor === void 0 ? void 0 : __legacy_HighlightColor.value : __legacy_HighlightColor, readOnly: true, isRaw: typeof __legacy_HighlightColor === "object" && "isRaw" in __legacy_HighlightColor && __legacy_HighlightColor.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[BaseX.color]", name: "__legacy_PressColor-ID", id: typeof __legacy_PressColor === "object" && "id" in __legacy_PressColor ? __legacy_PressColor === null || __legacy_PressColor === void 0 ? void 0 : __legacy_PressColor.id : undefined, value: typeof __legacy_PressColor === "object" && "value" in __legacy_PressColor ? __legacy_PressColor === null || __legacy_PressColor === void 0 ? void 0 : __legacy_PressColor.value : __legacy_PressColor, readOnly: true, isRaw: typeof __legacy_PressColor === "object" && "isRaw" in __legacy_PressColor && __legacy_PressColor.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[BaseX.color]", name: "__legacy_DisabledColor-ID", id: typeof __legacy_DisabledColor === "object" && "id" in __legacy_DisabledColor ? __legacy_DisabledColor === null || __legacy_DisabledColor === void 0 ? void 0 : __legacy_DisabledColor.id : undefined, value: typeof __legacy_DisabledColor === "object" && "value" in __legacy_DisabledColor ? __legacy_DisabledColor === null || __legacy_DisabledColor === void 0 ? void 0 : __legacy_DisabledColor.value : __legacy_DisabledColor, readOnly: true, isRaw: typeof __legacy_DisabledColor === "object" && "isRaw" in __legacy_DisabledColor && __legacy_DisabledColor.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[FrooxEngine.UIX.InteractionElement+ColorMode]", name: "__legacy_TintColorMode-ID", id: typeof __legacy_TintColorMode === "object" && "id" in __legacy_TintColorMode ? __legacy_TintColorMode === null || __legacy_TintColorMode === void 0 ? void 0 : __legacy_TintColorMode.id : undefined, value: typeof __legacy_TintColorMode === "object" && "value" in __legacy_TintColorMode ? __legacy_TintColorMode === null || __legacy_TintColorMode === void 0 ? void 0 : __legacy_TintColorMode.value : __legacy_TintColorMode, readOnly: true, isRaw: typeof __legacy_TintColorMode === "object" && "isRaw" in __legacy_TintColorMode && __legacy_TintColorMode.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.FieldDrive`1[BaseX.color]", name: "__legacy_ColorDrive-ID", id: typeof __legacy_ColorDrive === "object" && "id" in __legacy_ColorDrive ? __legacy_ColorDrive === null || __legacy_ColorDrive === void 0 ? void 0 : __legacy_ColorDrive.id : undefined, value: typeof __legacy_ColorDrive === "object" && "value" in __legacy_ColorDrive ? __legacy_ColorDrive === null || __legacy_ColorDrive === void 0 ? void 0 : __legacy_ColorDrive.value : __legacy_ColorDrive, readOnly: true, isRaw: typeof __legacy_ColorDrive === "object" && "isRaw" in __legacy_ColorDrive && __legacy_ColorDrive.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[System.Boolean]", name: "IsPressed", id: typeof IsPressed === "object" && "id" in IsPressed ? IsPressed === null || IsPressed === void 0 ? void 0 : IsPressed.id : undefined, value: typeof IsPressed === "object" && "value" in IsPressed ? IsPressed === null || IsPressed === void 0 ? void 0 : IsPressed.value : IsPressed, isRaw: typeof IsPressed === "object" && "isRaw" in IsPressed && IsPressed.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[System.Boolean]", name: "IsHovering", id: typeof IsHovering === "object" && "id" in IsHovering ? IsHovering === null || IsHovering === void 0 ? void 0 : IsHovering.id : undefined, value: typeof IsHovering === "object" && "value" in IsHovering ? IsHovering === null || IsHovering === void 0 ? void 0 : IsHovering.value : IsHovering, isRaw: typeof IsHovering === "object" && "isRaw" in IsHovering && IsHovering.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[FrooxEngine.VibratePreset]", name: "HoverVibrate", id: typeof HoverVibrate === "object" && "id" in HoverVibrate ? HoverVibrate === null || HoverVibrate === void 0 ? void 0 : HoverVibrate.id : undefined, value: typeof HoverVibrate === "object" && "value" in HoverVibrate ? HoverVibrate === null || HoverVibrate === void 0 ? void 0 : HoverVibrate.value : HoverVibrate, isRaw: typeof HoverVibrate === "object" && "isRaw" in HoverVibrate && HoverVibrate.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[FrooxEngine.VibratePreset]", name: "PressVibrate", id: typeof PressVibrate === "object" && "id" in PressVibrate ? PressVibrate === null || PressVibrate === void 0 ? void 0 : PressVibrate.id : undefined, value: typeof PressVibrate === "object" && "value" in PressVibrate ? PressVibrate === null || PressVibrate === void 0 ? void 0 : PressVibrate.value : PressVibrate, isRaw: typeof PressVibrate === "object" && "isRaw" in PressVibrate && PressVibrate.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[System.Boolean]", name: "ClearFocusOnPress", id: typeof ClearFocusOnPress === "object" && "id" in ClearFocusOnPress ? ClearFocusOnPress === null || ClearFocusOnPress === void 0 ? void 0 : ClearFocusOnPress.id : undefined, value: typeof ClearFocusOnPress === "object" && "value" in ClearFocusOnPress ? ClearFocusOnPress === null || ClearFocusOnPress === void 0 ? void 0 : ClearFocusOnPress.value : ClearFocusOnPress, isRaw: typeof ClearFocusOnPress === "object" && "isRaw" in ClearFocusOnPress && ClearFocusOnPress.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[System.Boolean]", name: "PassThroughHorizontalMovement", id: typeof PassThroughHorizontalMovement === "object" && "id" in PassThroughHorizontalMovement ? PassThroughHorizontalMovement === null || PassThroughHorizontalMovement === void 0 ? void 0 : PassThroughHorizontalMovement.id : undefined, value: typeof PassThroughHorizontalMovement === "object" && "value" in PassThroughHorizontalMovement ? PassThroughHorizontalMovement === null || PassThroughHorizontalMovement === void 0 ? void 0 : PassThroughHorizontalMovement.value : PassThroughHorizontalMovement, isRaw: typeof PassThroughHorizontalMovement === "object" && "isRaw" in PassThroughHorizontalMovement && PassThroughHorizontalMovement.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[System.Boolean]", name: "PassThroughVerticalMovement", id: typeof PassThroughVerticalMovement === "object" && "id" in PassThroughVerticalMovement ? PassThroughVerticalMovement === null || PassThroughVerticalMovement === void 0 ? void 0 : PassThroughVerticalMovement.id : undefined, value: typeof PassThroughVerticalMovement === "object" && "value" in PassThroughVerticalMovement ? PassThroughVerticalMovement === null || PassThroughVerticalMovement === void 0 ? void 0 : PassThroughVerticalMovement.value : PassThroughVerticalMovement, isRaw: typeof PassThroughVerticalMovement === "object" && "isRaw" in PassThroughVerticalMovement && PassThroughVerticalMovement.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[System.Boolean]", name: "RequireLockInToPress", id: typeof RequireLockInToPress === "object" && "id" in RequireLockInToPress ? RequireLockInToPress === null || RequireLockInToPress === void 0 ? void 0 : RequireLockInToPress.id : undefined, value: typeof RequireLockInToPress === "object" && "value" in RequireLockInToPress ? RequireLockInToPress === null || RequireLockInToPress === void 0 ? void 0 : RequireLockInToPress.value : RequireLockInToPress, isRaw: typeof RequireLockInToPress === "object" && "isRaw" in RequireLockInToPress && RequireLockInToPress.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[System.Boolean]", name: "RequireInitialPress", id: typeof RequireInitialPress === "object" && "id" in RequireInitialPress ? RequireInitialPress === null || RequireInitialPress === void 0 ? void 0 : RequireInitialPress.id : undefined, value: typeof RequireInitialPress === "object" && "value" in RequireInitialPress ? RequireInitialPress === null || RequireInitialPress === void 0 ? void 0 : RequireInitialPress.value : RequireInitialPress, isRaw: typeof RequireInitialPress === "object" && "isRaw" in RequireInitialPress && RequireInitialPress.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[BaseX.float2]", name: "PressPoint", id: typeof PressPoint === "object" && "id" in PressPoint ? PressPoint === null || PressPoint === void 0 ? void 0 : PressPoint.id : undefined, value: typeof PressPoint === "object" && "value" in PressPoint ? PressPoint === null || PressPoint === void 0 ? void 0 : PressPoint.value : PressPoint, isRaw: typeof PressPoint === "object" && "isRaw" in PressPoint && PressPoint.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.SyncDelegate`1[FrooxEngine.ButtonEventHandler]", name: "Pressed", id: typeof Pressed === "object" && "id" in Pressed ? Pressed === null || Pressed === void 0 ? void 0 : Pressed.id : undefined, value: typeof Pressed === "object" && "value" in Pressed ? Pressed === null || Pressed === void 0 ? void 0 : Pressed.value : Pressed, isRaw: typeof Pressed === "object" && "isRaw" in Pressed && Pressed.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.SyncDelegate`1[FrooxEngine.ButtonEventHandler]", name: "Pressing", id: typeof Pressing === "object" && "id" in Pressing ? Pressing === null || Pressing === void 0 ? void 0 : Pressing.id : undefined, value: typeof Pressing === "object" && "value" in Pressing ? Pressing === null || Pressing === void 0 ? void 0 : Pressing.value : Pressing, isRaw: typeof Pressing === "object" && "isRaw" in Pressing && Pressing.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.SyncDelegate`1[FrooxEngine.ButtonEventHandler]", name: "Released", id: typeof Released === "object" && "id" in Released ? Released === null || Released === void 0 ? void 0 : Released.id : undefined, value: typeof Released === "object" && "value" in Released ? Released === null || Released === void 0 ? void 0 : Released.value : Released, isRaw: typeof Released === "object" && "isRaw" in Released && Released.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.SyncDelegate`1[FrooxEngine.ButtonEventHandler]", name: "HoverEnter", id: typeof HoverEnter === "object" && "id" in HoverEnter ? HoverEnter === null || HoverEnter === void 0 ? void 0 : HoverEnter.id : undefined, value: typeof HoverEnter === "object" && "value" in HoverEnter ? HoverEnter === null || HoverEnter === void 0 ? void 0 : HoverEnter.value : HoverEnter, isRaw: typeof HoverEnter === "object" && "isRaw" in HoverEnter && HoverEnter.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.SyncDelegate`1[FrooxEngine.ButtonEventHandler]", name: "HoverStay", id: typeof HoverStay === "object" && "id" in HoverStay ? HoverStay === null || HoverStay === void 0 ? void 0 : HoverStay.id : undefined, value: typeof HoverStay === "object" && "value" in HoverStay ? HoverStay === null || HoverStay === void 0 ? void 0 : HoverStay.value : HoverStay, isRaw: typeof HoverStay === "object" && "isRaw" in HoverStay && HoverStay.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.SyncDelegate`1[FrooxEngine.ButtonEventHandler]", name: "HoverLeave", id: typeof HoverLeave === "object" && "id" in HoverLeave ? HoverLeave === null || HoverLeave === void 0 ? void 0 : HoverLeave.id : undefined, value: typeof HoverLeave === "object" && "value" in HoverLeave ? HoverLeave === null || HoverLeave === void 0 ? void 0 : HoverLeave.value : HoverLeave, isRaw: typeof HoverLeave === "object" && "isRaw" in HoverLeave && HoverLeave.isRaw ? true : undefined })] })));
}
exports.Button = Button;
;