gdcore-tools 2.0.0-beta6 → 2.0.0-beta8
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/Runtime/Cordova/config.xml +4 -0
- package/dist/Runtime/Cordova/package.json +12 -20
- package/dist/Runtime/CustomRuntimeObject.js +1 -1
- package/dist/Runtime/CustomRuntimeObject.js.map +2 -2
- package/dist/Runtime/CustomRuntimeObjectInstanceContainer.js +1 -1
- package/dist/Runtime/CustomRuntimeObjectInstanceContainer.js.map +2 -2
- package/dist/Runtime/Extensions/3D/A_RuntimeObject3D.js +1 -1
- package/dist/Runtime/Extensions/3D/A_RuntimeObject3D.js.map +2 -2
- package/dist/Runtime/Extensions/3D/AmbientLight.js +1 -1
- package/dist/Runtime/Extensions/3D/AmbientLight.js.map +2 -2
- package/dist/Runtime/Extensions/3D/CustomRuntimeObject3D.js +1 -1
- package/dist/Runtime/Extensions/3D/CustomRuntimeObject3D.js.map +2 -2
- package/dist/Runtime/Extensions/3D/DirectionalLight.js +1 -1
- package/dist/Runtime/Extensions/3D/DirectionalLight.js.map +2 -2
- package/dist/Runtime/Extensions/3D/ExponentialFog.js +1 -1
- package/dist/Runtime/Extensions/3D/ExponentialFog.js.map +2 -2
- package/dist/Runtime/Extensions/3D/HemisphereLight.js +1 -1
- package/dist/Runtime/Extensions/3D/HemisphereLight.js.map +2 -2
- package/dist/Runtime/Extensions/3D/JsExtension.js +419 -228
- package/dist/Runtime/Extensions/3D/LinearFog.js +1 -1
- package/dist/Runtime/Extensions/3D/LinearFog.js.map +2 -2
- package/dist/Runtime/Extensions/3D/Model3DRuntimeObject.js +1 -1
- package/dist/Runtime/Extensions/3D/Model3DRuntimeObject.js.map +2 -2
- package/dist/Runtime/Extensions/AdvancedWindow/electron-advancedwindowtools.js +1 -1
- package/dist/Runtime/Extensions/AdvancedWindow/electron-advancedwindowtools.js.map +2 -2
- package/dist/Runtime/Extensions/AnchorBehavior/anchorruntimebehavior.js +1 -1
- package/dist/Runtime/Extensions/AnchorBehavior/anchorruntimebehavior.js.map +2 -2
- package/dist/Runtime/Extensions/BBText/JsExtension.js +45 -42
- package/dist/Runtime/Extensions/BBText/bbtextruntimeobject.js +1 -1
- package/dist/Runtime/Extensions/BBText/bbtextruntimeobject.js.map +2 -2
- package/dist/Runtime/Extensions/BitmapText/JsExtension.js +40 -49
- package/dist/Runtime/Extensions/BitmapText/bitmaptextruntimeobject.js +1 -1
- package/dist/Runtime/Extensions/BitmapText/bitmaptextruntimeobject.js.map +2 -2
- package/dist/Runtime/Extensions/Effects/bevel-pixi-filter.js +1 -1
- package/dist/Runtime/Extensions/Effects/bevel-pixi-filter.js.map +2 -2
- package/dist/Runtime/Extensions/Effects/color-replace-pixi-filter.js +1 -1
- package/dist/Runtime/Extensions/Effects/color-replace-pixi-filter.js.map +2 -2
- package/dist/Runtime/Extensions/Effects/drop-shadow-pixi-filter.js +1 -1
- package/dist/Runtime/Extensions/Effects/drop-shadow-pixi-filter.js.map +2 -2
- package/dist/Runtime/Extensions/Effects/glow-pixi-filter.js +1 -1
- package/dist/Runtime/Extensions/Effects/glow-pixi-filter.js.map +2 -2
- package/dist/Runtime/Extensions/Effects/outline-pixi-filter.js +1 -1
- package/dist/Runtime/Extensions/Effects/outline-pixi-filter.js.map +2 -2
- package/dist/Runtime/Extensions/ExampleJsExtension/JsExtension.js +18 -21
- package/dist/Runtime/Extensions/Firebase/B_firebasetools/C_firebasetools.js +1 -1
- package/dist/Runtime/Extensions/Firebase/B_firebasetools/C_firebasetools.js.map +2 -2
- package/dist/Runtime/Extensions/JsExtensionTypes.d.ts +8 -2
- package/dist/Runtime/Extensions/Leaderboards/leaderboardstools.js +1 -1
- package/dist/Runtime/Extensions/Leaderboards/leaderboardstools.js.map +2 -2
- package/dist/Runtime/Extensions/Lighting/JsExtension.js +50 -38
- package/dist/Runtime/Extensions/Lighting/lightruntimeobject-pixi-renderer.js +1 -1
- package/dist/Runtime/Extensions/Lighting/lightruntimeobject-pixi-renderer.js.map +2 -2
- package/dist/Runtime/Extensions/Multiplayer/JsExtension.js +15 -0
- package/dist/Runtime/Extensions/Multiplayer/multiplayerobjectruntimebehavior.js +1 -1
- package/dist/Runtime/Extensions/Multiplayer/multiplayerobjectruntimebehavior.js.map +2 -2
- package/dist/Runtime/Extensions/Multiplayer/multiplayertools.js.map +2 -2
- package/dist/Runtime/Extensions/PanelSpriteObject/panelspriteruntimeobject.js +1 -1
- package/dist/Runtime/Extensions/PanelSpriteObject/panelspriteruntimeobject.js.map +2 -2
- package/dist/Runtime/Extensions/ParticleSystem/particleemitterobject-pixi-renderer.js +1 -1
- package/dist/Runtime/Extensions/ParticleSystem/particleemitterobject-pixi-renderer.js.map +2 -2
- package/dist/Runtime/Extensions/ParticleSystem/particleemitterobject.js +1 -1
- package/dist/Runtime/Extensions/ParticleSystem/particleemitterobject.js.map +2 -2
- package/dist/Runtime/Extensions/Physics2Behavior/JsExtension.js +76 -24
- package/dist/Runtime/Extensions/Physics2Behavior/physics2runtimebehavior.js +1 -1
- package/dist/Runtime/Extensions/Physics2Behavior/physics2runtimebehavior.js.map +2 -2
- package/dist/Runtime/Extensions/PlayerAuthentication/playerauthenticationtools.js +1 -1
- package/dist/Runtime/Extensions/PlayerAuthentication/playerauthenticationtools.js.map +2 -2
- package/dist/Runtime/Extensions/PrimitiveDrawing/shapepainterruntimeobject.js +1 -1
- package/dist/Runtime/Extensions/PrimitiveDrawing/shapepainterruntimeobject.js.map +2 -2
- package/dist/Runtime/Extensions/Spine/JsExtension.js +45 -36
- package/dist/Runtime/Extensions/Spine/spineruntimeobject.js +1 -1
- package/dist/Runtime/Extensions/Spine/spineruntimeobject.js.map +2 -2
- package/dist/Runtime/Extensions/TextInput/JsExtension.js +52 -55
- package/dist/Runtime/Extensions/TextInput/textinputruntimeobject-pixi-renderer.js +1 -1
- package/dist/Runtime/Extensions/TextInput/textinputruntimeobject-pixi-renderer.js.map +2 -2
- package/dist/Runtime/Extensions/TextInput/textinputruntimeobject.js +1 -1
- package/dist/Runtime/Extensions/TextInput/textinputruntimeobject.js.map +2 -2
- package/dist/Runtime/Extensions/TextObject/textruntimeobject-pixi-renderer.js +1 -1
- package/dist/Runtime/Extensions/TextObject/textruntimeobject-pixi-renderer.js.map +2 -2
- package/dist/Runtime/Extensions/TextObject/textruntimeobject.js +1 -1
- package/dist/Runtime/Extensions/TextObject/textruntimeobject.js.map +2 -2
- package/dist/Runtime/Extensions/TileMap/JsExtension.js +430 -261
- package/dist/Runtime/Extensions/TileMap/TileMapRuntimeManager.js +1 -1
- package/dist/Runtime/Extensions/TileMap/TileMapRuntimeManager.js.map +2 -2
- package/dist/Runtime/Extensions/TileMap/collision/TransformedTileMap.js +1 -1
- package/dist/Runtime/Extensions/TileMap/collision/TransformedTileMap.js.map +2 -2
- package/dist/Runtime/Extensions/TileMap/helper/TileMapHelper.js +1 -1
- package/dist/Runtime/Extensions/TileMap/helper/TileMapHelper.js.map +1 -1
- package/dist/Runtime/Extensions/TileMap/helper/dts/model/TileMapModel.d.ts.map +1 -1
- package/dist/Runtime/Extensions/TileMap/helper/dts/render/TileMapPixiHelper.d.ts +1 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/render/TileMapPixiHelper.d.ts.map +1 -1
- package/dist/Runtime/Extensions/TileMap/simpletilemapruntimeobject.js +1 -1
- package/dist/Runtime/Extensions/TileMap/simpletilemapruntimeobject.js.map +2 -2
- package/dist/Runtime/Extensions/TileMap/tilemapcollisionmaskruntimeobject.js +1 -1
- package/dist/Runtime/Extensions/TileMap/tilemapcollisionmaskruntimeobject.js.map +2 -2
- package/dist/Runtime/Extensions/TileMap/tilemapruntimeobject.js +1 -1
- package/dist/Runtime/Extensions/TileMap/tilemapruntimeobject.js.map +2 -2
- package/dist/Runtime/Extensions/TiledSpriteObject/tiledspriteruntimeobject.js +1 -1
- package/dist/Runtime/Extensions/TiledSpriteObject/tiledspriteruntimeobject.js.map +2 -2
- package/dist/Runtime/Extensions/Video/JsExtension.js +35 -44
- package/dist/Runtime/Extensions/Video/videoruntimeobject.js +1 -1
- package/dist/Runtime/Extensions/Video/videoruntimeobject.js.map +2 -2
- package/dist/Runtime/ResourceLoader.js +1 -1
- package/dist/Runtime/ResourceLoader.js.map +2 -2
- package/dist/Runtime/RuntimeInstanceContainer.js.map +2 -2
- package/dist/Runtime/debugger-client/hot-reloader.js +2 -2
- package/dist/Runtime/debugger-client/hot-reloader.js.map +2 -2
- package/dist/Runtime/events-tools/inputtools.js +1 -1
- package/dist/Runtime/events-tools/inputtools.js.map +2 -2
- package/dist/Runtime/events-tools/objecttools.js +1 -1
- package/dist/Runtime/events-tools/objecttools.js.map +2 -2
- package/dist/Runtime/gd.js +1 -1
- package/dist/Runtime/gd.js.map +2 -2
- package/dist/Runtime/howler-sound-manager/howler-sound-manager.js +1 -1
- package/dist/Runtime/howler-sound-manager/howler-sound-manager.js.map +2 -2
- package/dist/Runtime/inputmanager.js +1 -1
- package/dist/Runtime/inputmanager.js.map +2 -2
- package/dist/Runtime/pixi-renderers/CustomRuntimeObject2DPixiRenderer.js +1 -1
- package/dist/Runtime/pixi-renderers/CustomRuntimeObject2DPixiRenderer.js.map +2 -2
- package/dist/Runtime/pixi-renderers/pixi-filters-tools.js +1 -1
- package/dist/Runtime/pixi-renderers/pixi-filters-tools.js.map +2 -2
- package/dist/Runtime/pixi-renderers/runtimegame-pixi-renderer.js +1 -1
- package/dist/Runtime/pixi-renderers/runtimegame-pixi-renderer.js.map +2 -2
- package/dist/Runtime/pixi-renderers/spriteruntimeobject-pixi-renderer.js +1 -1
- package/dist/Runtime/pixi-renderers/spriteruntimeobject-pixi-renderer.js.map +2 -2
- package/dist/Runtime/runtimegame.js +1 -1
- package/dist/Runtime/runtimegame.js.map +1 -1
- package/dist/Runtime/runtimeobject.js +1 -1
- package/dist/Runtime/runtimeobject.js.map +2 -2
- package/dist/Runtime/spriteruntimeobject.js +1 -1
- package/dist/Runtime/spriteruntimeobject.js.map +2 -2
- package/dist/Runtime/types/project-data.d.ts +5 -0
- package/dist/lib/libGD.cjs +1 -1
- package/dist/lib/libGD.d.cts +5 -0
- package/dist/lib/libGD.wasm +0 -0
- package/dist/loaders.cjs +3 -1
- package/dist/loaders.d.cts +2 -0
- package/gd.d.ts +74 -30
- package/package.json +3 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var gdjs;(function(r){const n=["text","email","password","number","telephone number","url","search","text area"],o=i=>{const t=i.toLowerCase();return n.includes(t)?i:"text"},s=300,l=30;class d extends r.RuntimeObject{constructor(t,e){super(t,e);this.opacity=255;this._width=s;this._height=l;this._string=e.content.initialValue,this._placeholder=e.content.placeholder,this._fontResourceName=e.content.fontResourceName,this._fontSize=e.content.fontSize||20,this._inputType=o(e.content.inputType),this._textColor=r.rgbOrHexToRGBColor(e.content.textColor),this._fillColor=r.rgbOrHexToRGBColor(e.content.fillColor),this._fillOpacity=e.content.fillOpacity,this._borderColor=r.rgbOrHexToRGBColor(e.content.borderColor),this._borderOpacity=e.content.borderOpacity,this._borderWidth=e.content.borderWidth,this._disabled=e.content.disabled,this._readOnly=e.content.readOnly,this._renderer=new r.TextInputRuntimeObjectRenderer(this,t),this.onCreated()}getRendererObject(){return null}updateFromObjectData(t,e){return t.content.initialValue!==e.content.initialValue&&this._string===t.content.initialValue&&this.setString(e.content.initialValue),t.content.placeholder!==e.content.placeholder&&this.setPlaceholder(e.content.placeholder),t.content.fontResourceName!==e.content.fontResourceName&&this.setFontResourceName(e.content.fontResourceName),t.content.fontSize!==e.content.fontSize&&this.setFontSize(e.content.fontSize),t.content.inputType!==e.content.inputType&&this.setInputType(e.content.inputType),t.content.textColor!==e.content.textColor&&this.setTextColor(e.content.textColor),t.content.fillColor!==e.content.fillColor&&this.setFillColor(e.content.fillColor),t.content.fillOpacity!==e.content.fillOpacity&&this.setFillOpacity(e.content.fillOpacity),t.content.borderColor!==e.content.borderColor&&this.setBorderColor(e.content.borderColor),t.content.borderOpacity!==e.content.borderOpacity&&this.setBorderOpacity(e.content.borderOpacity),t.content.borderWidth!==e.content.borderWidth&&this.setBorderWidth(e.content.borderWidth),t.content.disabled!==e.content.disabled&&this.setDisabled(e.content.disabled),t.content.readOnly!==e.content.readOnly&&this.setReadOnly(e.content.readOnly),!0}getNetworkSyncData(){return{...super.getNetworkSyncData(),opa:this.getOpacity(),wid:this.getWidth(),hei:this.getHeight(),txt:this.getText(),frn:this.getFontResourceName(),fs:this.getFontSize(),place:this.getPlaceholder(),it:this.getInputType(),tc:this.getTextColor(),fc:this.getFillColor(),fo:this.getFillOpacity(),bc:this.getBorderColor(),bo:this.getBorderOpacity(),bw:this.getBorderWidth(),dis:this.isDisabled(),ro:this.isReadOnly()}}updateFromNetworkSyncData(t){super.updateFromNetworkSyncData(t),t.opa!==void 0&&this.setOpacity(t.opa),t.wid!==void 0&&this.setWidth(t.wid),t.hei!==void 0&&this.setHeight(t.hei),t.txt!==void 0&&this.setText(t.txt),t.frn!==void 0&&this.setFontResourceName(t.frn),t.fs!==void 0&&this.setFontSize(t.fs),t.place!==void 0&&this.setPlaceholder(t.place),t.it!==void 0&&this.setInputType(t.it),t.tc!==void 0&&this.setTextColor(t.tc),t.fc!==void 0&&this.setFillColor(t.fc),t.fo!==void 0&&this.setFillOpacity(t.fo),t.bc!==void 0&&this.setBorderColor(t.bc),t.bo!==void 0&&this.setBorderOpacity(t.bo),t.bw!==void 0&&this.setBorderWidth(t.bw),t.dis!==void 0&&this.setDisabled(t.dis),t.ro!==void 0&&this.setReadOnly(t.ro)}updatePreRender(t){this._renderer.updatePreRender()}extraInitializationFromInitialInstance(t){for(const e of t.stringProperties)e.name==="initialValue"?this.setString(e.value):e.name==="placeholder"&&this.setPlaceholder(e.value);t.customSize&&(this.setWidth(t.width),this.setHeight(t.height))}onScenePaused(t){this._renderer.onScenePaused()}onSceneResumed(t){this._renderer.onSceneResumed()}onDestroyed(){super.onDestroyed(),this._renderer.onDestroy()}setOpacity(t){this.opacity=Math.max(0,Math.min(255,t)),this._renderer.updateOpacity()}getOpacity(){return this.opacity}setSize(t,e){this.setWidth(t),this.setHeight(e)}setWidth(t){this._width=t}setHeight(t){this._height=t}getWidth(){return this._width}getHeight(){return this._height}getString(){return this.getText()}setString(t){this.setText(t)}getText(){return this._string}setText(t){t!==this._string&&(this._string=t,this._renderer.updateString())}onRendererInputValueChanged(t){this._string=t}getFontResourceName(){return this._fontResourceName}setFontResourceName(t){this._fontResourceName!==t&&(this._fontResourceName=t,this._renderer.updateFont())}getFontSize(){return this._fontSize}setFontSize(t){this._fontSize=t}getPlaceholder(){return this._placeholder}setPlaceholder(t){t!==this._placeholder&&(this._placeholder=t,this._renderer.updatePlaceholder())}getInputType(){return this._inputType}setInputType(t){const e=t.toLowerCase();e!==this._inputType&&(this._inputType=o(e),this._renderer.updateInputType())}setTextColor(t){this._textColor=r.rgbOrHexToRGBColor(t),this._renderer.updateTextColor()}getTextColor(){return this._textColor[0]+";"+this._textColor[1]+";"+this._textColor[2]}_getRawTextColor(){return this._textColor}setFillColor(t){this._fillColor=r.rgbOrHexToRGBColor(t),this._renderer.updateFillColorAndOpacity()}getFillColor(){return this._fillColor[0]+";"+this._fillColor[1]+";"+this._fillColor[2]}_getRawFillColor(){return this._fillColor}setFillOpacity(t){this._fillOpacity=Math.max(0,Math.min(255,t)),this._renderer.updateFillColorAndOpacity()}getFillOpacity(){return this._fillOpacity}setBorderColor(t){this._borderColor=r.rgbOrHexToRGBColor(t),this._renderer.updateBorderColorAndOpacity()}getBorderColor(){return this._borderColor[0]+";"+this._borderColor[1]+";"+this._borderColor[2]}_getRawBorderColor(){return this._borderColor}setBorderOpacity(t){this._borderOpacity=Math.max(0,Math.min(255,t)),this._renderer.updateBorderColorAndOpacity()}getBorderOpacity(){return this._borderOpacity}setBorderWidth(t){this._borderWidth=Math.max(0,t),this._renderer.updateBorderWidth()}getBorderWidth(){return this._borderWidth}setDisabled(t){this._disabled=t,this._renderer.updateDisabled()}isDisabled(){return this._disabled}setReadOnly(t){this._readOnly=t,this._renderer.updateReadOnly()}isReadOnly(){return this._readOnly}isFocused(){return this._renderer.isFocused()}focus(){this._renderer.focus()}}r.TextInputRuntimeObject=d,r.registerObject("TextInput::TextInputObject",r.TextInputRuntimeObject)})(gdjs||(gdjs={}));
|
|
1
|
+
var gdjs;(function(r){const n=["text","email","password","number","telephone number","url","search","text area"],o=i=>{const t=i.toLowerCase();return n.includes(t)?i:"text"},s=300,l=30;class d extends r.RuntimeObject{constructor(t,e){super(t,e);this.opacity=255;this._width=s;this._height=l;this._string=e.content.initialValue,this._placeholder=e.content.placeholder,this._fontResourceName=e.content.fontResourceName,this._fontSize=e.content.fontSize||20,this._inputType=o(e.content.inputType),this._textColor=r.rgbOrHexToRGBColor(e.content.textColor),this._fillColor=r.rgbOrHexToRGBColor(e.content.fillColor),this._fillOpacity=e.content.fillOpacity,this._borderColor=r.rgbOrHexToRGBColor(e.content.borderColor),this._borderOpacity=e.content.borderOpacity,this._borderWidth=e.content.borderWidth,this._disabled=e.content.disabled,this._readOnly=e.content.readOnly,this._renderer=new r.TextInputRuntimeObjectRenderer(this,t),this.onCreated()}getRendererObject(){return null}updateFromObjectData(t,e){return t.content.initialValue!==e.content.initialValue&&this._string===t.content.initialValue&&this.setString(e.content.initialValue),t.content.placeholder!==e.content.placeholder&&this.setPlaceholder(e.content.placeholder),t.content.fontResourceName!==e.content.fontResourceName&&this.setFontResourceName(e.content.fontResourceName),t.content.fontSize!==e.content.fontSize&&this.setFontSize(e.content.fontSize),t.content.inputType!==e.content.inputType&&this.setInputType(e.content.inputType),t.content.textColor!==e.content.textColor&&this.setTextColor(e.content.textColor),t.content.fillColor!==e.content.fillColor&&this.setFillColor(e.content.fillColor),t.content.fillOpacity!==e.content.fillOpacity&&this.setFillOpacity(e.content.fillOpacity),t.content.borderColor!==e.content.borderColor&&this.setBorderColor(e.content.borderColor),t.content.borderOpacity!==e.content.borderOpacity&&this.setBorderOpacity(e.content.borderOpacity),t.content.borderWidth!==e.content.borderWidth&&this.setBorderWidth(e.content.borderWidth),t.content.disabled!==e.content.disabled&&this.setDisabled(e.content.disabled),t.content.readOnly!==e.content.readOnly&&this.setReadOnly(e.content.readOnly),!0}getNetworkSyncData(){return{...super.getNetworkSyncData(),opa:this.getOpacity(),wid:this.getWidth(),hei:this.getHeight(),txt:this.getText(),frn:this.getFontResourceName(),fs:this.getFontSize(),place:this.getPlaceholder(),it:this.getInputType(),tc:this.getTextColor(),fc:this.getFillColor(),fo:this.getFillOpacity(),bc:this.getBorderColor(),bo:this.getBorderOpacity(),bw:this.getBorderWidth(),dis:this.isDisabled(),ro:this.isReadOnly()}}updateFromNetworkSyncData(t){super.updateFromNetworkSyncData(t),t.opa!==void 0&&this.setOpacity(t.opa),t.wid!==void 0&&this.setWidth(t.wid),t.hei!==void 0&&this.setHeight(t.hei),t.txt!==void 0&&this.setText(t.txt),t.frn!==void 0&&this.setFontResourceName(t.frn),t.fs!==void 0&&this.setFontSize(t.fs),t.place!==void 0&&this.setPlaceholder(t.place),t.it!==void 0&&this.setInputType(t.it),t.tc!==void 0&&this.setTextColor(t.tc),t.fc!==void 0&&this.setFillColor(t.fc),t.fo!==void 0&&this.setFillOpacity(t.fo),t.bc!==void 0&&this.setBorderColor(t.bc),t.bo!==void 0&&this.setBorderOpacity(t.bo),t.bw!==void 0&&this.setBorderWidth(t.bw),t.dis!==void 0&&this.setDisabled(t.dis),t.ro!==void 0&&this.setReadOnly(t.ro)}updatePreRender(t){this._renderer.updatePreRender()}extraInitializationFromInitialInstance(t){for(const e of t.stringProperties)e.name==="initialValue"?this.setString(e.value):e.name==="placeholder"&&this.setPlaceholder(e.value);t.customSize&&(this.setWidth(t.width),this.setHeight(t.height)),t.opacity!==void 0&&this.setOpacity(t.opacity)}onScenePaused(t){this._renderer.onScenePaused()}onSceneResumed(t){this._renderer.onSceneResumed()}onDestroyed(){super.onDestroyed(),this._renderer.onDestroy()}setOpacity(t){this.opacity=Math.max(0,Math.min(255,t)),this._renderer.updateOpacity()}getOpacity(){return this.opacity}setSize(t,e){this.setWidth(t),this.setHeight(e)}setWidth(t){this._width=t}setHeight(t){this._height=t}getWidth(){return this._width}getHeight(){return this._height}getString(){return this.getText()}setString(t){this.setText(t)}getText(){return this._string}setText(t){t!==this._string&&(this._string=t,this._renderer.updateString())}onRendererInputValueChanged(t){this._string=t}getFontResourceName(){return this._fontResourceName}setFontResourceName(t){this._fontResourceName!==t&&(this._fontResourceName=t,this._renderer.updateFont())}getFontSize(){return this._fontSize}setFontSize(t){this._fontSize=t}getPlaceholder(){return this._placeholder}setPlaceholder(t){t!==this._placeholder&&(this._placeholder=t,this._renderer.updatePlaceholder())}getInputType(){return this._inputType}setInputType(t){const e=t.toLowerCase();e!==this._inputType&&(this._inputType=o(e),this._renderer.updateInputType())}setTextColor(t){this._textColor=r.rgbOrHexToRGBColor(t),this._renderer.updateTextColor()}getTextColor(){return this._textColor[0]+";"+this._textColor[1]+";"+this._textColor[2]}_getRawTextColor(){return this._textColor}setFillColor(t){this._fillColor=r.rgbOrHexToRGBColor(t),this._renderer.updateFillColorAndOpacity()}getFillColor(){return this._fillColor[0]+";"+this._fillColor[1]+";"+this._fillColor[2]}_getRawFillColor(){return this._fillColor}setFillOpacity(t){this._fillOpacity=Math.max(0,Math.min(255,t)),this._renderer.updateFillColorAndOpacity()}getFillOpacity(){return this._fillOpacity}setBorderColor(t){this._borderColor=r.rgbOrHexToRGBColor(t),this._renderer.updateBorderColorAndOpacity()}getBorderColor(){return this._borderColor[0]+";"+this._borderColor[1]+";"+this._borderColor[2]}_getRawBorderColor(){return this._borderColor}setBorderOpacity(t){this._borderOpacity=Math.max(0,Math.min(255,t)),this._renderer.updateBorderColorAndOpacity()}getBorderOpacity(){return this._borderOpacity}setBorderWidth(t){this._borderWidth=Math.max(0,t),this._renderer.updateBorderWidth()}getBorderWidth(){return this._borderWidth}setDisabled(t){this._disabled=t,this._renderer.updateDisabled()}isDisabled(){return this._disabled}setReadOnly(t){this._readOnly=t,this._renderer.updateReadOnly()}isReadOnly(){return this._readOnly}isFocused(){return this._renderer.isFocused()}focus(){this.isFocused()||this.getInstanceContainer().getGame().getInputManager().clearAllPressedKeys(),this._renderer.focus()}}r.TextInputRuntimeObject=d,r.registerObject("TextInput::TextInputObject",r.TextInputRuntimeObject)})(gdjs||(gdjs={}));
|
|
2
2
|
//# sourceMappingURL=textinputruntimeobject.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../GDevelop/Extensions/TextInput/textinputruntimeobject.ts"],
|
|
4
|
-
"sourcesContent": ["namespace gdjs {\n const supportedInputTypes = [\n 'text',\n 'email',\n 'password',\n 'number',\n 'telephone number',\n 'url',\n 'search',\n 'text area',\n ] as const;\n\n type SupportedInputType = typeof supportedInputTypes[number];\n\n const parseInputType = (potentialInputType: string): SupportedInputType => {\n const lowercasedNewInputType = potentialInputType.toLowerCase();\n\n // @ts-ignore - we're actually checking that this value is correct.\n if (supportedInputTypes.includes(lowercasedNewInputType))\n return potentialInputType as SupportedInputType;\n\n return 'text';\n };\n\n /** Base parameters for {@link gdjs.TextInputRuntimeObject} */\n export interface TextInputObjectData extends ObjectData {\n /** The base parameters of the TextInput */\n content: {\n initialValue: string;\n placeholder: string;\n fontResourceName: string;\n fontSize: float;\n inputType: SupportedInputType;\n textColor: string;\n fillColor: string;\n fillOpacity: float;\n borderColor: string;\n borderOpacity: float;\n borderWidth: float;\n disabled: boolean;\n readOnly: boolean;\n };\n }\n\n export type TextInputNetworkSyncDataType = {\n opa: float;\n wid: float;\n hei: float;\n txt: string;\n frn: string;\n fs: number;\n place: string;\n it: SupportedInputType;\n tc: string;\n fc: string;\n fo: float;\n bc: string;\n bo: float;\n bw: float;\n dis: boolean;\n ro: boolean;\n };\n\n export type TextInputNetworkSyncData = ObjectNetworkSyncData &\n TextInputNetworkSyncDataType;\n\n const DEFAULT_WIDTH = 300;\n const DEFAULT_HEIGHT = 30;\n\n /**\n * Shows a text input on the screen the player can type text into.\n */\n export class TextInputRuntimeObject\n extends gdjs.RuntimeObject\n implements gdjs.TextContainer, gdjs.Resizable, gdjs.OpacityHandler {\n private _string: string;\n private _placeholder: string;\n private opacity: float = 255;\n private _width: float = DEFAULT_WIDTH;\n private _height: float = DEFAULT_HEIGHT;\n private _fontResourceName: string;\n private _fontSize: float;\n private _inputType: SupportedInputType;\n private _textColor: [float, float, float];\n private _fillColor: [float, float, float];\n private _fillOpacity: float;\n private _borderColor: [float, float, float];\n private _borderOpacity: float;\n private _borderWidth: float;\n private _disabled: boolean;\n private _readOnly: boolean;\n\n _renderer: TextInputRuntimeObjectRenderer;\n\n constructor(\n instanceContainer: gdjs.RuntimeInstanceContainer,\n objectData: TextInputObjectData\n ) {\n super(instanceContainer, objectData);\n\n this._string = objectData.content.initialValue;\n this._placeholder = objectData.content.placeholder;\n this._fontResourceName = objectData.content.fontResourceName;\n this._fontSize = objectData.content.fontSize || 20;\n this._inputType = parseInputType(objectData.content.inputType);\n this._textColor = gdjs.rgbOrHexToRGBColor(objectData.content.textColor);\n this._fillColor = gdjs.rgbOrHexToRGBColor(objectData.content.fillColor);\n this._fillOpacity = objectData.content.fillOpacity;\n this._borderColor = gdjs.rgbOrHexToRGBColor(\n objectData.content.borderColor\n );\n this._borderOpacity = objectData.content.borderOpacity;\n this._borderWidth = objectData.content.borderWidth;\n this._disabled = objectData.content.disabled;\n this._readOnly = objectData.content.readOnly;\n\n this._renderer = new gdjs.TextInputRuntimeObjectRenderer(\n this,\n instanceContainer\n );\n\n // *ALWAYS* call `this.onCreated()` at the very end of your object constructor.\n this.onCreated();\n }\n\n getRendererObject() {\n return null;\n }\n\n updateFromObjectData(\n oldObjectData: TextInputObjectData,\n newObjectData: TextInputObjectData\n ): boolean {\n if (\n oldObjectData.content.initialValue !==\n newObjectData.content.initialValue\n ) {\n if (this._string === oldObjectData.content.initialValue) {\n this.setString(newObjectData.content.initialValue);\n }\n }\n if (\n oldObjectData.content.placeholder !== newObjectData.content.placeholder\n ) {\n this.setPlaceholder(newObjectData.content.placeholder);\n }\n if (\n oldObjectData.content.fontResourceName !==\n newObjectData.content.fontResourceName\n ) {\n this.setFontResourceName(newObjectData.content.fontResourceName);\n }\n if (oldObjectData.content.fontSize !== newObjectData.content.fontSize) {\n this.setFontSize(newObjectData.content.fontSize);\n }\n if (oldObjectData.content.inputType !== newObjectData.content.inputType) {\n this.setInputType(newObjectData.content.inputType);\n }\n if (oldObjectData.content.textColor !== newObjectData.content.textColor) {\n this.setTextColor(newObjectData.content.textColor);\n }\n if (oldObjectData.content.fillColor !== newObjectData.content.fillColor) {\n this.setFillColor(newObjectData.content.fillColor);\n }\n if (\n oldObjectData.content.fillOpacity !== newObjectData.content.fillOpacity\n ) {\n this.setFillOpacity(newObjectData.content.fillOpacity);\n }\n if (\n oldObjectData.content.borderColor !== newObjectData.content.borderColor\n ) {\n this.setBorderColor(newObjectData.content.borderColor);\n }\n if (\n oldObjectData.content.borderOpacity !==\n newObjectData.content.borderOpacity\n ) {\n this.setBorderOpacity(newObjectData.content.borderOpacity);\n }\n if (\n oldObjectData.content.borderWidth !== newObjectData.content.borderWidth\n ) {\n this.setBorderWidth(newObjectData.content.borderWidth);\n }\n if (oldObjectData.content.disabled !== newObjectData.content.disabled) {\n this.setDisabled(newObjectData.content.disabled);\n }\n if (oldObjectData.content.readOnly !== newObjectData.content.readOnly) {\n this.setReadOnly(newObjectData.content.readOnly);\n }\n return true;\n }\n\n getNetworkSyncData(): TextInputNetworkSyncData {\n return {\n ...super.getNetworkSyncData(),\n opa: this.getOpacity(),\n wid: this.getWidth(),\n hei: this.getHeight(),\n txt: this.getText(),\n frn: this.getFontResourceName(),\n fs: this.getFontSize(),\n place: this.getPlaceholder(),\n it: this.getInputType(),\n tc: this.getTextColor(),\n fc: this.getFillColor(),\n fo: this.getFillOpacity(),\n bc: this.getBorderColor(),\n bo: this.getBorderOpacity(),\n bw: this.getBorderWidth(),\n dis: this.isDisabled(),\n ro: this.isReadOnly(),\n };\n }\n\n updateFromNetworkSyncData(syncData: TextInputNetworkSyncData): void {\n super.updateFromNetworkSyncData(syncData);\n\n if (syncData.opa !== undefined) this.setOpacity(syncData.opa);\n if (syncData.wid !== undefined) this.setWidth(syncData.wid);\n if (syncData.hei !== undefined) this.setHeight(syncData.hei);\n if (syncData.txt !== undefined) this.setText(syncData.txt);\n if (syncData.frn !== undefined) this.setFontResourceName(syncData.frn);\n if (syncData.fs !== undefined) this.setFontSize(syncData.fs);\n if (syncData.place !== undefined) this.setPlaceholder(syncData.place);\n if (syncData.it !== undefined) this.setInputType(syncData.it);\n if (syncData.tc !== undefined) this.setTextColor(syncData.tc);\n if (syncData.fc !== undefined) this.setFillColor(syncData.fc);\n if (syncData.fo !== undefined) this.setFillOpacity(syncData.fo);\n if (syncData.bc !== undefined) this.setBorderColor(syncData.bc);\n if (syncData.bo !== undefined) this.setBorderOpacity(syncData.bo);\n if (syncData.bw !== undefined) this.setBorderWidth(syncData.bw);\n if (syncData.dis !== undefined) this.setDisabled(syncData.dis);\n if (syncData.ro !== undefined) this.setReadOnly(syncData.ro);\n }\n\n updatePreRender(instanceContainer: RuntimeInstanceContainer): void {\n this._renderer.updatePreRender();\n }\n\n /**\n * Initialize the extra parameters that could be set for an instance.\n */\n extraInitializationFromInitialInstance(initialInstanceData: InstanceData) {\n for (const property of initialInstanceData.stringProperties) {\n if (property.name === 'initialValue') {\n this.setString(property.value);\n } else if (property.name === 'placeholder') {\n this.setPlaceholder(property.value);\n }\n }\n if (initialInstanceData.customSize) {\n this.setWidth(initialInstanceData.width);\n this.setHeight(initialInstanceData.height);\n }\n }\n\n onScenePaused(runtimeScene: gdjs.RuntimeScene): void {\n this._renderer.onScenePaused();\n }\n\n onSceneResumed(runtimeScene: gdjs.RuntimeScene): void {\n this._renderer.onSceneResumed();\n }\n\n onDestroyed(): void {\n super.onDestroyed();\n this._renderer.onDestroy();\n }\n\n setOpacity(opacity: float): void {\n this.opacity = Math.max(0, Math.min(255, opacity));\n this._renderer.updateOpacity();\n }\n\n getOpacity(): float {\n return this.opacity;\n }\n\n setSize(width: number, height: number): void {\n this.setWidth(width);\n this.setHeight(height);\n }\n\n setWidth(width: float): void {\n this._width = width;\n }\n\n setHeight(height: float): void {\n this._height = height;\n }\n\n /**\n * Return the width of the object.\n * @return The width of the object\n */\n getWidth(): float {\n return this._width;\n }\n\n /**\n * Return the width of the object.\n * @return The height of the object\n */\n getHeight(): float {\n return this._height;\n }\n\n /**\n * Get the text entered in the text input.\n * @deprecated use `getText` instead\n */\n getString() {\n return this.getText();\n }\n\n /**\n * Replace the text inside the text input.\n * @deprecated use `setText` instead\n */\n setString(text: string) {\n this.setText(text);\n }\n\n getText() {\n return this._string;\n }\n\n setText(newString: string) {\n if (newString === this._string) return;\n\n this._string = newString;\n this._renderer.updateString();\n }\n\n /**\n * Called by the renderer when the value of the input shown on the screen\n * was changed (because the user typed something).\n * This does not propagate back the value to the renderer, which would\n * result in the cursor being sent back to the end of the text.\n *\n * Do not use this if you are not inside the renderer - use `setString` instead.\n */\n onRendererInputValueChanged(inputValue: string) {\n this._string = inputValue;\n }\n\n getFontResourceName() {\n return this._fontResourceName;\n }\n\n setFontResourceName(resourceName: string) {\n if (this._fontResourceName === resourceName) return;\n\n this._fontResourceName = resourceName;\n this._renderer.updateFont();\n }\n\n getFontSize() {\n return this._fontSize;\n }\n\n setFontSize(newSize: number) {\n this._fontSize = newSize;\n }\n\n /**\n * Get the placeholder shown when no text is entered\n */\n getPlaceholder() {\n return this._placeholder;\n }\n\n /**\n * Replace the text inside the text input.\n */\n setPlaceholder(newPlaceholder: string) {\n if (newPlaceholder === this._placeholder) return;\n\n this._placeholder = newPlaceholder;\n this._renderer.updatePlaceholder();\n }\n\n /**\n * Get the type of the input.\n */\n getInputType() {\n return this._inputType;\n }\n\n /**\n * Set the type of the input.\n */\n setInputType(newInputType: string) {\n const lowercasedNewInputType = newInputType.toLowerCase();\n if (lowercasedNewInputType === this._inputType) return;\n\n this._inputType = parseInputType(lowercasedNewInputType);\n this._renderer.updateInputType();\n }\n\n setTextColor(newColor: string) {\n this._textColor = gdjs.rgbOrHexToRGBColor(newColor);\n this._renderer.updateTextColor();\n }\n\n getTextColor(): string {\n return (\n this._textColor[0] + ';' + this._textColor[1] + ';' + this._textColor[2]\n );\n }\n\n _getRawTextColor(): [float, float, float] {\n return this._textColor;\n }\n\n setFillColor(newColor: string) {\n this._fillColor = gdjs.rgbOrHexToRGBColor(newColor);\n this._renderer.updateFillColorAndOpacity();\n }\n\n getFillColor(): string {\n return (\n this._fillColor[0] + ';' + this._fillColor[1] + ';' + this._fillColor[2]\n );\n }\n\n _getRawFillColor(): [float, float, float] {\n return this._fillColor;\n }\n\n setFillOpacity(newOpacity: float) {\n this._fillOpacity = Math.max(0, Math.min(255, newOpacity));\n this._renderer.updateFillColorAndOpacity();\n }\n\n getFillOpacity(): float {\n return this._fillOpacity;\n }\n\n setBorderColor(newColor: string) {\n this._borderColor = gdjs.rgbOrHexToRGBColor(newColor);\n this._renderer.updateBorderColorAndOpacity();\n }\n\n getBorderColor(): string {\n return (\n this._borderColor[0] +\n ';' +\n this._borderColor[1] +\n ';' +\n this._borderColor[2]\n );\n }\n\n _getRawBorderColor(): [float, float, float] {\n return this._borderColor;\n }\n\n setBorderOpacity(newOpacity: float) {\n this._borderOpacity = Math.max(0, Math.min(255, newOpacity));\n this._renderer.updateBorderColorAndOpacity();\n }\n\n getBorderOpacity(): float {\n return this._borderOpacity;\n }\n\n setBorderWidth(width: float) {\n this._borderWidth = Math.max(0, width);\n this._renderer.updateBorderWidth();\n }\n\n getBorderWidth(): float {\n return this._borderWidth;\n }\n\n setDisabled(value: boolean) {\n this._disabled = value;\n this._renderer.updateDisabled();\n }\n\n isDisabled(): boolean {\n return this._disabled;\n }\n\n setReadOnly(value: boolean) {\n this._readOnly = value;\n this._renderer.updateReadOnly();\n }\n\n isReadOnly(): boolean {\n return this._readOnly;\n }\n\n isFocused(): boolean {\n return this._renderer.isFocused();\n }\n\n focus(): void {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,UAAU,EAAS,KACpD,EAAS,MAAQ,QAAW,KAAK,QAAQ,EAAS,KAClD,EAAS,MAAQ,QAAW,KAAK,oBAAoB,EAAS,KAC9D,EAAS,KAAO,QAAW,KAAK,YAAY,EAAS,IACrD,EAAS,QAAU,QAAW,KAAK,eAAe,EAAS,OAC3D,EAAS,KAAO,QAAW,KAAK,aAAa,EAAS,IACtD,EAAS,KAAO,QAAW,KAAK,aAAa,EAAS,IACtD,EAAS,KAAO,QAAW,KAAK,aAAa,EAAS,IACtD,EAAS,KAAO,QAAW,KAAK,eAAe,EAAS,IACxD,EAAS,KAAO,QAAW,KAAK,eAAe,EAAS,IACxD,EAAS,KAAO,QAAW,KAAK,iBAAiB,EAAS,IAC1D,EAAS,KAAO,QAAW,KAAK,eAAe,EAAS,IACxD,EAAS,MAAQ,QAAW,KAAK,YAAY,EAAS,KACtD,EAAS,KAAO,QAAW,KAAK,YAAY,EAAS,IAG3D,gBAAgB,EAAmD,CACjE,KAAK,UAAU,kBAMjB,uCAAuC,EAAmC,CACxE,SAAW,KAAY,GAAoB,iBACzC,AAAI,EAAS,OAAS,eACpB,KAAK,UAAU,EAAS,OACf,EAAS,OAAS,eAC3B,KAAK,eAAe,EAAS,OAGjC,AAAI,EAAoB,YACtB,MAAK,SAAS,EAAoB,OAClC,KAAK,UAAU,EAAoB,
|
|
4
|
+
"sourcesContent": ["namespace gdjs {\n const supportedInputTypes = [\n 'text',\n 'email',\n 'password',\n 'number',\n 'telephone number',\n 'url',\n 'search',\n 'text area',\n ] as const;\n\n type SupportedInputType = typeof supportedInputTypes[number];\n\n const parseInputType = (potentialInputType: string): SupportedInputType => {\n const lowercasedNewInputType = potentialInputType.toLowerCase();\n\n // @ts-ignore - we're actually checking that this value is correct.\n if (supportedInputTypes.includes(lowercasedNewInputType))\n return potentialInputType as SupportedInputType;\n\n return 'text';\n };\n\n /** Base parameters for {@link gdjs.TextInputRuntimeObject} */\n export interface TextInputObjectData extends ObjectData {\n /** The base parameters of the TextInput */\n content: {\n initialValue: string;\n placeholder: string;\n fontResourceName: string;\n fontSize: float;\n inputType: SupportedInputType;\n textColor: string;\n fillColor: string;\n fillOpacity: float;\n borderColor: string;\n borderOpacity: float;\n borderWidth: float;\n disabled: boolean;\n readOnly: boolean;\n };\n }\n\n export type TextInputNetworkSyncDataType = {\n opa: float;\n wid: float;\n hei: float;\n txt: string;\n frn: string;\n fs: number;\n place: string;\n it: SupportedInputType;\n tc: string;\n fc: string;\n fo: float;\n bc: string;\n bo: float;\n bw: float;\n dis: boolean;\n ro: boolean;\n };\n\n export type TextInputNetworkSyncData = ObjectNetworkSyncData &\n TextInputNetworkSyncDataType;\n\n const DEFAULT_WIDTH = 300;\n const DEFAULT_HEIGHT = 30;\n\n /**\n * Shows a text input on the screen the player can type text into.\n */\n export class TextInputRuntimeObject\n extends gdjs.RuntimeObject\n implements gdjs.TextContainer, gdjs.Resizable, gdjs.OpacityHandler {\n private _string: string;\n private _placeholder: string;\n private opacity: float = 255;\n private _width: float = DEFAULT_WIDTH;\n private _height: float = DEFAULT_HEIGHT;\n private _fontResourceName: string;\n private _fontSize: float;\n private _inputType: SupportedInputType;\n private _textColor: [float, float, float];\n private _fillColor: [float, float, float];\n private _fillOpacity: float;\n private _borderColor: [float, float, float];\n private _borderOpacity: float;\n private _borderWidth: float;\n private _disabled: boolean;\n private _readOnly: boolean;\n\n _renderer: TextInputRuntimeObjectRenderer;\n\n constructor(\n instanceContainer: gdjs.RuntimeInstanceContainer,\n objectData: TextInputObjectData\n ) {\n super(instanceContainer, objectData);\n\n this._string = objectData.content.initialValue;\n this._placeholder = objectData.content.placeholder;\n this._fontResourceName = objectData.content.fontResourceName;\n this._fontSize = objectData.content.fontSize || 20;\n this._inputType = parseInputType(objectData.content.inputType);\n this._textColor = gdjs.rgbOrHexToRGBColor(objectData.content.textColor);\n this._fillColor = gdjs.rgbOrHexToRGBColor(objectData.content.fillColor);\n this._fillOpacity = objectData.content.fillOpacity;\n this._borderColor = gdjs.rgbOrHexToRGBColor(\n objectData.content.borderColor\n );\n this._borderOpacity = objectData.content.borderOpacity;\n this._borderWidth = objectData.content.borderWidth;\n this._disabled = objectData.content.disabled;\n this._readOnly = objectData.content.readOnly;\n\n this._renderer = new gdjs.TextInputRuntimeObjectRenderer(\n this,\n instanceContainer\n );\n\n // *ALWAYS* call `this.onCreated()` at the very end of your object constructor.\n this.onCreated();\n }\n\n getRendererObject() {\n return null;\n }\n\n updateFromObjectData(\n oldObjectData: TextInputObjectData,\n newObjectData: TextInputObjectData\n ): boolean {\n if (\n oldObjectData.content.initialValue !==\n newObjectData.content.initialValue\n ) {\n if (this._string === oldObjectData.content.initialValue) {\n this.setString(newObjectData.content.initialValue);\n }\n }\n if (\n oldObjectData.content.placeholder !== newObjectData.content.placeholder\n ) {\n this.setPlaceholder(newObjectData.content.placeholder);\n }\n if (\n oldObjectData.content.fontResourceName !==\n newObjectData.content.fontResourceName\n ) {\n this.setFontResourceName(newObjectData.content.fontResourceName);\n }\n if (oldObjectData.content.fontSize !== newObjectData.content.fontSize) {\n this.setFontSize(newObjectData.content.fontSize);\n }\n if (oldObjectData.content.inputType !== newObjectData.content.inputType) {\n this.setInputType(newObjectData.content.inputType);\n }\n if (oldObjectData.content.textColor !== newObjectData.content.textColor) {\n this.setTextColor(newObjectData.content.textColor);\n }\n if (oldObjectData.content.fillColor !== newObjectData.content.fillColor) {\n this.setFillColor(newObjectData.content.fillColor);\n }\n if (\n oldObjectData.content.fillOpacity !== newObjectData.content.fillOpacity\n ) {\n this.setFillOpacity(newObjectData.content.fillOpacity);\n }\n if (\n oldObjectData.content.borderColor !== newObjectData.content.borderColor\n ) {\n this.setBorderColor(newObjectData.content.borderColor);\n }\n if (\n oldObjectData.content.borderOpacity !==\n newObjectData.content.borderOpacity\n ) {\n this.setBorderOpacity(newObjectData.content.borderOpacity);\n }\n if (\n oldObjectData.content.borderWidth !== newObjectData.content.borderWidth\n ) {\n this.setBorderWidth(newObjectData.content.borderWidth);\n }\n if (oldObjectData.content.disabled !== newObjectData.content.disabled) {\n this.setDisabled(newObjectData.content.disabled);\n }\n if (oldObjectData.content.readOnly !== newObjectData.content.readOnly) {\n this.setReadOnly(newObjectData.content.readOnly);\n }\n return true;\n }\n\n getNetworkSyncData(): TextInputNetworkSyncData {\n return {\n ...super.getNetworkSyncData(),\n opa: this.getOpacity(),\n wid: this.getWidth(),\n hei: this.getHeight(),\n txt: this.getText(),\n frn: this.getFontResourceName(),\n fs: this.getFontSize(),\n place: this.getPlaceholder(),\n it: this.getInputType(),\n tc: this.getTextColor(),\n fc: this.getFillColor(),\n fo: this.getFillOpacity(),\n bc: this.getBorderColor(),\n bo: this.getBorderOpacity(),\n bw: this.getBorderWidth(),\n dis: this.isDisabled(),\n ro: this.isReadOnly(),\n };\n }\n\n updateFromNetworkSyncData(syncData: TextInputNetworkSyncData): void {\n super.updateFromNetworkSyncData(syncData);\n\n if (syncData.opa !== undefined) this.setOpacity(syncData.opa);\n if (syncData.wid !== undefined) this.setWidth(syncData.wid);\n if (syncData.hei !== undefined) this.setHeight(syncData.hei);\n if (syncData.txt !== undefined) this.setText(syncData.txt);\n if (syncData.frn !== undefined) this.setFontResourceName(syncData.frn);\n if (syncData.fs !== undefined) this.setFontSize(syncData.fs);\n if (syncData.place !== undefined) this.setPlaceholder(syncData.place);\n if (syncData.it !== undefined) this.setInputType(syncData.it);\n if (syncData.tc !== undefined) this.setTextColor(syncData.tc);\n if (syncData.fc !== undefined) this.setFillColor(syncData.fc);\n if (syncData.fo !== undefined) this.setFillOpacity(syncData.fo);\n if (syncData.bc !== undefined) this.setBorderColor(syncData.bc);\n if (syncData.bo !== undefined) this.setBorderOpacity(syncData.bo);\n if (syncData.bw !== undefined) this.setBorderWidth(syncData.bw);\n if (syncData.dis !== undefined) this.setDisabled(syncData.dis);\n if (syncData.ro !== undefined) this.setReadOnly(syncData.ro);\n }\n\n updatePreRender(instanceContainer: RuntimeInstanceContainer): void {\n this._renderer.updatePreRender();\n }\n\n /**\n * Initialize the extra parameters that could be set for an instance.\n */\n extraInitializationFromInitialInstance(initialInstanceData: InstanceData) {\n for (const property of initialInstanceData.stringProperties) {\n if (property.name === 'initialValue') {\n this.setString(property.value);\n } else if (property.name === 'placeholder') {\n this.setPlaceholder(property.value);\n }\n }\n if (initialInstanceData.customSize) {\n this.setWidth(initialInstanceData.width);\n this.setHeight(initialInstanceData.height);\n }\n if (initialInstanceData.opacity !== undefined) {\n this.setOpacity(initialInstanceData.opacity);\n }\n }\n\n onScenePaused(runtimeScene: gdjs.RuntimeScene): void {\n this._renderer.onScenePaused();\n }\n\n onSceneResumed(runtimeScene: gdjs.RuntimeScene): void {\n this._renderer.onSceneResumed();\n }\n\n onDestroyed(): void {\n super.onDestroyed();\n this._renderer.onDestroy();\n }\n\n setOpacity(opacity: float): void {\n this.opacity = Math.max(0, Math.min(255, opacity));\n this._renderer.updateOpacity();\n }\n\n getOpacity(): float {\n return this.opacity;\n }\n\n setSize(width: number, height: number): void {\n this.setWidth(width);\n this.setHeight(height);\n }\n\n setWidth(width: float): void {\n this._width = width;\n }\n\n setHeight(height: float): void {\n this._height = height;\n }\n\n /**\n * Return the width of the object.\n * @return The width of the object\n */\n getWidth(): float {\n return this._width;\n }\n\n /**\n * Return the width of the object.\n * @return The height of the object\n */\n getHeight(): float {\n return this._height;\n }\n\n /**\n * Get the text entered in the text input.\n * @deprecated use `getText` instead\n */\n getString() {\n return this.getText();\n }\n\n /**\n * Replace the text inside the text input.\n * @deprecated use `setText` instead\n */\n setString(text: string) {\n this.setText(text);\n }\n\n getText() {\n return this._string;\n }\n\n setText(newString: string) {\n if (newString === this._string) return;\n\n this._string = newString;\n this._renderer.updateString();\n }\n\n /**\n * Called by the renderer when the value of the input shown on the screen\n * was changed (because the user typed something).\n * This does not propagate back the value to the renderer, which would\n * result in the cursor being sent back to the end of the text.\n *\n * Do not use this if you are not inside the renderer - use `setString` instead.\n */\n onRendererInputValueChanged(inputValue: string) {\n this._string = inputValue;\n }\n\n getFontResourceName() {\n return this._fontResourceName;\n }\n\n setFontResourceName(resourceName: string) {\n if (this._fontResourceName === resourceName) return;\n\n this._fontResourceName = resourceName;\n this._renderer.updateFont();\n }\n\n getFontSize() {\n return this._fontSize;\n }\n\n setFontSize(newSize: number) {\n this._fontSize = newSize;\n }\n\n /**\n * Get the placeholder shown when no text is entered\n */\n getPlaceholder() {\n return this._placeholder;\n }\n\n /**\n * Replace the text inside the text input.\n */\n setPlaceholder(newPlaceholder: string) {\n if (newPlaceholder === this._placeholder) return;\n\n this._placeholder = newPlaceholder;\n this._renderer.updatePlaceholder();\n }\n\n /**\n * Get the type of the input.\n */\n getInputType() {\n return this._inputType;\n }\n\n /**\n * Set the type of the input.\n */\n setInputType(newInputType: string) {\n const lowercasedNewInputType = newInputType.toLowerCase();\n if (lowercasedNewInputType === this._inputType) return;\n\n this._inputType = parseInputType(lowercasedNewInputType);\n this._renderer.updateInputType();\n }\n\n setTextColor(newColor: string) {\n this._textColor = gdjs.rgbOrHexToRGBColor(newColor);\n this._renderer.updateTextColor();\n }\n\n getTextColor(): string {\n return (\n this._textColor[0] + ';' + this._textColor[1] + ';' + this._textColor[2]\n );\n }\n\n _getRawTextColor(): [float, float, float] {\n return this._textColor;\n }\n\n setFillColor(newColor: string) {\n this._fillColor = gdjs.rgbOrHexToRGBColor(newColor);\n this._renderer.updateFillColorAndOpacity();\n }\n\n getFillColor(): string {\n return (\n this._fillColor[0] + ';' + this._fillColor[1] + ';' + this._fillColor[2]\n );\n }\n\n _getRawFillColor(): [float, float, float] {\n return this._fillColor;\n }\n\n setFillOpacity(newOpacity: float) {\n this._fillOpacity = Math.max(0, Math.min(255, newOpacity));\n this._renderer.updateFillColorAndOpacity();\n }\n\n getFillOpacity(): float {\n return this._fillOpacity;\n }\n\n setBorderColor(newColor: string) {\n this._borderColor = gdjs.rgbOrHexToRGBColor(newColor);\n this._renderer.updateBorderColorAndOpacity();\n }\n\n getBorderColor(): string {\n return (\n this._borderColor[0] +\n ';' +\n this._borderColor[1] +\n ';' +\n this._borderColor[2]\n );\n }\n\n _getRawBorderColor(): [float, float, float] {\n return this._borderColor;\n }\n\n setBorderOpacity(newOpacity: float) {\n this._borderOpacity = Math.max(0, Math.min(255, newOpacity));\n this._renderer.updateBorderColorAndOpacity();\n }\n\n getBorderOpacity(): float {\n return this._borderOpacity;\n }\n\n setBorderWidth(width: float) {\n this._borderWidth = Math.max(0, width);\n this._renderer.updateBorderWidth();\n }\n\n getBorderWidth(): float {\n return this._borderWidth;\n }\n\n setDisabled(value: boolean) {\n this._disabled = value;\n this._renderer.updateDisabled();\n }\n\n isDisabled(): boolean {\n return this._disabled;\n }\n\n setReadOnly(value: boolean) {\n this._readOnly = value;\n this._renderer.updateReadOnly();\n }\n\n isReadOnly(): boolean {\n return this._readOnly;\n }\n\n isFocused(): boolean {\n return this._renderer.isFocused();\n }\n\n focus(): void {\n if (!this.isFocused()) {\n // If the input was not previously focused, reset input manager because there is\n // no reason to maintain its state. It avoids bugs where a key is pressed, the text\n // input is focused and then the input manager does not have access to the keyup event\n // and considers the key still pressed.\n this.getInstanceContainer()\n .getGame()\n .getInputManager()\n .clearAllPressedKeys();\n }\n this._renderer.focus();\n }\n }\n gdjs.registerObject(\n 'TextInput::TextInputObject',\n gdjs.TextInputRuntimeObject\n );\n}\n"],
|
|
5
|
+
"mappings": "AAAA,GAAU,MAAV,UAAU,EAAV,CACE,KAAM,GAAsB,CAC1B,OACA,QACA,WACA,SACA,mBACA,MACA,SACA,aAKI,EAAiB,AAAC,GAAmD,CACzE,KAAM,GAAyB,EAAmB,cAGlD,MAAI,GAAoB,SAAS,GACxB,EAEF,QA6CH,EAAgB,IAChB,EAAiB,GAKhB,eACG,GAAK,aACsD,CAoBnE,YACE,EACA,EACA,CACA,MAAM,EAAmB,GArBnB,aAAiB,IACjB,YAAgB,EAChB,aAAiB,EAqBvB,KAAK,QAAU,EAAW,QAAQ,aAClC,KAAK,aAAe,EAAW,QAAQ,YACvC,KAAK,kBAAoB,EAAW,Q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Y,EACjB,KAAK,UAAU,iBAGjB,YAAsB,CACpB,MAAO,MAAK,UAGd,YAAY,EAAgB,CAC1B,KAAK,UAAY,EACjB,KAAK,UAAU,iBAGjB,YAAsB,CACpB,MAAO,MAAK,UAGd,WAAqB,CACnB,MAAO,MAAK,UAAU,YAGxB,OAAc,CACZ,AAAK,KAAK,aAKR,KAAK,uBACF,UACA,kBACA,sBAEL,KAAK,UAAU,SA1bZ,EAAM,yBA6bb,EAAK,eACH,6BACA,EAAK,0BAvgBC",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var gdjs;(function(i){class s{constructor(e,t){this._justCreated=!0;this._object=e,this._fontManager=t.getGame().getFontManager(),this._text=new PIXI.Text(" ",{align:"left"}),this._text.anchor.x=.5,this._text.anchor.y=.5,t.getLayer("").getRenderer().addRendererObject(this._text,e.getZOrder()),this._text.text=e._str.length===0?" ":e._str,this.updateStyle(),this.updatePosition()}getRendererObject(){return this._text}ensureUpToDate(){this._justCreated&&(this._text.updateText(!1),this.updatePosition(),this._justCreated=!1)}updateStyle(){const e='"'+this._fontManager.getFontFamily(this._object._fontName)+'"',t=this._text.style;t.fontStyle=this._object._italic?"italic":"normal",t.fontWeight=this._object._bold?"bold":"normal",t.fontSize=this._object._characterSize,t.fontFamily=e,this._object._useGradient?t.fill=this._getGradientHex():t.fill=this._getColorHex(),this._object._gradientType==="LINEAR_VERTICAL"?t.fillGradientType=PIXI.TEXT_GRADIENT.LINEAR_VERTICAL:t.fillGradientType=PIXI.TEXT_GRADIENT.LINEAR_HORIZONTAL,t.align=this._object._textAlign,t.wordWrap=this._object._wrapping,t.wordWrapWidth=this._object._wrappingWidth,t.breakWords=!0,t.stroke=i.rgbToHexNumber(this._object._outlineColor[0],this._object._outlineColor[1],this._object._outlineColor[2]),t.strokeThickness=this._object._isOutlineEnabled?this._object._outlineThickness:0,t.dropShadow=this._object._shadow,t.dropShadowColor=i.rgbToHexNumber(this._object._shadowColor[0],this._object._shadowColor[1],this._object._shadowColor[2]),t.dropShadowAlpha=this._object._shadowOpacity/255,t.dropShadowBlur=this._object._shadowBlur,t.dropShadowAngle=i.toRad(this._object._shadowAngle),t.dropShadowDistance=this._object._shadowDistance;const o=t.dropShadow?t.dropShadowDistance+t.dropShadowBlur:0;t.padding=Math.ceil(this._object._padding+o),t.miterLimit=3,this.updatePosition(),this._text.dirty=!0}updatePosition(){if(this._object.isWrapping()){const
|
|
1
|
+
var gdjs;(function(i){class s{constructor(e,t){this._justCreated=!0;this._object=e,this._fontManager=t.getGame().getFontManager(),this._text=new PIXI.Text(" ",{align:"left"}),this._text.anchor.x=.5,this._text.anchor.y=.5,t.getLayer("").getRenderer().addRendererObject(this._text,e.getZOrder()),this._text.text=e._str.length===0?" ":e._str,this.updateStyle(),this.updatePosition()}getRendererObject(){return this._text}ensureUpToDate(){this._justCreated&&(this._text.updateText(!1),this.updatePosition(),this._justCreated=!1)}updateStyle(){const e='"'+this._fontManager.getFontFamily(this._object._fontName)+'"',t=this._text.style;t.fontStyle=this._object._italic?"italic":"normal",t.fontWeight=this._object._bold?"bold":"normal",t.fontSize=this._object._characterSize,t.fontFamily=e,this._object._useGradient?t.fill=this._getGradientHex():t.fill=this._getColorHex(),this._object._gradientType==="LINEAR_VERTICAL"?t.fillGradientType=PIXI.TEXT_GRADIENT.LINEAR_VERTICAL:t.fillGradientType=PIXI.TEXT_GRADIENT.LINEAR_HORIZONTAL,t.align=this._object._textAlign,t.wordWrap=this._object._wrapping,t.wordWrapWidth=this._object._wrappingWidth,t.breakWords=!0,t.stroke=i.rgbToHexNumber(this._object._outlineColor[0],this._object._outlineColor[1],this._object._outlineColor[2]),t.strokeThickness=this._object._isOutlineEnabled?this._object._outlineThickness:0,t.dropShadow=this._object._shadow,t.dropShadowColor=i.rgbToHexNumber(this._object._shadowColor[0],this._object._shadowColor[1],this._object._shadowColor[2]),t.dropShadowAlpha=this._object._shadowOpacity/255,t.dropShadowBlur=this._object._shadowBlur,t.dropShadowAngle=i.toRad(this._object._shadowAngle),t.dropShadowDistance=this._object._shadowDistance;const o=t.dropShadow?t.dropShadowDistance+t.dropShadowBlur:0;t.padding=Math.ceil(this._object._padding+o),t.miterLimit=3,this.updatePosition(),this._text.dirty=!0}updatePosition(){if(this._object.isWrapping()){const t=this._object._textAlign==="right"?1:this._object._textAlign==="center"?.5:0,o=this._object.getWrappingWidth(),h=(o-this._text.width)*(t-.5);this._text.position.x=this._object.x+o/2,this._text.anchor.x=.5-h/this._text.width}else this._text.position.x=this._object.x+this._text.width/2,this._text.anchor.x=.5;this._text.position.y=this._object.y+this._text.height/2;const e=this._object._verticalTextAlignment==="bottom"?1:this._object._verticalTextAlignment==="center"?.5:0;this._text.position.y=this._object.y+this._text.height*(.5-e),this._text.anchor.y=.5}updateAngle(){this._text.rotation=i.toRad(this._object.angle)}updateOpacity(){this._text.alpha=this._object.opacity/255}updateString(){this._text.text=this._object._str.length===0?" ":this._object._str,this._text.updateText(!1)}getWidth(){return this._text.width}getHeight(){return this._text.height}_getColorHex(){return i.rgbToHexNumber(this._object._color[0],this._object._color[1],this._object._color[2])}_getGradientHex(){const e=[];for(let t=0;t<this._object._gradient.length;t++)e.push("#"+i.rgbToHex(this._object._gradient[t][0],this._object._gradient[t][1],this._object._gradient[t][2]));return e}getScaleX(){return this._text.scale.x}getScaleY(){return this._text.scale.y}setScale(e){this._text.scale.x=e,this._text.scale.y=e}setScaleX(e){this._text.scale.x=e}setScaleY(e){this._text.scale.y=e}destroy(){this._text.destroy(!0)}}i.TextRuntimeObjectRenderer=s})(gdjs||(gdjs={}));
|
|
2
2
|
//# sourceMappingURL=textruntimeobject-pixi-renderer.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../GDevelop/Extensions/TextObject/textruntimeobject-pixi-renderer.ts"],
|
|
4
|
-
"sourcesContent": ["namespace gdjs {\n class TextRuntimeObjectPixiRenderer {\n _object: gdjs.TextRuntimeObject;\n _fontManager: any;\n _text: PIXI.Text;\n _justCreated: boolean = true;\n\n constructor(\n runtimeObject: gdjs.TextRuntimeObject,\n instanceContainer: gdjs.RuntimeInstanceContainer\n ) {\n this._object = runtimeObject;\n this._fontManager = instanceContainer.getGame().getFontManager();\n this._text = new PIXI.Text(' ', { align: 'left' });\n this._text.anchor.x = 0.5;\n this._text.anchor.y = 0.5;\n instanceContainer\n .getLayer('')\n .getRenderer()\n .addRendererObject(this._text, runtimeObject.getZOrder());\n this._text.text =\n runtimeObject._str.length === 0 ? ' ' : runtimeObject._str;\n\n //Work around a PIXI.js bug. See updateTime method.\n this.updateStyle();\n this.updatePosition();\n }\n\n getRendererObject() {\n return this._text;\n }\n\n ensureUpToDate() {\n if (this._justCreated) {\n //Work around a PIXI.js bug:\n this._text.updateText(false);\n\n //Width seems not to be correct when text is not rendered yet.\n this.updatePosition();\n this._justCreated = false;\n }\n }\n\n updateStyle(): void {\n const fontName =\n '\"' + this._fontManager.getFontFamily(this._object._fontName) + '\"';\n const style = this._text.style;\n style.fontStyle = this._object._italic ? 'italic' : 'normal';\n style.fontWeight = this._object._bold ? 'bold' : 'normal';\n style.fontSize = this._object._characterSize;\n style.fontFamily = fontName;\n if (this._object._useGradient) {\n style.fill = this._getGradientHex();\n } else {\n style.fill = this._getColorHex();\n }\n if (this._object._gradientType === 'LINEAR_VERTICAL') {\n style.fillGradientType = PIXI.TEXT_GRADIENT.LINEAR_VERTICAL;\n } else {\n style.fillGradientType = PIXI.TEXT_GRADIENT.LINEAR_HORIZONTAL;\n }\n // @ts-ignore\n style.align = this._object._textAlign;\n style.wordWrap = this._object._wrapping;\n style.wordWrapWidth = this._object._wrappingWidth;\n style.breakWords = true;\n style.stroke = gdjs.rgbToHexNumber(\n this._object._outlineColor[0],\n this._object._outlineColor[1],\n this._object._outlineColor[2]\n );\n style.strokeThickness = this._object._isOutlineEnabled\n ? this._object._outlineThickness\n : 0;\n style.dropShadow = this._object._shadow;\n style.dropShadowColor = gdjs.rgbToHexNumber(\n this._object._shadowColor[0],\n this._object._shadowColor[1],\n this._object._shadowColor[2]\n );\n style.dropShadowAlpha = this._object._shadowOpacity / 255;\n style.dropShadowBlur = this._object._shadowBlur;\n style.dropShadowAngle = gdjs.toRad(this._object._shadowAngle);\n style.dropShadowDistance = this._object._shadowDistance;\n const extraPaddingForShadow = style.dropShadow\n ? style.dropShadowDistance + style.dropShadowBlur\n : 0;\n style.padding = Math.ceil(this._object._padding + extraPaddingForShadow);\n\n // Prevent spikey outlines by adding a miter limit\n style.miterLimit = 3;\n this.updatePosition();\n\n // Manually ask the PIXI object to re-render as we changed a style property\n // see http://www.html5gamedevs.com/topic/16924-change-text-style-post-render/\n // @ts-ignore\n this._text.dirty = true;\n }\n\n updatePosition(): void {\n if (this._object.isWrapping()) {\n const alignmentX =\n this._object._textAlign === 'right'\n ? 1\n : this._object._textAlign === 'center'\n ? 0.5\n : 0;\n\n const width = this._object.getWrappingWidth();\n\n // A vector from the custom size center to the renderer center.\n const centerToCenterX = (width - this._text.width) * (alignmentX - 0.5);\n\n this._text.position.x = this._object.x + width / 2;\n this._text.anchor.x = 0.5 - centerToCenterX / this._text.width;\n } else {\n this._text.position.x = this._object.x + this._text.width / 2;\n this._text.anchor.x = 0.5;\n }\n this._text.position.y = this._object.y + this._text.height / 2;\n }\n\n updateAngle(): void {\n this._text.rotation = gdjs.toRad(this._object.angle);\n }\n\n updateOpacity(): void {\n this._text.alpha = this._object.opacity / 255;\n }\n\n updateString(): void {\n this._text.text =\n this._object._str.length === 0 ? ' ' : this._object._str;\n\n //Work around a PIXI.js bug.\n this._text.updateText(false);\n }\n\n getWidth(): float {\n return this._text.width;\n }\n\n getHeight(): float {\n return this._text.height;\n }\n\n _getColorHex() {\n return gdjs.rgbToHexNumber(\n this._object._color[0],\n this._object._color[1],\n this._object._color[2]\n );\n }\n\n _getGradientHex() {\n const gradient: Array<string> = [];\n for (\n let colorIndex = 0;\n colorIndex < this._object._gradient.length;\n colorIndex++\n ) {\n gradient.push(\n '#' +\n gdjs.rgbToHex(\n this._object._gradient[colorIndex][0],\n this._object._gradient[colorIndex][1],\n this._object._gradient[colorIndex][2]\n )\n );\n }\n return gradient;\n }\n\n /**\n * Get x-scale of the text.\n */\n getScaleX(): float {\n return this._text.scale.x;\n }\n\n /**\n * Get y-scale of the text.\n */\n getScaleY(): float {\n return this._text.scale.y;\n }\n\n /**\n * Set the text object scale.\n * @param newScale The new scale for the text object.\n */\n setScale(newScale: float): void {\n this._text.scale.x = newScale;\n this._text.scale.y = newScale;\n }\n\n /**\n * Set the text object x-scale.\n * @param newScale The new x-scale for the text object.\n */\n setScaleX(newScale: float): void {\n this._text.scale.x = newScale;\n }\n\n /**\n * Set the text object y-scale.\n * @param newScale The new y-scale for the text object.\n */\n setScaleY(newScale: float): void {\n this._text.scale.y = newScale;\n }\n\n destroy() {\n this._text.destroy(true);\n }\n }\n\n // Register the class to let the engine use it.\n export const TextRuntimeObjectRenderer = TextRuntimeObjectPixiRenderer;\n export type TextRuntimeObjectRenderer = TextRuntimeObjectPixiRenderer;\n}\n"],
|
|
5
|
-
"mappings": "AAAA,GAAU,MAAV,UAAU,EAAV,CACE,OAAoC,CAMlC,YACE,EACA,EACA,CALF,kBAAwB,GAMtB,KAAK,QAAU,EACf,KAAK,aAAe,EAAkB,UAAU,iBAChD,KAAK,MAAQ,GAAI,MAAK,KAAK,IAAK,CAAE,MAAO,SACzC,KAAK,MAAM,OAAO,EAAI,GACtB,KAAK,MAAM,OAAO,EAAI,GACtB,EACG,SAAS,IACT,cACA,kBAAkB,KAAK,MAAO,EAAc,aAC/C,KAAK,MAAM,KACT,EAAc,KAAK,SAAW,EAAI,IAAM,EAAc,KAGxD,KAAK,cACL,KAAK,iBAGP,mBAAoB,CAClB,MAAO,MAAK,MAGd,gBAAiB,CACf,AAAI,KAAK,cAEP,MAAK,MAAM,WAAW,IAGtB,KAAK,iBACL,KAAK,aAAe,IAIxB,aAAoB,C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,EACA,KAAK,QAAQ,aAAe,SAC5B,GACA,EAEA,EAAQ,KAAK,QAAQ,mBAGrB,EAAmB,GAAQ,KAAK,MAAM,OAAU,GAAa,IAEnE,KAAK,MAAM,SAAS,EAAI,KAAK,QAAQ,EAAI,EAAQ,EACjD,KAAK,MAAM,OAAO,EAAI,GAAM,EAAkB,KAAK,MAAM,UAEzD,MAAK,MAAM,SAAS,EAAI,KAAK,QAAQ,EAAI,KAAK,MAAM,MAAQ,EAC5D,KAAK,MAAM,OAAO,EAAI,GAExB,KAAK,MAAM,SAAS,EAAI,KAAK,QAAQ,EAAI,KAAK,MAAM,OAAS,
|
|
4
|
+
"sourcesContent": ["namespace gdjs {\n class TextRuntimeObjectPixiRenderer {\n _object: gdjs.TextRuntimeObject;\n _fontManager: any;\n _text: PIXI.Text;\n _justCreated: boolean = true;\n\n constructor(\n runtimeObject: gdjs.TextRuntimeObject,\n instanceContainer: gdjs.RuntimeInstanceContainer\n ) {\n this._object = runtimeObject;\n this._fontManager = instanceContainer.getGame().getFontManager();\n this._text = new PIXI.Text(' ', { align: 'left' });\n this._text.anchor.x = 0.5;\n this._text.anchor.y = 0.5;\n instanceContainer\n .getLayer('')\n .getRenderer()\n .addRendererObject(this._text, runtimeObject.getZOrder());\n this._text.text =\n runtimeObject._str.length === 0 ? ' ' : runtimeObject._str;\n\n //Work around a PIXI.js bug. See updateTime method.\n this.updateStyle();\n this.updatePosition();\n }\n\n getRendererObject() {\n return this._text;\n }\n\n ensureUpToDate() {\n if (this._justCreated) {\n //Work around a PIXI.js bug:\n this._text.updateText(false);\n\n //Width seems not to be correct when text is not rendered yet.\n this.updatePosition();\n this._justCreated = false;\n }\n }\n\n updateStyle(): void {\n const fontName =\n '\"' + this._fontManager.getFontFamily(this._object._fontName) + '\"';\n const style = this._text.style;\n style.fontStyle = this._object._italic ? 'italic' : 'normal';\n style.fontWeight = this._object._bold ? 'bold' : 'normal';\n style.fontSize = this._object._characterSize;\n style.fontFamily = fontName;\n if (this._object._useGradient) {\n style.fill = this._getGradientHex();\n } else {\n style.fill = this._getColorHex();\n }\n if (this._object._gradientType === 'LINEAR_VERTICAL') {\n style.fillGradientType = PIXI.TEXT_GRADIENT.LINEAR_VERTICAL;\n } else {\n style.fillGradientType = PIXI.TEXT_GRADIENT.LINEAR_HORIZONTAL;\n }\n // @ts-ignore\n style.align = this._object._textAlign;\n style.wordWrap = this._object._wrapping;\n style.wordWrapWidth = this._object._wrappingWidth;\n style.breakWords = true;\n style.stroke = gdjs.rgbToHexNumber(\n this._object._outlineColor[0],\n this._object._outlineColor[1],\n this._object._outlineColor[2]\n );\n style.strokeThickness = this._object._isOutlineEnabled\n ? this._object._outlineThickness\n : 0;\n style.dropShadow = this._object._shadow;\n style.dropShadowColor = gdjs.rgbToHexNumber(\n this._object._shadowColor[0],\n this._object._shadowColor[1],\n this._object._shadowColor[2]\n );\n style.dropShadowAlpha = this._object._shadowOpacity / 255;\n style.dropShadowBlur = this._object._shadowBlur;\n style.dropShadowAngle = gdjs.toRad(this._object._shadowAngle);\n style.dropShadowDistance = this._object._shadowDistance;\n const extraPaddingForShadow = style.dropShadow\n ? style.dropShadowDistance + style.dropShadowBlur\n : 0;\n style.padding = Math.ceil(this._object._padding + extraPaddingForShadow);\n\n // Prevent spikey outlines by adding a miter limit\n style.miterLimit = 3;\n this.updatePosition();\n\n // Manually ask the PIXI object to re-render as we changed a style property\n // see http://www.html5gamedevs.com/topic/16924-change-text-style-post-render/\n // @ts-ignore\n this._text.dirty = true;\n }\n\n updatePosition(): void {\n if (this._object.isWrapping()) {\n const alignmentX =\n this._object._textAlign === 'right'\n ? 1\n : this._object._textAlign === 'center'\n ? 0.5\n : 0;\n\n const width = this._object.getWrappingWidth();\n\n // A vector from the custom size center to the renderer center.\n const centerToCenterX = (width - this._text.width) * (alignmentX - 0.5);\n\n this._text.position.x = this._object.x + width / 2;\n this._text.anchor.x = 0.5 - centerToCenterX / this._text.width;\n } else {\n this._text.position.x = this._object.x + this._text.width / 2;\n this._text.anchor.x = 0.5;\n }\n this._text.position.y = this._object.y + this._text.height / 2;\n\n const alignmentY =\n this._object._verticalTextAlignment === 'bottom'\n ? 1\n : this._object._verticalTextAlignment === 'center'\n ? 0.5\n : 0;\n this._text.position.y =\n this._object.y + this._text.height * (0.5 - alignmentY);\n this._text.anchor.y = 0.5;\n }\n\n updateAngle(): void {\n this._text.rotation = gdjs.toRad(this._object.angle);\n }\n\n updateOpacity(): void {\n this._text.alpha = this._object.opacity / 255;\n }\n\n updateString(): void {\n this._text.text =\n this._object._str.length === 0 ? ' ' : this._object._str;\n\n //Work around a PIXI.js bug.\n this._text.updateText(false);\n }\n\n getWidth(): float {\n return this._text.width;\n }\n\n getHeight(): float {\n return this._text.height;\n }\n\n _getColorHex() {\n return gdjs.rgbToHexNumber(\n this._object._color[0],\n this._object._color[1],\n this._object._color[2]\n );\n }\n\n _getGradientHex() {\n const gradient: Array<string> = [];\n for (\n let colorIndex = 0;\n colorIndex < this._object._gradient.length;\n colorIndex++\n ) {\n gradient.push(\n '#' +\n gdjs.rgbToHex(\n this._object._gradient[colorIndex][0],\n this._object._gradient[colorIndex][1],\n this._object._gradient[colorIndex][2]\n )\n );\n }\n return gradient;\n }\n\n /**\n * Get x-scale of the text.\n */\n getScaleX(): float {\n return this._text.scale.x;\n }\n\n /**\n * Get y-scale of the text.\n */\n getScaleY(): float {\n return this._text.scale.y;\n }\n\n /**\n * Set the text object scale.\n * @param newScale The new scale for the text object.\n */\n setScale(newScale: float): void {\n this._text.scale.x = newScale;\n this._text.scale.y = newScale;\n }\n\n /**\n * Set the text object x-scale.\n * @param newScale The new x-scale for the text object.\n */\n setScaleX(newScale: float): void {\n this._text.scale.x = newScale;\n }\n\n /**\n * Set the text object y-scale.\n * @param newScale The new y-scale for the text object.\n */\n setScaleY(newScale: float): void {\n this._text.scale.y = newScale;\n }\n\n destroy() {\n this._text.destroy(true);\n }\n }\n\n // Register the class to let the engine use it.\n export const TextRuntimeObjectRenderer = TextRuntimeOb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KAAK,QAAQ,OAGhD,eAAsB,CACpB,KAAK,MAAM,MAAQ,KAAK,QAAQ,QAAU,IAG5C,cAAqB,CACnB,KAAK,MAAM,KACT,KAAK,QAAQ,KAAK,SAAW,EAAI,IAAM,KAAK,QAAQ,KAGtD,KAAK,MAAM,WAAW,IAGxB,UAAkB,CAChB,MAAO,MAAK,MAAM,MAGpB,WAAmB,CACjB,MAAO,MAAK,MAAM,OAGpB,cAAe,CACb,MAAO,GAAK,eACV,KAAK,QAAQ,OAAO,GACpB,KAAK,QAAQ,OAAO,GACpB,KAAK,QAAQ,OAAO,IAIxB,iBAAkB,CAChB,KAAM,GAA0B,GAChC,OACM,GAAa,EACjB,EAAa,KAAK,QAAQ,UAAU,OACpC,IAEA,EAAS,KACP,IACE,EAAK,SACH,KAAK,QAAQ,UAAU,GAAY,GACnC,KAAK,QAAQ,UAAU,GAAY,GACnC,KAAK,QAAQ,UAAU,GAAY,KAI3C,MAAO,GAMT,WAAmB,CACjB,MAAO,MAAK,MAAM,MAAM,EAM1B,WAAmB,CACjB,MAAO,MAAK,MAAM,MAAM,EAO1B,SAAS,EAAuB,CAC9B,KAAK,MAAM,MAAM,EAAI,EACrB,KAAK,MAAM,MAAM,EAAI,EAOvB,UAAU,EAAuB,CAC/B,KAAK,MAAM,MAAM,EAAI,EAOvB,UAAU,EAAuB,CAC/B,KAAK,MAAM,MAAM,EAAI,EAGvB,SAAU,CACR,KAAK,MAAM,QAAQ,KAKhB,AAAM,4BAA4B,IApOjC",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var gdjs;(function(r){class
|
|
1
|
+
var gdjs;(function(r){class d extends r.RuntimeObject{constructor(t,s){super(t,s);this._useGradient=!1;this._gradient=[];this._gradientType="";this.opacity=255;this._wrapping=!1;this._wrappingWidth=100;this._padding=5;this._scaleX=1;this._scaleY=1;const e=s.content;this._characterSize=Math.max(1,e.characterSize),this._fontName=e.font,this._bold=e.bold,this._italic=e.italic,this._underlined=e.underlined,this._color=r.rgbOrHexToRGBColor(e.color),this._str=e.text,this._textAlign=e.textAlignment||"left",this._verticalTextAlignment=e.verticalTextAlignment||"top",this._isOutlineEnabled=e.isOutlineEnabled,this._outlineThickness=e.outlineThickness,this._outlineColor=r.rgbOrHexToRGBColor(e.outlineColor),this._shadow=e.isShadowEnabled,this._shadowColor=r.rgbOrHexToRGBColor(e.shadowColor),this._shadowOpacity=e.shadowOpacity,this._shadowDistance=e.shadowDistance,this._shadowBlur=e.shadowBlurRadius,this._shadowAngle=e.shadowAngle,this._renderer=new r.TextRuntimeObjectRenderer(this,t),this.onCreated()}updateFromObjectData(t,s){const e=t.content,i=s.content;return e.characterSize!==i.characterSize&&this.setCharacterSize(i.characterSize),e.font!==i.font&&this.setFontName(i.font),e.bold!==i.bold&&this.setBold(i.bold),e.italic!==i.italic&&this.setItalic(i.italic),e.color!==i.color&&this.setColor(i.color),e.text!==i.text&&this.setText(i.text),e.underlined!==i.underlined?!1:(e.textAlignment!==i.textAlignment&&this.setTextAlignment(i.textAlignment),e.verticalTextAlignment!==i.verticalTextAlignment&&this.setVerticalTextAlignment(i.verticalTextAlignment),e.isOutlineEnabled!==i.isOutlineEnabled&&this.setOutlineEnabled(i.isOutlineEnabled),e.outlineThickness!==i.outlineThickness&&this.setOutlineThickness(i.outlineThickness),e.outlineColor!==i.outlineColor&&this.setOutlineColor(i.outlineColor),e.isShadowEnabled!==i.isShadowEnabled&&this.showShadow(i.isShadowEnabled),e.shadowColor!==i.shadowColor&&this.setShadowColor(i.shadowColor),e.shadowOpacity!==i.shadowOpacity&&this.setShadowOpacity(i.shadowOpacity),e.shadowDistance!==i.shadowDistance&&this.setShadowDistance(i.shadowDistance),e.shadowAngle!==i.shadowAngle&&this.setShadowAngle(i.shadowAngle),e.shadowBlurRadius!==i.shadowBlurRadius&&this.setShadowBlurRadius(i.shadowBlurRadius),!0)}getNetworkSyncData(){return{...super.getNetworkSyncData(),str:this._str,o:this.opacity,cs:this._characterSize,fn:this._fontName,b:this._bold,i:this._italic,u:this._underlined,c:this._color,scale:this.getScale(),ta:this._textAlign,wrap:this._wrapping,wrapw:this._wrappingWidth,oena:this._isOutlineEnabled,ot:this._outlineThickness,oc:this._outlineColor,sh:this._shadow,shc:this._shadowColor,sho:this._shadowOpacity,shd:this._shadowDistance,sha:this._shadowAngle,shb:this._shadowBlur,pad:this._padding}}updateFromNetworkSyncData(t){super.updateFromNetworkSyncData(t),t.str!==void 0&&this.setText(t.str),t.o!==void 0&&this.setOpacity(t.o),t.cs!==void 0&&this.setCharacterSize(t.cs),t.fn!==void 0&&this.setFontName(t.fn),t.b!==void 0&&this.setBold(t.b),t.i!==void 0&&this.setItalic(t.i),t.u!==void 0&&(this._underlined=t.u),t.c!==void 0&&(this._color=t.c),t.scale!==void 0&&this.setScale(t.scale),t.ta!==void 0&&this.setTextAlignment(t.ta),t.ta!==void 0&&this.setVerticalTextAlignment(t.ta),t.wrap!==void 0&&this.setWrapping(t.wrap),t.wrapw!==void 0&&this.setWrappingWidth(t.wrapw),t.oena!==void 0&&this.setOutlineEnabled(t.oena),t.ot!==void 0&&this.setOutlineThickness(t.ot),t.oc!==void 0&&(this._outlineColor=t.oc),t.sh!==void 0&&this.showShadow(t.sh),t.shc!==void 0&&(this._shadowColor=t.shc),t.sho!==void 0&&this.setShadowOpacity(t.sho),t.shd!==void 0&&this.setShadowDistance(t.shd),t.sha!==void 0&&this.setShadowAngle(t.sha),t.shb!==void 0&&this.setShadowBlurRadius(t.shb),t.pad!==void 0&&this.setPadding(t.pad)}getRendererObject(){return this._renderer.getRendererObject()}update(t){this._renderer.ensureUpToDate()}onDestroyed(){super.onDestroyed(),this._renderer.destroy()}extraInitializationFromInitialInstance(t){t.customSize?(this.setWrappingWidth(t.width),this.setWrapping(!0)):this.setWrapping(!1),t.opacity!==void 0&&this.setOpacity(t.opacity)}_updateTextPosition(){this.invalidateHitboxes(),this._renderer.updatePosition()}setX(t){super.setX(t),this._updateTextPosition()}setY(t){super.setY(t),this._updateTextPosition()}setAngle(t){super.setAngle(t),this._renderer.updateAngle()}setOpacity(t){t<0&&(t=0),t>255&&(t=255),this.opacity=t,this._renderer.updateOpacity()}getOpacity(){return this.opacity}getString(){return this.getText()}setString(t){this.setText(t)}getText(){return this._str}setText(t){t!==this._str&&(this._str=t,this._renderer.updateString(),this._updateTextPosition())}getCharacterSize(){return this._characterSize}setCharacterSize(t){t<=1&&(t=1),this._characterSize=t,this._renderer.updateStyle()}setFontName(t){this._fontName=t,this._renderer.updateStyle()}isBold(){return this._bold}setBold(t){this._bold=t,this._renderer.updateStyle()}isItalic(){return this._italic}setItalic(t){this._italic=t,this._renderer.updateStyle()}getWidth(){return this._wrapping?this._wrappingWidth:this._renderer.getWidth()}getHeight(){return this._renderer.getHeight()}getScaleMean(){return(Math.abs(this._scaleX)+Math.abs(this._scaleY))/2}getScale(){const t=Math.abs(this._scaleX),s=Math.abs(this._scaleY);return t===s?t:Math.sqrt(t*s)}getScaleX(){return this._scaleX}getScaleY(){return this._scaleY}setScale(t){this._scaleX===t&&this._scaleY===t||(this._scaleX=t,this._scaleY=t,this._renderer.setScale(t),this.invalidateHitboxes())}setScaleX(t){this._scaleX!==t&&(this._scaleX=t,this._renderer.setScaleX(t),this.invalidateHitboxes())}setScaleY(t){this._scaleY!==t&&(this._scaleY=t,this._renderer.setScaleY(t),this.invalidateHitboxes())}setColor(t){const s=t.split(";");s.length<3||(this._color[0]=parseInt(s[0],10),this._color[1]=parseInt(s[1],10),this._color[2]=parseInt(s[2],10),this._useGradient=!1,this._renderer.updateStyle())}getColor(){return this._color[0]+";"+this._color[1]+";"+this._color[2]}setVerticalTextAlignment(t){this._verticalTextAlignment=t,this._renderer.updateStyle()}getVerticalTextAlignment(){return this._verticalTextAlignment}setTextAlignment(t){this._textAlign=t,this._renderer.updateStyle()}getTextAlignment(){return this._textAlign}isWrapping(){return this._wrapping}setWrapping(t){this._wrapping!==t&&(this._wrapping=t,this._renderer.updateStyle(),this.invalidateHitboxes())}getWrappingWidth(){return this._wrappingWidth}setWrappingWidth(t){t<=1&&(t=1),this._wrappingWidth!==t&&(this._wrappingWidth=t,this._wrapping&&(this._renderer.updateStyle(),this.invalidateHitboxes()))}setWidth(t){this.setWrappingWidth(t)}getDrawableY(){return this.getY()-(this._verticalTextAlignment==="center"?this.getHeight()/2:this._verticalTextAlignment==="bottom"?this.getHeight():0)}setOutline(t,s){const e=t.split(";");e.length<3||(this._outlineColor[0]=parseInt(e[0],10),this._outlineColor[1]=parseInt(e[1],10),this._outlineColor[2]=parseInt(e[2],10),this._outlineThickness=s,this._renderer.updateStyle())}isOutlineEnabled(){return this._isOutlineEnabled}setOutlineEnabled(t){this._isOutlineEnabled=t,this._renderer.updateStyle()}getOutlineThickness(){return this._outlineThickness}setOutlineThickness(t){this._outlineThickness=t,this._renderer.updateStyle()}setOutlineColor(t){this._outlineColor=r.rgbOrHexToRGBColor(t),this._renderer.updateStyle()}setShadow(t,s,e,i){const n=t.split(";");n.length<3||(this._shadowColor[0]=parseInt(n[0],10),this._shadowColor[1]=parseInt(n[1],10),this._shadowColor[2]=parseInt(n[2],10),this._shadowDistance=s,this._shadowBlur=e,this._shadowAngle=i,this._shadow=!0,this._renderer.updateStyle())}isShadowEnabled(){return this._shadow}showShadow(t){this._shadow=t,this._renderer.updateStyle()}getShadowOpacity(){return this._shadowOpacity}setShadowOpacity(t){this._shadowOpacity=t,this._renderer.updateStyle()}getShadowDistance(){return this._shadowDistance}setShadowDistance(t){this._shadowDistance=t,this._renderer.updateStyle()}getShadowAngle(){return this._shadowAngle}setShadowAngle(t){this._shadowAngle=t,this._renderer.updateStyle()}getShadowBlurRadius(){return this._shadowBlur}setShadowBlurRadius(t){this._shadowBlur=t,this._renderer.updateStyle()}setShadowColor(t){this._shadowColor=r.rgbOrHexToRGBColor(t),this._renderer.updateStyle()}setGradient(t,s,e,i,n){const o=s.split(";"),a=e.split(";"),h=i.split(";"),l=n.split(";");this._gradient=[],o.length==3&&this._gradient.push([parseInt(o[0],10),parseInt(o[1],10),parseInt(o[2],10)]),a.length==3&&this._gradient.push([parseInt(a[0],10),parseInt(a[1],10),parseInt(a[2],10)]),h.length==3&&this._gradient.push([parseInt(h[0],10),parseInt(h[1],10),parseInt(h[2],10)]),l.length==3&&this._gradient.push([parseInt(l[0],10),parseInt(l[1],10),parseInt(l[2],10)]),this._gradientType=t,this._useGradient=this._gradient.length>1,this._renderer.updateStyle()}getPadding(){return this._padding}setPadding(t){this._padding=t,this._renderer.updateStyle()}}r.TextRuntimeObject=d,r.registerObject("TextObject::Text",r.TextRuntimeObject)})(gdjs||(gdjs={}));
|
|
2
2
|
//# sourceMappingURL=textruntimeobject.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../GDevelop/Extensions/TextObject/textruntimeobject.ts"],
|
|
4
|
-
"sourcesContent": ["/*\n * GDevelop JS Platform\n * 2013-2016 Florian Rival (Florian.Rival@gmail.com)\n */\nnamespace gdjs {\n /** Base parameters for gdjs.TextRuntimeObject */\n export type TextObjectDataType = {\n content: {\n /** The size of the characters */\n characterSize: number;\n /** The font name */\n font: string;\n /** Is Bold? */\n bold: boolean;\n /** Is Italic? */\n italic: boolean;\n /** Is Underlined? */\n underlined: boolean;\n /** The text color in an RGB representation */\n color: string;\n /** The text of the object */\n text: string;\n textAlignment: string;\n\n isOutlineEnabled: boolean;\n outlineThickness: float;\n /** The outline color in an RGB representation */\n outlineColor: string;\n isShadowEnabled: boolean;\n /** The shadow color in an RGB representation */\n shadowColor: string;\n shadowOpacity: float;\n shadowDistance: float;\n shadowAngle: float;\n shadowBlurRadius: float;\n };\n };\n\n export type TextObjectData = ObjectData & TextObjectDataType;\n\n export type TextObjectNetworkSyncDataType = {\n str: string;\n o: float;\n cs: number;\n fn: string;\n b: boolean;\n i: boolean;\n u: boolean;\n c: number[];\n scale: number;\n ta: string;\n wrap: boolean;\n wrapw: float;\n oena: boolean;\n ot: float;\n oc: number[];\n sh: boolean;\n shc: number[];\n sho: float;\n shd: float;\n sha: float;\n shb: float;\n pad: integer;\n };\n\n export type TextObjectNetworkSyncData = ObjectNetworkSyncData &\n TextObjectNetworkSyncDataType;\n\n /**\n * Displays a text.\n */\n export class TextRuntimeObject\n extends gdjs.RuntimeObject\n implements gdjs.TextContainer, gdjs.OpacityHandler {\n _characterSize: number;\n _fontName: string;\n _bold: boolean;\n _italic: boolean;\n _underlined: boolean;\n _color: integer[];\n _useGradient: boolean = false;\n _gradient: Array<Array<integer>> = [];\n _gradientType: string = '';\n opacity: float = 255;\n _textAlign: string = 'left';\n _wrapping: boolean = false;\n // A wrapping of 1 makes games crash on Firefox\n _wrappingWidth: float = 100;\n\n _isOutlineEnabled: boolean;\n _outlineThickness: float;\n _outlineColor: integer[];\n\n _shadow: boolean;\n _shadowColor: integer[];\n _shadowOpacity: float;\n _shadowDistance: float;\n _shadowAngle: float;\n _shadowBlur: float;\n\n _padding: integer = 5;\n _str: string;\n _renderer: gdjs.TextRuntimeObjectRenderer;\n\n // We can store the scale as nothing else can change it.\n _scaleX: number = 1;\n _scaleY: number = 1;\n\n /**\n * @param instanceContainer The container the object belongs to.\n * @param textObjectData The initial properties of the object\n */\n constructor(\n instanceContainer: gdjs.RuntimeInstanceContainer,\n textObjectData: TextObjectData\n ) {\n super(instanceContainer, textObjectData);\n const content = textObjectData.content;\n this._characterSize = Math.max(1, content.characterSize);\n this._fontName = content.font;\n this._bold = content.bold;\n this._italic = content.italic;\n this._underlined = content.underlined;\n this._color = gdjs.rgbOrHexToRGBColor(content.color);\n this._str = content.text;\n this._textAlign = content.textAlignment;\n\n this._isOutlineEnabled = content.isOutlineEnabled;\n this._outlineThickness = content.outlineThickness;\n this._outlineColor = gdjs.rgbOrHexToRGBColor(content.outlineColor);\n\n this._shadow = content.isShadowEnabled;\n this._shadowColor = gdjs.rgbOrHexToRGBColor(content.shadowColor);\n this._shadowOpacity = content.shadowOpacity;\n this._shadowDistance = content.shadowDistance;\n this._shadowBlur = content.shadowBlurRadius;\n this._shadowAngle = content.shadowAngle;\n\n this._renderer = new gdjs.TextRuntimeObjectRenderer(\n this,\n instanceContainer\n );\n\n // *ALWAYS* call `this.onCreated()` at the very end of your object constructor.\n this.onCreated();\n }\n\n updateFromObjectData(\n oldObjectData: TextObjectData,\n newObjectData: TextObjectData\n ): boolean {\n const oldContent = oldObjectData.content;\n const newContent = newObjectData.content;\n if (oldContent.characterSize !== newContent.characterSize) {\n this.setCharacterSize(newContent.characterSize);\n }\n if (oldContent.font !== newContent.font) {\n this.setFontName(newContent.font);\n }\n if (oldContent.bold !== newContent.bold) {\n this.setBold(newContent.bold);\n }\n if (oldContent.italic !== newContent.italic) {\n this.setItalic(newContent.italic);\n }\n if (oldContent.color !== newContent.color) {\n this.setColor(newContent.color);\n }\n if (oldContent.text !== newContent.text) {\n this.setText(newContent.text);\n }\n if (oldContent.underlined !== newContent.underlined) {\n return false;\n }\n if (oldContent.textAlignment !== newContent.textAlignment) {\n this.setTextAlignment(newContent.textAlignment);\n }\n if (oldContent.isOutlineEnabled !== newContent.isOutlineEnabled) {\n this.setOutlineEnabled(newContent.isOutlineEnabled);\n }\n if (oldContent.outlineThickness !== newContent.outlineThickness) {\n this.setOutlineThickness(newContent.outlineThickness);\n }\n if (oldContent.outlineColor !== newContent.outlineColor) {\n this.setOutlineColor(newContent.outlineColor);\n }\n if (oldContent.isShadowEnabled !== newContent.isShadowEnabled) {\n this.showShadow(newContent.isShadowEnabled);\n }\n if (oldContent.shadowColor !== newContent.shadowColor) {\n this.setShadowColor(newContent.shadowColor);\n }\n if (oldContent.shadowOpacity !== newContent.shadowOpacity) {\n this.setShadowOpacity(newContent.shadowOpacity);\n }\n if (oldContent.shadowDistance !== newContent.shadowDistance) {\n this.setShadowDistance(newContent.shadowDistance);\n }\n if (oldContent.shadowAngle !== newContent.shadowAngle) {\n this.setShadowAngle(newContent.shadowAngle);\n }\n if (oldContent.shadowBlurRadius !== newContent.shadowBlurRadius) {\n this.setShadowBlurRadius(newContent.shadowBlurRadius);\n }\n return true;\n }\n\n getNetworkSyncData(): TextObjectNetworkSyncData {\n return {\n ...super.getNetworkSyncData(),\n str: this._str,\n o: this.opacity,\n cs: this._characterSize,\n fn: this._fontName,\n b: this._bold,\n i: this._italic,\n u: this._underlined,\n c: this._color,\n scale: this.getScale(),\n ta: this._textAlign,\n wrap: this._wrapping,\n wrapw: this._wrappingWidth,\n oena: this._isOutlineEnabled,\n ot: this._outlineThickness,\n oc: this._outlineColor,\n sh: this._shadow,\n shc: this._shadowColor,\n sho: this._shadowOpacity,\n shd: this._shadowDistance,\n sha: this._shadowAngle,\n shb: this._shadowBlur,\n pad: this._padding,\n };\n }\n\n updateFromNetworkSyncData(\n networkSyncData: TextObjectNetworkSyncData\n ): void {\n super.updateFromNetworkSyncData(networkSyncData);\n if (networkSyncData.str !== undefined) {\n this.setText(networkSyncData.str);\n }\n if (networkSyncData.o !== undefined) {\n this.setOpacity(networkSyncData.o);\n }\n if (networkSyncData.cs !== undefined) {\n this.setCharacterSize(networkSyncData.cs);\n }\n if (networkSyncData.fn !== undefined) {\n this.setFontName(networkSyncData.fn);\n }\n if (networkSyncData.b !== undefined) {\n this.setBold(networkSyncData.b);\n }\n if (networkSyncData.i !== undefined) {\n this.setItalic(networkSyncData.i);\n }\n if (networkSyncData.u !== undefined) {\n this._underlined = networkSyncData.u;\n }\n if (networkSyncData.c !== undefined) {\n this._color = networkSyncData.c;\n }\n if (networkSyncData.scale !== undefined) {\n this.setScale(networkSyncData.scale);\n }\n if (networkSyncData.ta !== undefined) {\n this.setTextAlignment(networkSyncData.ta);\n }\n if (networkSyncData.wrap !== undefined) {\n this.setWrapping(networkSyncData.wrap);\n }\n if (networkSyncData.wrapw !== undefined) {\n this.setWrappingWidth(networkSyncData.wrapw);\n }\n if (networkSyncData.oena !== undefined) {\n this.setOutlineEnabled(networkSyncData.oena);\n }\n if (networkSyncData.ot !== undefined) {\n this.setOutlineThickness(networkSyncData.ot);\n }\n if (networkSyncData.oc !== undefined) {\n this._outlineColor = networkSyncData.oc;\n }\n if (networkSyncData.sh !== undefined) {\n this.showShadow(networkSyncData.sh);\n }\n if (networkSyncData.shc !== undefined) {\n this._shadowColor = networkSyncData.shc;\n }\n if (networkSyncData.sho !== undefined) {\n this.setShadowOpacity(networkSyncData.sho);\n }\n if (networkSyncData.shd !== undefined) {\n this.setShadowDistance(networkSyncData.shd);\n }\n if (networkSyncData.sha !== undefined) {\n this.setShadowAngle(networkSyncData.sha);\n }\n if (networkSyncData.shb !== undefined) {\n this.setShadowBlurRadius(networkSyncData.shb);\n }\n if (networkSyncData.pad !== undefined) {\n this.setPadding(networkSyncData.pad);\n }\n }\n\n getRendererObject() {\n return this._renderer.getRendererObject();\n }\n\n update(instanceContainer: gdjs.RuntimeInstanceContainer): void {\n this._renderer.ensureUpToDate();\n }\n\n onDestroyed(): void {\n super.onDestroyed();\n this._renderer.destroy();\n }\n\n /**\n * Initialize the extra parameters that could be set for an instance.\n */\n extraInitializationFromInitialInstance(initialInstanceData: InstanceData) {\n if (initialInstanceData.customSize) {\n this.setWrappingWidth(initialInstanceData.width);\n this.setWrapping(true);\n } else {\n this.setWrapping(false);\n }\n }\n\n /**\n * Update the rendered object position.\n */\n private _updateTextPosition() {\n this.invalidateHitboxes();\n this._renderer.updatePosition();\n }\n\n /**\n * Set object position on X axis.\n */\n setX(x: float): void {\n super.setX(x);\n this._updateTextPosition();\n }\n\n /**\n * Set object position on Y axis.\n */\n setY(y: float): void {\n super.setY(y);\n this._updateTextPosition();\n }\n\n /**\n * Set the angle of the object.\n * @param angle The new angle of the object\n */\n setAngle(angle: float): void {\n super.setAngle(angle);\n this._renderer.updateAngle();\n }\n\n /**\n * Set object opacity.\n */\n setOpacity(opacity: float): void {\n if (opacity < 0) {\n opacity = 0;\n }\n if (opacity > 255) {\n opacity = 255;\n }\n this.opacity = opacity;\n this._renderer.updateOpacity();\n }\n\n /**\n * Get object opacity.\n */\n getOpacity() {\n return this.opacity;\n }\n\n /**\n * Get the string displayed by the object.\n * @deprecated use `getText` instead\n */\n getString(): string {\n return this.getText();\n }\n\n /**\n * Set the string displayed by the object.\n * @param text The new text\n * @deprecated use `setText` instead\n */\n setString(text: string): void {\n this.setText(text);\n }\n\n /**\n * Get the string displayed by the object.\n */\n getText(): string {\n return this._str;\n }\n\n /**\n * Set the string displayed by the object.\n * @param text The new text\n */\n setText(text: string): void {\n if (text === this._str) {\n return;\n }\n this._str = text;\n this._renderer.updateString();\n this._updateTextPosition();\n }\n\n /**\n * Get the font size of the characters of the object.\n */\n getCharacterSize(): number {\n return this._characterSize;\n }\n\n /**\n * Set the font size for characters of the object.\n * @param newSize The new font size for the text.\n */\n setCharacterSize(newSize: number): void {\n if (newSize <= 1) {\n newSize = 1;\n }\n this._characterSize = newSize;\n this._renderer.updateStyle();\n }\n\n /**\n * Set the name of the resource to use for the font.\n * @param fontResourceName The name of the font resource.\n */\n setFontName(fontResourceName: string): void {\n this._fontName = fontResourceName;\n this._renderer.updateStyle();\n }\n\n /**\n * Return true if the text is bold.\n */\n isBold(): boolean {\n return this._bold;\n }\n\n /**\n * Set bold for the object text.\n * @param enable {boolean} true to have a bold text, false otherwise.\n */\n setBold(enable: boolean): void {\n this._bold = enable;\n this._renderer.updateStyle();\n }\n\n /**\n * Return true if the text is italic.\n */\n isItalic(): boolean {\n return this._italic;\n }\n\n /**\n * Set italic for the object text.\n * @param enable {boolean} true to have an italic text, false otherwise.\n */\n setItalic(enable: boolean): void {\n this._italic = enable;\n this._renderer.updateStyle();\n }\n\n /**\n * Get width of the text.\n */\n getWidth(): float {\n return this._wrapping ? this._wrappingWidth : this._renderer.getWidth();\n }\n\n /**\n * Get height of the text.\n */\n getHeight(): float {\n return this._renderer.getHeight();\n }\n\n /**\n * Get the scale of the object (or the arithmetic mean of the X and Y scale in case they are different).\n *\n * @return the scale of the object (or the arithmetic mean of the X and Y scale in case they are different).\n * @deprecated Use `getScale` instead.\n */\n getScaleMean(): float {\n return (Math.abs(this._scaleX) + Math.abs(this._scaleY)) / 2.0;\n }\n\n /**\n * Get the scale of the object (or the geometric mean of the X and Y scale in case they are different).\n *\n * @return the scale of the object (or the geometric mean of the X and Y scale in case they are different).\n */\n getScale(): float {\n const scaleX = Math.abs(this._scaleX);\n const scaleY = Math.abs(this._scaleY);\n return scaleX === scaleY ? scaleX : Math.sqrt(scaleX * scaleY);\n }\n\n /**\n * Get x-scale of the text.\n */\n getScaleX(): float {\n return this._scaleX;\n }\n\n /**\n * Get y-scale of the text.\n */\n getScaleY(): float {\n return this._scaleY;\n }\n\n /**\n * Set the text object scale.\n * @param newScale The new scale for the text object.\n */\n setScale(newScale: float): void {\n if (this._scaleX === newScale && this._scaleY === newScale) return;\n\n this._scaleX = newScale;\n this._scaleY = newScale;\n this._renderer.setScale(newScale);\n this.invalidateHitboxes();\n }\n\n /**\n * Set the text object x-scale.\n * @param newScale The new x-scale for the text object.\n */\n setScaleX(newScale: float): void {\n if (this._scaleX === newScale) return;\n\n this._scaleX = newScale;\n this._renderer.setScaleX(newScale);\n this.invalidateHitboxes();\n }\n\n /**\n * Set the text object y-scale.\n * @param newScale The new y-scale for the text object.\n */\n setScaleY(newScale: float): void {\n if (this._scaleY === newScale) return;\n\n this._scaleY = newScale;\n this._renderer.setScaleY(newScale);\n this.invalidateHitboxes();\n }\n\n /**\n * Change the text color.\n * @param color color as a \"R;G;B\" string, for example: \"255;0;0\"\n */\n setColor(str: string): void {\n const color = str.split(';');\n if (color.length < 3) {\n return;\n }\n this._color[0] = parseInt(color[0], 10);\n this._color[1] = parseInt(color[1], 10);\n this._color[2] = parseInt(color[2], 10);\n this._useGradient = false;\n this._renderer.updateStyle();\n }\n\n /**\n * Get the text color.\n * @return The color as a \"R;G;B\" string, for example: \"255;0;0\"\n */\n getColor(): string {\n return this._color[0] + ';' + this._color[1] + ';' + this._color[2];\n }\n\n /**\n * Set the text alignment for multiline text objects.\n * @param alignment The text alignment.\n */\n setTextAlignment(alignment: string): void {\n this._textAlign = alignment;\n this._renderer.updateStyle();\n }\n\n /**\n * Get the text alignment of text object.\n * @return The text alignment.\n */\n getTextAlignment(): string {\n return this._textAlign;\n }\n\n /**\n * Return true if word wrapping is enabled for the text.\n */\n isWrapping(): boolean {\n return this._wrapping;\n }\n\n /**\n * Set word wrapping for the object text.\n * @param enable true to enable word wrapping, false to disable it.\n */\n setWrapping(enable: boolean): void {\n if (this._wrapping === enable) return;\n\n this._wrapping = enable;\n this._renderer.updateStyle();\n this.invalidateHitboxes();\n }\n\n /**\n * Get the word wrapping width for the text object.\n */\n getWrappingWidth(): float {\n return this._wrappingWidth;\n }\n\n /**\n * Set the word wrapping width for the text object.\n * @param width The new width to set.\n */\n setWrappingWidth(width: float): void {\n if (width <= 1) {\n width = 1;\n }\n if (this._wrappingWidth === width) {\n return;\n }\n this._wrappingWidth = width;\n\n if (this._wrapping) {\n this._renderer.updateStyle();\n this.invalidateHitboxes();\n }\n }\n\n /**\n * Set the outline for the text object.\n * @param str color as a \"R;G;B\" string, for example: \"255;0;0\"\n * @param thickness thickness of the outline (0 = disabled)\n * @deprecated Prefer independent setters.\n */\n setOutline(str: string, thickness: number): void {\n const color = str.split(';');\n if (color.length < 3) {\n return;\n }\n this._outlineColor[0] = parseInt(color[0], 10);\n this._outlineColor[1] = parseInt(color[1], 10);\n this._outlineColor[2] = parseInt(color[2], 10);\n this._outlineThickness = thickness;\n this._renderer.updateStyle();\n }\n\n isOutlineEnabled(): boolean {\n return this._isOutlineEnabled;\n }\n\n setOutlineEnabled(enable: boolean): void {\n this._isOutlineEnabled = enable;\n this._renderer.updateStyle();\n }\n\n /**\n * Get the outline thickness of the text object.\n * @return the outline thickness\n */\n getOutlineThickness(): number {\n return this._outlineThickness;\n }\n\n /**\n * Set the outline thickness of the text object.\n * @param value the outline thickness\n */\n setOutlineThickness(value: float): void {\n this._outlineThickness = value;\n this._renderer.updateStyle();\n }\n\n /**\n * Set the shadow color of the text object.\n * @param color the shadow color as a \"R;G;B\" string, for example: \"255;0;0\"\n */\n setOutlineColor(color: string): void {\n this._outlineColor = gdjs.rgbOrHexToRGBColor(color);\n this._renderer.updateStyle();\n }\n\n /**\n * Set the shadow for the text object.\n * @param str color as a \"R;G;B\" string, for example: \"255;0;0\"\n * @param distance distance between the shadow and the text, in pixels.\n * @param blur amount of shadow blur, in pixels.\n * @param angle shadow offset direction, in degrees.\n * @deprecated Prefer independent setters.\n */\n setShadow(\n str: string,\n distance: number,\n blur: integer,\n angle: float\n ): void {\n const color = str.split(';');\n if (color.length < 3) {\n return;\n }\n this._shadowColor[0] = parseInt(color[0], 10);\n this._shadowColor[1] = parseInt(color[1], 10);\n this._shadowColor[2] = parseInt(color[2], 10);\n this._shadowDistance = distance;\n this._shadowBlur = blur;\n this._shadowAngle = angle;\n this._shadow = true;\n this._renderer.updateStyle();\n }\n\n isShadowEnabled(): boolean {\n return this._shadow;\n }\n\n /**\n * Show the shadow of the text object.\n * @param enable true to show the shadow, false to hide it\n */\n showShadow(enable: boolean): void {\n this._shadow = enable;\n this._renderer.updateStyle();\n }\n\n /**\n * Get the shadow opacity of the text object.\n * @return the opacity (0 - 255)\n */\n getShadowOpacity(): number {\n return this._shadowOpacity;\n }\n\n /**\n * Set the shadow opacity of the text object.\n * @param value the opacity (0 - 255)\n */\n setShadowOpacity(value: float): void {\n this._shadowOpacity = value;\n this._renderer.updateStyle();\n }\n\n /**\n * Get the shadow offset distance of the text object.\n * @return the shadow offset distance\n */\n getShadowDistance(): number {\n return this._shadowDistance;\n }\n\n /**\n * Set the shadow offset distance of the text object.\n * @param value the shadow offset distance\n */\n setShadowDistance(value: float): void {\n this._shadowDistance = value;\n this._renderer.updateStyle();\n }\n\n /**\n * Get the shadow offset angle of the text object.\n * @return the shadow offset angle in degrees\n */\n getShadowAngle(): number {\n return this._shadowAngle;\n }\n\n /**\n * Set the shadow offset angle of the text object.\n * @param value the shadow offset angle in degrees\n */\n setShadowAngle(value: float): void {\n this._shadowAngle = value;\n this._renderer.updateStyle();\n }\n\n /**\n * Get the shadow blur radius of the text object.\n * @return the shadow blur radius\n */\n getShadowBlurRadius(): number {\n return this._shadowBlur;\n }\n\n /**\n * Set the shadow blur radius of the text object.\n * @param value the shadow blur radius\n */\n setShadowBlurRadius(value: float): void {\n this._shadowBlur = value;\n this._renderer.updateStyle();\n }\n\n /**\n * Set the shadow color of the text object.\n * @param color the shadow color as a \"R;G;B\" string, for example: \"255;0;0\"\n */\n setShadowColor(color: string): void {\n this._shadowColor = gdjs.rgbOrHexToRGBColor(color);\n this._renderer.updateStyle();\n }\n\n /**\n * Set the gradient for the text object.\n * @param strFirstColor color as a \"R;G;B\" string, for example: \"255;0;0\"\n * @param strSecondColor color as a \"R;G;B\" string, for example: \"255;0;0\"\n * @param strThirdColor color as a \"R;G;B\" string, for example: \"255;0;0\"\n * @param strFourthColor color as a \"R;G;B\" string, for example: \"255;0;0\"\n * @param strGradientType gradient type\n */\n setGradient(\n strGradientType: string,\n strFirstColor: string,\n strSecondColor: string,\n strThirdColor: string,\n strFourthColor: string\n ): void {\n const colorFirst = strFirstColor.split(';');\n const colorSecond = strSecondColor.split(';');\n const colorThird = strThirdColor.split(';');\n const colorFourth = strFourthColor.split(';');\n this._gradient = [];\n if (colorFirst.length == 3) {\n this._gradient.push([\n parseInt(colorFirst[0], 10),\n parseInt(colorFirst[1], 10),\n parseInt(colorFirst[2], 10),\n ]);\n }\n if (colorSecond.length == 3) {\n this._gradient.push([\n parseInt(colorSecond[0], 10),\n parseInt(colorSecond[1], 10),\n parseInt(colorSecond[2], 10),\n ]);\n }\n if (colorThird.length == 3) {\n this._gradient.push([\n parseInt(colorThird[0], 10),\n parseInt(colorThird[1], 10),\n parseInt(colorThird[2], 10),\n ]);\n }\n if (colorFourth.length == 3) {\n this._gradient.push([\n parseInt(colorFourth[0], 10),\n parseInt(colorFourth[1], 10),\n parseInt(colorFourth[2], 10),\n ]);\n }\n this._gradientType = strGradientType;\n this._useGradient = this._gradient.length > 1 ? true : false;\n this._renderer.updateStyle();\n }\n\n /**\n * Get padding of the text object.\n * @return number of pixels around the text before it gets cropped\n */\n getPadding(): number {\n return this._padding;\n }\n\n /**\n * Set padding of the text object.\n * @param value number of pixels around the text before it gets cropped\n */\n setPadding(value: float): void {\n this._padding = value;\n this._renderer.updateStyle();\n }\n }\n gdjs.registerObject('TextObject::Text', gdjs.TextRuntimeObject);\n}\n"],
|
|
5
|
-
"mappings": "AAIA,GAAU,MAAV,UAAU,EAAV,
|
|
4
|
+
"sourcesContent": ["/*\n * GDevelop JS Platform\n * 2013-2016 Florian Rival (Florian.Rival@gmail.com)\n */\nnamespace gdjs {\n /** Base parameters for gdjs.TextRuntimeObject */\n export type TextObjectDataType = {\n content: {\n /** The size of the characters */\n characterSize: number;\n /** The font name */\n font: string;\n /** Is Bold? */\n bold: boolean;\n /** Is Italic? */\n italic: boolean;\n /** Is Underlined? */\n underlined: boolean;\n /** The text color in an RGB representation */\n color: string;\n /** The text of the object */\n text: string;\n textAlignment: string;\n verticalTextAlignment: string;\n\n isOutlineEnabled: boolean;\n outlineThickness: float;\n /** The outline color in an RGB representation */\n outlineColor: string;\n isShadowEnabled: boolean;\n /** The shadow color in an RGB representation */\n shadowColor: string;\n shadowOpacity: float;\n shadowDistance: float;\n shadowAngle: float;\n shadowBlurRadius: float;\n };\n };\n\n export type TextObjectData = ObjectData & TextObjectDataType;\n\n export type TextObjectNetworkSyncDataType = {\n str: string;\n o: float;\n cs: number;\n fn: string;\n b: boolean;\n i: boolean;\n u: boolean;\n c: number[];\n scale: number;\n ta: string;\n wrap: boolean;\n wrapw: float;\n oena: boolean;\n ot: float;\n oc: number[];\n sh: boolean;\n shc: number[];\n sho: float;\n shd: float;\n sha: float;\n shb: float;\n pad: integer;\n };\n\n export type TextObjectNetworkSyncData = ObjectNetworkSyncData &\n TextObjectNetworkSyncDataType;\n\n /**\n * Displays a text.\n */\n export class TextRuntimeObject\n extends gdjs.RuntimeObject\n implements gdjs.TextContainer, gdjs.OpacityHandler {\n _characterSize: number;\n _fontName: string;\n _bold: boolean;\n _italic: boolean;\n _underlined: boolean;\n _color: integer[];\n _useGradient: boolean = false;\n _gradient: Array<Array<integer>> = [];\n _gradientType: string = '';\n opacity: float = 255;\n _textAlign: string;\n _verticalTextAlignment: string;\n _wrapping: boolean = false;\n // A wrapping of 1 makes games crash on Firefox\n _wrappingWidth: float = 100;\n\n _isOutlineEnabled: boolean;\n _outlineThickness: float;\n _outlineColor: integer[];\n\n _shadow: boolean;\n _shadowColor: integer[];\n _shadowOpacity: float;\n _shadowDistance: float;\n _shadowAngle: float;\n _shadowBlur: float;\n\n _padding: integer = 5;\n _str: string;\n _renderer: gdjs.TextRuntimeObjectRenderer;\n\n // We can store the scale as nothing else can change it.\n _scaleX: number = 1;\n _scaleY: number = 1;\n\n /**\n * @param instanceContainer The container the object belongs to.\n * @param textObjectData The initial properties of the object\n */\n constructor(\n instanceContainer: gdjs.RuntimeInstanceContainer,\n textObjectData: TextObjectData\n ) {\n super(instanceContainer, textObjectData);\n const content = textObjectData.content;\n this._characterSize = Math.max(1, content.characterSize);\n this._fontName = content.font;\n this._bold = content.bold;\n this._italic = content.italic;\n this._underlined = content.underlined;\n this._color = gdjs.rgbOrHexToRGBColor(content.color);\n this._str = content.text;\n this._textAlign = content.textAlignment || 'left';\n this._verticalTextAlignment = content.verticalTextAlignment || 'top';\n\n this._isOutlineEnabled = content.isOutlineEnabled;\n this._outlineThickness = content.outlineThickness;\n this._outlineColor = gdjs.rgbOrHexToRGBColor(content.outlineColor);\n\n this._shadow = content.isShadowEnabled;\n this._shadowColor = gdjs.rgbOrHexToRGBColor(content.shadowColor);\n this._shadowOpacity = content.shadowOpacity;\n this._shadowDistance = content.shadowDistance;\n this._shadowBlur = content.shadowBlurRadius;\n this._shadowAngle = content.shadowAngle;\n\n this._renderer = new gdjs.TextRuntimeObjectRenderer(\n this,\n instanceContainer\n );\n\n // *ALWAYS* call `this.onCreated()` at the very end of your object constructor.\n this.onCreated();\n }\n\n updateFromObjectData(\n oldObjectData: TextObjectData,\n newObjectData: TextObjectData\n ): boolean {\n const oldContent = oldObjectData.content;\n const newContent = newObjectData.content;\n if (oldContent.characterSize !== newContent.characterSize) {\n this.setCharacterSize(newContent.characterSize);\n }\n if (oldContent.font !== newContent.font) {\n this.setFontName(newContent.font);\n }\n if (oldContent.bold !== newContent.bold) {\n this.setBold(newContent.bold);\n }\n if (oldContent.italic !== newContent.italic) {\n this.setItalic(newContent.italic);\n }\n if (oldContent.color !== newContent.color) {\n this.setColor(newContent.color);\n }\n if (oldContent.text !== newContent.text) {\n this.setText(newContent.text);\n }\n if (oldContent.underlined !== newContent.underlined) {\n return false;\n }\n if (oldContent.textAlignment !== newContent.textAlignment) {\n this.setTextAlignment(newContent.textAlignment);\n }\n if (\n oldContent.verticalTextAlignment !== newContent.verticalTextAlignment\n ) {\n this.setVerticalTextAlignment(newContent.verticalTextAlignment);\n }\n if (oldContent.isOutlineEnabled !== newContent.isOutlineEnabled) {\n this.setOutlineEnabled(newContent.isOutlineEnabled);\n }\n if (oldContent.outlineThickness !== newContent.outlineThickness) {\n this.setOutlineThickness(newContent.outlineThickness);\n }\n if (oldContent.outlineColor !== newContent.outlineColor) {\n this.setOutlineColor(newContent.outlineColor);\n }\n if (oldContent.isShadowEnabled !== newContent.isShadowEnabled) {\n this.showShadow(newContent.isShadowEnabled);\n }\n if (oldContent.shadowColor !== newContent.shadowColor) {\n this.setShadowColor(newContent.shadowColor);\n }\n if (oldContent.shadowOpacity !== newContent.shadowOpacity) {\n this.setShadowOpacity(newContent.shadowOpacity);\n }\n if (oldContent.shadowDistance !== newContent.shadowDistance) {\n this.setShadowDistance(newContent.shadowDistance);\n }\n if (oldContent.shadowAngle !== newContent.shadowAngle) {\n this.setShadowAngle(newContent.shadowAngle);\n }\n if (oldContent.shadowBlurRadius !== newContent.shadowBlurRadius) {\n this.setShadowBlurRadius(newContent.shadowBlurRadius);\n }\n return true;\n }\n\n getNetworkSyncData(): TextObjectNetworkSyncData {\n return {\n ...super.getNetworkSyncData(),\n str: this._str,\n o: this.opacity,\n cs: this._characterSize,\n fn: this._fontName,\n b: this._bold,\n i: this._italic,\n u: this._underlined,\n c: this._color,\n scale: this.getScale(),\n ta: this._textAlign,\n wrap: this._wrapping,\n wrapw: this._wrappingWidth,\n oena: this._isOutlineEnabled,\n ot: this._outlineThickness,\n oc: this._outlineColor,\n sh: this._shadow,\n shc: this._shadowColor,\n sho: this._shadowOpacity,\n shd: this._shadowDistance,\n sha: this._shadowAngle,\n shb: this._shadowBlur,\n pad: this._padding,\n };\n }\n\n updateFromNetworkSyncData(\n networkSyncData: TextObjectNetworkSyncData\n ): void {\n super.updateFromNetworkSyncData(networkSyncData);\n if (networkSyncData.str !== undefined) {\n this.setText(networkSyncData.str);\n }\n if (networkSyncData.o !== undefined) {\n this.setOpacity(networkSyncData.o);\n }\n if (networkSyncData.cs !== undefined) {\n this.setCharacterSize(networkSyncData.cs);\n }\n if (networkSyncData.fn !== undefined) {\n this.setFontName(networkSyncData.fn);\n }\n if (networkSyncData.b !== undefined) {\n this.setBold(networkSyncData.b);\n }\n if (networkSyncData.i !== undefined) {\n this.setItalic(networkSyncData.i);\n }\n if (networkSyncData.u !== undefined) {\n this._underlined = networkSyncData.u;\n }\n if (networkSyncData.c !== undefined) {\n this._color = networkSyncData.c;\n }\n if (networkSyncData.scale !== undefined) {\n this.setScale(networkSyncData.scale);\n }\n if (networkSyncData.ta !== undefined) {\n this.setTextAlignment(networkSyncData.ta);\n }\n if (networkSyncData.ta !== undefined) {\n this.setVerticalTextAlignment(networkSyncData.ta);\n }\n if (networkSyncData.wrap !== undefined) {\n this.setWrapping(networkSyncData.wrap);\n }\n if (networkSyncData.wrapw !== undefined) {\n this.setWrappingWidth(networkSyncData.wrapw);\n }\n if (networkSyncData.oena !== undefined) {\n this.setOutlineEnabled(networkSyncData.oena);\n }\n if (networkSyncData.ot !== undefined) {\n this.setOutlineThickness(networkSyncData.ot);\n }\n if (networkSyncData.oc !== undefined) {\n this._outlineColor = networkSyncData.oc;\n }\n if (networkSyncData.sh !== undefined) {\n this.showShadow(networkSyncData.sh);\n }\n if (networkSyncData.shc !== undefined) {\n this._shadowColor = networkSyncData.shc;\n }\n if (networkSyncData.sho !== undefined) {\n this.setShadowOpacity(networkSyncData.sho);\n }\n if (networkSyncData.shd !== undefined) {\n this.setShadowDistance(networkSyncData.shd);\n }\n if (networkSyncData.sha !== undefined) {\n this.setShadowAngle(networkSyncData.sha);\n }\n if (networkSyncData.shb !== undefined) {\n this.setShadowBlurRadius(networkSyncData.shb);\n }\n if (networkSyncData.pad !== undefined) {\n this.setPadding(networkSyncData.pad);\n }\n }\n\n getRendererObject() {\n return this._renderer.getRendererObject();\n }\n\n update(instanceContainer: gdjs.RuntimeInstanceContainer): void {\n this._renderer.ensureUpToDate();\n }\n\n onDestroyed(): void {\n super.onDestroyed();\n this._renderer.destroy();\n }\n\n /**\n * Initialize the extra parameters that could be set for an instance.\n */\n extraInitializationFromInitialInstance(initialInstanceData: InstanceData) {\n if (initialInstanceData.customSize) {\n this.setWrappingWidth(initialInstanceData.width);\n this.setWrapping(true);\n } else {\n this.setWrapping(false);\n }\n if (initialInstanceData.opacity !== undefined) {\n this.setOpacity(initialInstanceData.opacity);\n }\n }\n\n /**\n * Update the rendered object position.\n */\n private _updateTextPosition() {\n this.invalidateHitboxes();\n this._renderer.updatePosition();\n }\n\n /**\n * Set object position on X axis.\n */\n setX(x: float): void {\n super.setX(x);\n this._updateTextPosition();\n }\n\n /**\n * Set object position on Y axis.\n */\n setY(y: float): void {\n super.setY(y);\n this._updateTextPosition();\n }\n\n /**\n * Set the angle of the object.\n * @param angle The new angle of the object\n */\n setAngle(angle: float): void {\n super.setAngle(angle);\n this._renderer.updateAngle();\n }\n\n /**\n * Set object opacity.\n */\n setOpacity(opacity: float): void {\n if (opacity < 0) {\n opacity = 0;\n }\n if (opacity > 255) {\n opacity = 255;\n }\n this.opacity = opacity;\n this._renderer.updateOpacity();\n }\n\n /**\n * Get object opacity.\n */\n getOpacity() {\n return this.opacity;\n }\n\n /**\n * Get the string displayed by the object.\n * @deprecated use `getText` instead\n */\n getString(): string {\n return this.getText();\n }\n\n /**\n * Set the string displayed by the object.\n * @param text The new text\n * @deprecated use `setText` instead\n */\n setString(text: string): void {\n this.setText(text);\n }\n\n /**\n * Get the string displayed by the object.\n */\n getText(): string {\n return this._str;\n }\n\n /**\n * Set the string displayed by the object.\n * @param text The new text\n */\n setText(text: string): void {\n if (text === this._str) {\n return;\n }\n this._str = text;\n this._renderer.updateString();\n this._updateTextPosition();\n }\n\n /**\n * Get the font size of the characters of the object.\n */\n getCharacterSize(): number {\n return this._characterSize;\n }\n\n /**\n * Set the font size for characters of the object.\n * @param newSize The new font size for the text.\n */\n setCharacterSize(newSize: number): void {\n if (newSize <= 1) {\n newSize = 1;\n }\n this._characterSize = newSize;\n this._renderer.updateStyle();\n }\n\n /**\n * Set the name of the resource to use for the font.\n * @param fontResourceName The name of the font resource.\n */\n setFontName(fontResourceName: string): void {\n this._fontName = fontResourceName;\n this._renderer.updateStyle();\n }\n\n /**\n * Return true if the text is bold.\n */\n isBold(): boolean {\n return this._bold;\n }\n\n /**\n * Set bold for the object text.\n * @param enable {boolean} true to have a bold text, false otherwise.\n */\n setBold(enable: boolean): void {\n this._bold = enable;\n this._renderer.updateStyle();\n }\n\n /**\n * Return true if the text is italic.\n */\n isItalic(): boolean {\n return this._italic;\n }\n\n /**\n * Set italic for the object text.\n * @param enable {boolean} true to have an italic text, false otherwise.\n */\n setItalic(enable: boolean): void {\n this._italic = enable;\n this._renderer.updateStyle();\n }\n\n /**\n * Get width of the text.\n */\n getWidth(): float {\n return this._wrapping ? this._wrappingWidth : this._renderer.getWidth();\n }\n\n /**\n * Get height of the text.\n */\n getHeight(): float {\n return this._renderer.getHeight();\n }\n\n /**\n * Get the scale of the object (or the arithmetic mean of the X and Y scale in case they are different).\n *\n * @return the scale of the object (or the arithmetic mean of the X and Y scale in case they are different).\n * @deprecated Use `getScale` instead.\n */\n getScaleMean(): float {\n return (Math.abs(this._scaleX) + Math.abs(this._scaleY)) / 2.0;\n }\n\n /**\n * Get the scale of the object (or the geometric mean of the X and Y scale in case they are different).\n *\n * @return the scale of the object (or the geometric mean of the X and Y scale in case they are different).\n */\n getScale(): float {\n const scaleX = Math.abs(this._scaleX);\n const scaleY = Math.abs(this._scaleY);\n return scaleX === scaleY ? scaleX : Math.sqrt(scaleX * scaleY);\n }\n\n /**\n * Get x-scale of the text.\n */\n getScaleX(): float {\n return this._scaleX;\n }\n\n /**\n * Get y-scale of the text.\n */\n getScaleY(): float {\n return this._scaleY;\n }\n\n /**\n * Set the text object scale.\n * @param newScale The new scale for the text object.\n */\n setScale(newScale: float): void {\n if (this._scaleX === newScale && this._scaleY === newScale) return;\n\n this._scaleX = newScale;\n this._scaleY = newScale;\n this._renderer.setScale(newScale);\n this.invalidateHitboxes();\n }\n\n /**\n * Set the text object x-scale.\n * @param newScale The new x-scale for the text object.\n */\n setScaleX(newScale: float): void {\n if (this._scaleX === newScale) return;\n\n this._scaleX = newScale;\n this._renderer.setScaleX(newScale);\n this.invalidateHitboxes();\n }\n\n /**\n * Set the text object y-scale.\n * @param newScale The new y-scale for the text object.\n */\n setScaleY(newScale: float): void {\n if (this._scaleY === newScale) return;\n\n this._scaleY = newScale;\n this._renderer.setScaleY(newScale);\n this.invalidateHitboxes();\n }\n\n /**\n * Change the text color.\n * @param color color as a \"R;G;B\" string, for example: \"255;0;0\"\n */\n setColor(str: string): void {\n const color = str.split(';');\n if (color.length < 3) {\n return;\n }\n this._color[0] = parseInt(color[0], 10);\n this._color[1] = parseInt(color[1], 10);\n this._color[2] = parseInt(color[2], 10);\n this._useGradient = false;\n this._renderer.updateStyle();\n }\n\n /**\n * Get the text color.\n * @return The color as a \"R;G;B\" string, for example: \"255;0;0\"\n */\n getColor(): string {\n return this._color[0] + ';' + this._color[1] + ';' + this._color[2];\n }\n\n /**\n * Set the text alignment on Y axis for multiline text objects.\n * @param alignment The text alignment.\n */\n setVerticalTextAlignment(alignment: string): void {\n this._verticalTextAlignment = alignment;\n this._renderer.updateStyle();\n }\n\n /**\n * Get the text alignment on Y axis of text object.\n * @return The text alignment.\n */\n getVerticalTextAlignment(): string {\n return this._verticalTextAlignment;\n }\n\n /**\n * Set the text alignment for multiline text objects.\n * @param alignment The text alignment.\n */\n setTextAlignment(alignment: string): void {\n this._textAlign = alignment;\n this._renderer.updateStyle();\n }\n\n /**\n * Get the text alignment of text object.\n * @return The text alignment.\n */\n getTextAlignment(): string {\n return this._textAlign;\n }\n\n /**\n * Return true if word wrapping is enabled for the text.\n */\n isWrapping(): boolean {\n return this._wrapping;\n }\n\n /**\n * Set word wrapping for the object text.\n * @param enable true to enable word wrapping, false to disable it.\n */\n setWrapping(enable: boolean): void {\n if (this._wrapping === enable) return;\n\n this._wrapping = enable;\n this._renderer.updateStyle();\n this.invalidateHitboxes();\n }\n\n /**\n * Get the word wrapping width for the text object.\n */\n getWrappingWidth(): float {\n return this._wrappingWidth;\n }\n\n /**\n * Set the word wrapping width for the text object.\n * @param width The new width to set.\n */\n setWrappingWidth(width: float): void {\n if (width <= 1) {\n width = 1;\n }\n if (this._wrappingWidth === width) {\n return;\n }\n this._wrappingWidth = width;\n\n if (this._wrapping) {\n this._renderer.updateStyle();\n this.invalidateHitboxes();\n }\n }\n\n setWidth(width: float): void {\n this.setWrappingWidth(width);\n }\n\n getDrawableY(): float {\n return (\n this.getY() -\n (this._verticalTextAlignment === 'center'\n ? this.getHeight() / 2\n : this._verticalTextAlignment === 'bottom'\n ? this.getHeight()\n : 0)\n );\n }\n\n /**\n * Set the outline for the text object.\n * @param str color as a \"R;G;B\" string, for example: \"255;0;0\"\n * @param thickness thickness of the outline (0 = disabled)\n * @deprecated Prefer independent setters.\n */\n setOutline(str: string, thickness: number): void {\n const color = str.split(';');\n if (color.length < 3) {\n return;\n }\n this._outlineColor[0] = parseInt(color[0], 10);\n this._outlineColor[1] = parseInt(color[1], 10);\n this._outlineColor[2] = parseInt(color[2], 10);\n this._outlineThickness = thickness;\n this._renderer.updateStyle();\n }\n\n isOutlineEnabled(): boolean {\n return this._isOutlineEnabled;\n }\n\n setOutlineEnabled(enable: boolean): void {\n this._isOutlineEnabled = enable;\n this._renderer.updateStyle();\n }\n\n /**\n * Get the outline thickness of the text object.\n * @return the outline thickness\n */\n getOutlineThickness(): number {\n return this._outlineThickness;\n }\n\n /**\n * Set the outline thickness of the text object.\n * @param value the outline thickness\n */\n setOutlineThickness(value: float): void {\n this._outlineThickness = value;\n this._renderer.updateStyle();\n }\n\n /**\n * Set the shadow color of the text object.\n * @param color the shadow color as a \"R;G;B\" string, for example: \"255;0;0\"\n */\n setOutlineColor(color: string): void {\n this._outlineColor = gdjs.rgbOrHexToRGBColor(color);\n this._renderer.updateStyle();\n }\n\n /**\n * Set the shadow for the text object.\n * @param str color as a \"R;G;B\" string, for example: \"255;0;0\"\n * @param distance distance between the shadow and the text, in pixels.\n * @param blur amount of shadow blur, in pixels.\n * @param angle shadow offset direction, in degrees.\n * @deprecated Prefer independent setters.\n */\n setShadow(\n str: string,\n distance: number,\n blur: integer,\n angle: float\n ): void {\n const color = str.split(';');\n if (color.length < 3) {\n return;\n }\n this._shadowColor[0] = parseInt(color[0], 10);\n this._shadowColor[1] = parseInt(color[1], 10);\n this._shadowColor[2] = parseInt(color[2], 10);\n this._shadowDistance = distance;\n this._shadowBlur = blur;\n this._shadowAngle = angle;\n this._shadow = true;\n this._renderer.updateStyle();\n }\n\n isShadowEnabled(): boolean {\n return this._shadow;\n }\n\n /**\n * Show the shadow of the text object.\n * @param enable true to show the shadow, false to hide it\n */\n showShadow(enable: boolean): void {\n this._shadow = enable;\n this._renderer.updateStyle();\n }\n\n /**\n * Get the shadow opacity of the text object.\n * @return the opacity (0 - 255)\n */\n getShadowOpacity(): number {\n return this._shadowOpacity;\n }\n\n /**\n * Set the shadow opacity of the text object.\n * @param value the opacity (0 - 255)\n */\n setShadowOpacity(value: float): void {\n this._shadowOpacity = value;\n this._renderer.updateStyle();\n }\n\n /**\n * Get the shadow offset distance of the text object.\n * @return the shadow offset distance\n */\n getShadowDistance(): number {\n return this._shadowDistance;\n }\n\n /**\n * Set the shadow offset distance of the text object.\n * @param value the shadow offset distance\n */\n setShadowDistance(value: float): void {\n this._shadowDistance = value;\n this._renderer.updateStyle();\n }\n\n /**\n * Get the shadow offset angle of the text object.\n * @return the shadow offset angle in degrees\n */\n getShadowAngle(): number {\n return this._shadowAngle;\n }\n\n /**\n * Set the shadow offset angle of the text object.\n * @param value the shadow offset angle in degrees\n */\n setShadowAngle(value: float): void {\n this._shadowAngle = value;\n this._renderer.updateStyle();\n }\n\n /**\n * Get the shadow blur radius of the text object.\n * @return the shadow blur radius\n */\n getShadowBlurRadius(): number {\n return this._shadowBlur;\n }\n\n /**\n * Set the shadow blur radius of the text object.\n * @param value the shadow blur radius\n */\n setShadowBlurRadius(value: float): void {\n this._shadowBlur = value;\n this._renderer.updateStyle();\n }\n\n /**\n * Set the shadow color of the text object.\n * @param color the shadow color as a \"R;G;B\" string, for example: \"255;0;0\"\n */\n setShadowColor(color: string): void {\n this._shadowColor = gdjs.rgbOrHexToRGBColor(color);\n this._renderer.updateStyle();\n }\n\n /**\n * Set the gradient for the text object.\n * @param strFirstColor color as a \"R;G;B\" string, for example: \"255;0;0\"\n * @param strSecondColor color as a \"R;G;B\" string, for example: \"255;0;0\"\n * @param strThirdColor color as a \"R;G;B\" string, for example: \"255;0;0\"\n * @param strFourthColor color as a \"R;G;B\" string, for example: \"255;0;0\"\n * @param strGradientType gradient type\n */\n setGradient(\n strGradientType: string,\n strFirstColor: string,\n strSecondColor: string,\n strThirdColor: string,\n strFourthColor: string\n ): void {\n const colorFirst = strFirstColor.split(';');\n const colorSecond = strSecondColor.split(';');\n const colorThird = strThirdColor.split(';');\n const colorFourth = strFourthColor.split(';');\n this._gradient = [];\n if (colorFirst.length == 3) {\n this._gradient.push([\n parseInt(colorFirst[0], 10),\n parseInt(colorFirst[1], 10),\n parseInt(colorFirst[2], 10),\n ]);\n }\n if (colorSecond.length == 3) {\n this._gradient.push([\n parseInt(colorSecond[0], 10),\n parseInt(colorSecond[1], 10),\n parseInt(colorSecond[2], 10),\n ]);\n }\n if (colorThird.length == 3) {\n this._gradient.push([\n parseInt(colorThird[0], 10),\n parseInt(colorThird[1], 10),\n parseInt(colorThird[2], 10),\n ]);\n }\n if (colorFourth.length == 3) {\n this._gradient.push([\n parseInt(colorFourth[0], 10),\n parseInt(colorFourth[1], 10),\n parseInt(colorFourth[2], 10),\n ]);\n }\n this._gradientType = strGradientType;\n this._useGradient = this._gradient.length > 1 ? true : false;\n this._renderer.updateStyle();\n }\n\n /**\n * Get padding of the text object.\n * @return number of pixels around the text before it gets cropped\n */\n getPadding(): number {\n return this._padding;\n }\n\n /**\n * Set padding of the text object.\n * @param value number of pixels around the text before it gets cropped\n */\n setPadding(value: float): void {\n this._padding = value;\n this._renderer.updateStyle();\n }\n }\n gdjs.registerObject('TextObject::Text', gdjs.TextRuntimeObject);\n}\n"],
|
|
5
|
+
"mappings": "AAIA,GAAU,MAAV,UAAU,EAAV,CAoES,eACG,GAAK,aACsC,CAwCnD,YACE,EACA,EACA,CACA,MAAM,EAAmB,GArC3B,kBAAwB,GACxB,eAAmC,GACnC,mBAAwB,GACxB,aAAiB,IAGjB,eAAqB,GAErB,oBAAwB,IAaxB,cAAoB,EAKpB,aAAkB,EAClB,aAAkB,EAWhB,KAAM,GAAU,EAAe,QAC/B,KAAK,eAAiB,KAAK,IAAI,EAAG,EAAQ,eAC1C,KAAK,UAAY,EAAQ,KACzB,KAAK,MAAQ,EAAQ,KACrB,KAAK,QAAU,EAAQ,OACvB,KAAK,YAAc,EAAQ,WAC3B,KAAK,OAAS,EAAK,mBAAmB,EAAQ,OAC9C,KAAK,KAAO,EAAQ,KACpB,KAAK,WAAa,EAAQ,eAAiB,OAC3C,KAAK,uBAAyB,EAAQ,uBAAyB,MAE/D,KAAK,kBAA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