UNPKG

neos-script

Version:

[neos-script-sample](https://github.com/rheniumNV/neos-script-sample)

23 lines (22 loc) 16.6 kB
"use strict"; 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.NeosButton = void 0; var jsx_runtime_1 = require("neos-script/jsx-runtime"); var core_1 = require("../../../core"); function NeosButton(props) { var id = props.id, persistentId = props.persistentId, updateOrder = props.updateOrder, Enabled = props.Enabled, Style = props.Style, AcceptPhysicalTouch = props.AcceptPhysicalTouch, AcceptRemoteTouch = props.AcceptRemoteTouch, Color = props.Color, Width = props.Width, Height = props.Height, Thickness = props.Thickness, Slant = props.Slant, IsEnabled = props.IsEnabled, Pressed = props.Pressed, Pressing = props.Pressing, Released = props.Released, IsPressed = props.IsPressed, AcceptOutOfSightTouch = props.AcceptOutOfSightTouch, _textSlot = props._textSlot, _textRenderer = props._textRenderer, _buttonPosition = props._buttonPosition, _colliderSize = props._colliderSize, _colliderOffset = props._colliderOffset, _textPosition = props._textPosition, _textBounds = props._textBounds, _holderMesh = props._holderMesh, _buttonMesh = props._buttonMesh, _holderMaterial = props._holderMaterial, _buttonMaterial = props._buttonMaterial, _pressDepth = props._pressDepth, _flashIndex = props._flashIndex; return ((0, jsx_runtime_1.jsxs)(core_1.Component, __assign({ type: "FrooxEngine.NeosButton", 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.RelayRef`1[FrooxEngine.NeosUIStyle]", name: "Style", id: typeof Style === "object" && "id" in Style ? Style === null || Style === void 0 ? void 0 : Style.id : undefined, value: typeof Style === "object" && "value" in Style ? Style === null || Style === void 0 ? void 0 : Style.value : Style, isRaw: typeof Style === "object" && "isRaw" in Style && Style.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[System.Boolean]", name: "AcceptPhysicalTouch", id: typeof AcceptPhysicalTouch === "object" && "id" in AcceptPhysicalTouch ? AcceptPhysicalTouch === null || AcceptPhysicalTouch === void 0 ? void 0 : AcceptPhysicalTouch.id : undefined, value: typeof AcceptPhysicalTouch === "object" && "value" in AcceptPhysicalTouch ? AcceptPhysicalTouch === null || AcceptPhysicalTouch === void 0 ? void 0 : AcceptPhysicalTouch.value : AcceptPhysicalTouch, isRaw: typeof AcceptPhysicalTouch === "object" && "isRaw" in AcceptPhysicalTouch && AcceptPhysicalTouch.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[System.Boolean]", name: "AcceptRemoteTouch", id: typeof AcceptRemoteTouch === "object" && "id" in AcceptRemoteTouch ? AcceptRemoteTouch === null || AcceptRemoteTouch === void 0 ? void 0 : AcceptRemoteTouch.id : undefined, value: typeof AcceptRemoteTouch === "object" && "value" in AcceptRemoteTouch ? AcceptRemoteTouch === null || AcceptRemoteTouch === void 0 ? void 0 : AcceptRemoteTouch.value : AcceptRemoteTouch, isRaw: typeof AcceptRemoteTouch === "object" && "isRaw" in AcceptRemoteTouch && AcceptRemoteTouch.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[BaseX.color]", name: "Color", id: typeof Color === "object" && "id" in Color ? Color === null || Color === void 0 ? void 0 : Color.id : undefined, value: typeof Color === "object" && "value" in Color ? Color === null || Color === void 0 ? void 0 : Color.value : Color, isRaw: typeof Color === "object" && "isRaw" in Color && Color.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[System.Single]", name: "Width", id: typeof Width === "object" && "id" in Width ? Width === null || Width === void 0 ? void 0 : Width.id : undefined, value: typeof Width === "object" && "value" in Width ? Width === null || Width === void 0 ? void 0 : Width.value : Width, isRaw: typeof Width === "object" && "isRaw" in Width && Width.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[System.Single]", name: "Height", id: typeof Height === "object" && "id" in Height ? Height === null || Height === void 0 ? void 0 : Height.id : undefined, value: typeof Height === "object" && "value" in Height ? Height === null || Height === void 0 ? void 0 : Height.value : Height, isRaw: typeof Height === "object" && "isRaw" in Height && Height.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[System.Single]", name: "Thickness", id: typeof Thickness === "object" && "id" in Thickness ? Thickness === null || Thickness === void 0 ? void 0 : Thickness.id : undefined, value: typeof Thickness === "object" && "value" in Thickness ? Thickness === null || Thickness === void 0 ? void 0 : Thickness.value : Thickness, isRaw: typeof Thickness === "object" && "isRaw" in Thickness && Thickness.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[System.Single]", name: "Slant", id: typeof Slant === "object" && "id" in Slant ? Slant === null || Slant === void 0 ? void 0 : Slant.id : undefined, value: typeof Slant === "object" && "value" in Slant ? Slant === null || Slant === void 0 ? void 0 : Slant.value : Slant, isRaw: typeof Slant === "object" && "isRaw" in Slant && Slant.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[System.Boolean]", name: "IsEnabled", id: typeof IsEnabled === "object" && "id" in IsEnabled ? IsEnabled === null || IsEnabled === void 0 ? void 0 : IsEnabled.id : undefined, value: typeof IsEnabled === "object" && "value" in IsEnabled ? IsEnabled === null || IsEnabled === void 0 ? void 0 : IsEnabled.value : IsEnabled, isRaw: typeof IsEnabled === "object" && "isRaw" in IsEnabled && IsEnabled.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.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: "AcceptOutOfSightTouch", id: typeof AcceptOutOfSightTouch === "object" && "id" in AcceptOutOfSightTouch ? AcceptOutOfSightTouch === null || AcceptOutOfSightTouch === void 0 ? void 0 : AcceptOutOfSightTouch.id : undefined, value: typeof AcceptOutOfSightTouch === "object" && "value" in AcceptOutOfSightTouch ? AcceptOutOfSightTouch === null || AcceptOutOfSightTouch === void 0 ? void 0 : AcceptOutOfSightTouch.value : AcceptOutOfSightTouch, isRaw: typeof AcceptOutOfSightTouch === "object" && "isRaw" in AcceptOutOfSightTouch && AcceptOutOfSightTouch.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.SyncRef`1[FrooxEngine.Slot]", name: "_textSlot", id: typeof _textSlot === "object" && "id" in _textSlot ? _textSlot === null || _textSlot === void 0 ? void 0 : _textSlot.id : undefined, value: typeof _textSlot === "object" && "value" in _textSlot ? _textSlot === null || _textSlot === void 0 ? void 0 : _textSlot.value : _textSlot, isRaw: typeof _textSlot === "object" && "isRaw" in _textSlot && _textSlot.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.SyncRef`1[FrooxEngine.TextRenderer]", name: "_textRenderer", id: typeof _textRenderer === "object" && "id" in _textRenderer ? _textRenderer === null || _textRenderer === void 0 ? void 0 : _textRenderer.id : undefined, value: typeof _textRenderer === "object" && "value" in _textRenderer ? _textRenderer === null || _textRenderer === void 0 ? void 0 : _textRenderer.value : _textRenderer, isRaw: typeof _textRenderer === "object" && "isRaw" in _textRenderer && _textRenderer.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.FieldDrive`1[BaseX.float3]", name: "_buttonPosition", id: typeof _buttonPosition === "object" && "id" in _buttonPosition ? _buttonPosition === null || _buttonPosition === void 0 ? void 0 : _buttonPosition.id : undefined, value: typeof _buttonPosition === "object" && "value" in _buttonPosition ? _buttonPosition === null || _buttonPosition === void 0 ? void 0 : _buttonPosition.value : _buttonPosition, isRaw: typeof _buttonPosition === "object" && "isRaw" in _buttonPosition && _buttonPosition.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.FieldDrive`1[BaseX.float3]", name: "_colliderSize", id: typeof _colliderSize === "object" && "id" in _colliderSize ? _colliderSize === null || _colliderSize === void 0 ? void 0 : _colliderSize.id : undefined, value: typeof _colliderSize === "object" && "value" in _colliderSize ? _colliderSize === null || _colliderSize === void 0 ? void 0 : _colliderSize.value : _colliderSize, isRaw: typeof _colliderSize === "object" && "isRaw" in _colliderSize && _colliderSize.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.FieldDrive`1[BaseX.float3]", name: "_colliderOffset", id: typeof _colliderOffset === "object" && "id" in _colliderOffset ? _colliderOffset === null || _colliderOffset === void 0 ? void 0 : _colliderOffset.id : undefined, value: typeof _colliderOffset === "object" && "value" in _colliderOffset ? _colliderOffset === null || _colliderOffset === void 0 ? void 0 : _colliderOffset.value : _colliderOffset, isRaw: typeof _colliderOffset === "object" && "isRaw" in _colliderOffset && _colliderOffset.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.FieldDrive`1[BaseX.float3]", name: "_textPosition", id: typeof _textPosition === "object" && "id" in _textPosition ? _textPosition === null || _textPosition === void 0 ? void 0 : _textPosition.id : undefined, value: typeof _textPosition === "object" && "value" in _textPosition ? _textPosition === null || _textPosition === void 0 ? void 0 : _textPosition.value : _textPosition, isRaw: typeof _textPosition === "object" && "isRaw" in _textPosition && _textPosition.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.FieldDrive`1[BaseX.float2]", name: "_textBounds", id: typeof _textBounds === "object" && "id" in _textBounds ? _textBounds === null || _textBounds === void 0 ? void 0 : _textBounds.id : undefined, value: typeof _textBounds === "object" && "value" in _textBounds ? _textBounds === null || _textBounds === void 0 ? void 0 : _textBounds.value : _textBounds, isRaw: typeof _textBounds === "object" && "isRaw" in _textBounds && _textBounds.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.DriveRef`1[FrooxEngine.BevelSoliStripeMesh]", name: "_holderMesh", id: typeof _holderMesh === "object" && "id" in _holderMesh ? _holderMesh === null || _holderMesh === void 0 ? void 0 : _holderMesh.id : undefined, value: typeof _holderMesh === "object" && "value" in _holderMesh ? _holderMesh === null || _holderMesh === void 0 ? void 0 : _holderMesh.value : _holderMesh, isRaw: typeof _holderMesh === "object" && "isRaw" in _holderMesh && _holderMesh.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.DriveRef`1[FrooxEngine.BevelSoliStripeMesh]", name: "_buttonMesh", id: typeof _buttonMesh === "object" && "id" in _buttonMesh ? _buttonMesh === null || _buttonMesh === void 0 ? void 0 : _buttonMesh.id : undefined, value: typeof _buttonMesh === "object" && "value" in _buttonMesh ? _buttonMesh === null || _buttonMesh === void 0 ? void 0 : _buttonMesh.value : _buttonMesh, isRaw: typeof _buttonMesh === "object" && "isRaw" in _buttonMesh && _buttonMesh.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.DriveRef`1[FrooxEngine.PBS_RimMetallic]", name: "_holderMaterial", id: typeof _holderMaterial === "object" && "id" in _holderMaterial ? _holderMaterial === null || _holderMaterial === void 0 ? void 0 : _holderMaterial.id : undefined, value: typeof _holderMaterial === "object" && "value" in _holderMaterial ? _holderMaterial === null || _holderMaterial === void 0 ? void 0 : _holderMaterial.value : _holderMaterial, isRaw: typeof _holderMaterial === "object" && "isRaw" in _holderMaterial && _holderMaterial.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.DriveRef`1[FrooxEngine.PBS_RimMetallic]", name: "_buttonMaterial", id: typeof _buttonMaterial === "object" && "id" in _buttonMaterial ? _buttonMaterial === null || _buttonMaterial === void 0 ? void 0 : _buttonMaterial.id : undefined, value: typeof _buttonMaterial === "object" && "value" in _buttonMaterial ? _buttonMaterial === null || _buttonMaterial === void 0 ? void 0 : _buttonMaterial.value : _buttonMaterial, isRaw: typeof _buttonMaterial === "object" && "isRaw" in _buttonMaterial && _buttonMaterial.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[System.Single]", name: "_pressDepth", id: typeof _pressDepth === "object" && "id" in _pressDepth ? _pressDepth === null || _pressDepth === void 0 ? void 0 : _pressDepth.id : undefined, value: typeof _pressDepth === "object" && "value" in _pressDepth ? _pressDepth === null || _pressDepth === void 0 ? void 0 : _pressDepth.value : _pressDepth, isRaw: typeof _pressDepth === "object" && "isRaw" in _pressDepth && _pressDepth.isRaw ? true : undefined }), (0, jsx_runtime_1.jsx)(core_1.Member, { type: "FrooxEngine.Sync`1[System.Int32]", name: "_flashIndex", id: typeof _flashIndex === "object" && "id" in _flashIndex ? _flashIndex === null || _flashIndex === void 0 ? void 0 : _flashIndex.id : undefined, value: typeof _flashIndex === "object" && "value" in _flashIndex ? _flashIndex === null || _flashIndex === void 0 ? void 0 : _flashIndex.value : _flashIndex, isRaw: typeof _flashIndex === "object" && "isRaw" in _flashIndex && _flashIndex.isRaw ? true : undefined })] }))); } exports.NeosButton = NeosButton; ;