diff --git a/README.md b/README.md index 023c19d..ce4cacf 100644 --- a/README.md +++ b/README.md @@ -33,8 +33,6 @@ If you don't, then the samples won't be visible to the `Minecraft Bedrock Previe | Farm Generator | Adds a dialog that allows you to place a selection of randomized farms containing different combinations of crops and animals, as well as adding irrigation to help grow plants.

This extension demonstrates the use of UI components, block placement and mouse input.

**Notes**: Activate using CTRL+SHIFT+F or from the tool rail.
**Author**: Molly | | Goto Mark | Adds a dialog that allows you to modify the players current position in the world by directly typing coordinates. In addition, you can set the players default spawn position (and jump to it at any time during editing).
The extension also allows you to set up to 9 custom world locations as named bookmarks, and jump to them at any time during editing.

This extension demonstrates dynamic UI component updates, text input, and persistent storage using entity dynamic properties.

**Notes**: No input required, activated from tool rail.
**Author**: Chloe, Eser & Dave | | Portal Generator | Adds a dialog that allows you to place either Nether or End portals (in various states of completion).

This extension demonstrates dynamic UI component updates, and block placement.

**Notes**: Activated using CTRL+SHIFT+P or from tool rail.
**Author**: Andrew. | -| Simple Empty | Adds an extension which as a very basic set of barely functional components designed to demonstrate setting up a new Editor tool using the Simple Tool wrapper. The extension demonstrates how to set up the data definitions that will ultimately direct how the tool registers itself with the Editor, and sets up the visual layouts - ready for the creator to fill in the functionality.
**Author**: Dave | -| Simple Locate Biome | Adds an extension which demonstrates the use of sub-panes to group together UI controls, and uses the visibility of those sub-panes to create different views of data. The extension also demonstrates the use of the mutually exclusive visibility properties of sub-panes, and some use of the Biome API.
**Author**: Dave & Mitch | | Tree Generator | Adds a dialog that allows you to place a selection of randomized trees of certain types wherever you click in the world.

This extension demonstrates the use of UI components, block placement and mouse input.

**Notes**: Activated using CTRL+SHIFT+T or through the tool rail.
**Author**: Jake || | | diff --git a/camera-grapple/en_US.lang b/camera-grapple/en_US.lang index beb9c28..064f2fa 100644 --- a/camera-grapple/en_US.lang +++ b/camera-grapple/en_US.lang @@ -2,6 +2,14 @@ ## ## Note, trailing spaces will NOT be trimmed. If you want room between the end of the string and the start of a ## comment on the same line, use TABs. -sample.cameragrapple.title=Camera Base Grapple -sample.cameragrapple.keyBinding.flyToCursor=Fly To Cursor -sample.cameragrapple.keyBinding.flyToSelection=Fly To Selection \ No newline at end of file +sample.gotomark.tool.title=Sample Goto Mark ### Sample Text. {MaxLength=1000} +sample.cameragrapple.title=Sample Camera Base Grapple ### Sample Text. {MaxLength=1000} +sample.cameragrapple.keyBinding.flyToCursor=Fly To Cursor (Sample) ### Sample Text. {MaxLength=1000} +sample.cameragrapple.keyBinding.flyToSelection=Fly To Selection (Sample) ### Sample Text. {MaxLength=1000} +sample.dyebrush.tool.title=Sample Dye Brush ### Sample Text. {MaxLength=1000} +sample.farmgenerator.tool.title=Sample Farm Generator ### Sample Text. {MaxLength=1000} +sample.farmgenerator.keyBinding.toggleTool=Sample Farm Generator ### Sample Text. {MaxLength=1000} +sample.portalgenerator.title=Sample Portal Generator ### Sample Text. {MaxLength=1000} +sample.portalgenerator.keyBinding.toggleTool=Sample Portal Generator ### Sample Text. {MaxLength=1000} +sample.treegenerator.tool.title=Sample Tree Generator ### Sample Text. {MaxLength=1000} +sample.treegenerator.keyBinding.toggleTool=Sample Tree Generator ### Sample Text. {MaxLength=1000} \ No newline at end of file diff --git a/dye-brush/dye-brush.ts b/dye-brush/dye-brush.ts index 2fb8f62..9f4c3a9 100644 --- a/dye-brush/dye-brush.ts +++ b/dye-brush/dye-brush.ts @@ -278,6 +278,7 @@ function addDyeBrushPane(uiSession: DyeBrushSession, tool: IModalTool) { title: 'sample.dyeBrush.pane.title', infoTooltip: { description: ['sample.dyebrush.tool.tooltip'] }, }); + pane.beginConstruct(); const entityBrush = makeObservable(EntityColor.White); @@ -311,6 +312,8 @@ function addDyeBrushPane(uiSession: DyeBrushSession, tool: IModalTool) { }, }); + pane.endConstruct(); + tool.bindPropertyPane(pane); const onExecuteBrush = () => { @@ -437,8 +440,6 @@ function addDyeBrushPane(uiSession: DyeBrushSession, tool: IModalTool) { } uiSession.scratchStorage?.previewSelection?.clearVolume(); }); - - pane.hide(); } export function addDyeBrushTool(uiSession: DyeBrushSession) { diff --git a/dye-brush/en_US.lang b/dye-brush/en_US.lang index b7f94b8..c7cb7b3 100644 --- a/dye-brush/en_US.lang +++ b/dye-brush/en_US.lang @@ -2,6 +2,16 @@ ## ## Note, trailing spaces will NOT be trimmed. If you want room between the end of the string and the start of a ## comment on the same line, use TABs. -sample.dyebrush.tool.title=Dye Brush +sample.gotomark.tool.title=Sample Goto Mark ### Sample Text. {MaxLength=1000} +sample.cameragrapple.title=Sample Camera Base Grapple ### Sample Text. {MaxLength=1000} +sample.cameragrapple.keyBinding.flyToCursor=Fly To Cursor (Sample) ### Sample Text. {MaxLength=1000} +sample.cameragrapple.keyBinding.flyToSelection=Fly To Selection (Sample) ### Sample Text. {MaxLength=1000} +sample.dyebrush.tool.title=Sample Dye Brush ### Sample Text. {MaxLength=1000} sample.dyebrush.tool.tooltip=Change the color of entity color components. The updated color is applied when entity simulation resumes. -sample.dyebrush.pane.colordropdown.title=Color \ No newline at end of file +sample.dyebrush.pane.colordropdown.title=Color +sample.farmgenerator.tool.title=Sample Farm Generator ### Sample Text. {MaxLength=1000} +sample.farmgenerator.keyBinding.toggleTool=Sample Farm Generator ### Sample Text. {MaxLength=1000} +sample.portalgenerator.title=Sample Portal Generator ### Sample Text. {MaxLength=1000} +sample.portalgenerator.keyBinding.toggleTool=Sample Portal Generator ### Sample Text. {MaxLength=1000} +sample.treegenerator.tool.title=Sample Tree Generator ### Sample Text. {MaxLength=1000} +sample.treegenerator.keyBinding.toggleTool=Sample Tree Generator ### Sample Text. {MaxLength=1000} \ No newline at end of file diff --git a/editor-samples.mceditoraddon b/editor-samples.mceditoraddon index 33f9136..86832df 100644 Binary files a/editor-samples.mceditoraddon and b/editor-samples.mceditoraddon differ diff --git a/empty/en_US.lang b/empty/en_US.lang index 7643074..a7cf3e0 100644 --- a/empty/en_US.lang +++ b/empty/en_US.lang @@ -2,4 +2,15 @@ ## ## Note, trailing spaces will NOT be trimmed. If you want room between the end of the string and the start of a ## comment on the same line, use TABs. -sample.empty.title=Empty Template \ No newline at end of file +sample.gotomark.tool.title=Sample Goto Mark ### Sample Text. {MaxLength=1000} +sample.cameragrapple.title=Sample Camera Base Grapple ### Sample Text. {MaxLength=1000} +sample.cameragrapple.keyBinding.flyToCursor=Fly To Cursor (Sample) ### Sample Text. {MaxLength=1000} +sample.cameragrapple.keyBinding.flyToSelection=Fly To Selection (Sample) ### Sample Text. {MaxLength=1000} +sample.empty.title=Empty Template +sample.dyebrush.tool.title=Sample Dye Brush ### Sample Text. {MaxLength=1000} +sample.farmgenerator.tool.title=Sample Farm Generator ### Sample Text. {MaxLength=1000} +sample.farmgenerator.keyBinding.toggleTool=Sample Farm Generator ### Sample Text. {MaxLength=1000} +sample.portalgenerator.title=Sample Portal Generator ### Sample Text. {MaxLength=1000} +sample.portalgenerator.keyBinding.toggleTool=Sample Portal Generator ### Sample Text. {MaxLength=1000} +sample.treegenerator.tool.title=Sample Tree Generator ### Sample Text. {MaxLength=1000} +sample.treegenerator.keyBinding.toggleTool=Sample Tree Generator ### Sample Text. {MaxLength=1000} \ No newline at end of file diff --git a/farm-generator/en_US.lang b/farm-generator/en_US.lang index ea3a5a8..044b4e5 100644 --- a/farm-generator/en_US.lang +++ b/farm-generator/en_US.lang @@ -2,7 +2,12 @@ ## ## Note, trailing spaces will NOT be trimmed. If you want room between the end of the string and the start of a ## comment on the same line, use TABs. -sample.farmgenerator.tool.title=Farm Generator +sample.gotomark.tool.title=Sample Goto Mark ### Sample Text. {MaxLength=1000} +sample.cameragrapple.title=Sample Camera Base Grapple ### Sample Text. {MaxLength=1000} +sample.cameragrapple.keyBinding.flyToCursor=Fly To Cursor (Sample) ### Sample Text. {MaxLength=1000} +sample.cameragrapple.keyBinding.flyToSelection=Fly To Selection (Sample) ### Sample Text. {MaxLength=1000} +sample.dyebrush.tool.title=Sample Dye Brush ### Sample Text. {MaxLength=1000} +sample.farmgenerator.tool.title=Sample Farm Generator ### Sample Text. {MaxLength=1000} sample.farmgenerator.tool.tooltip=Quickly create a custom farm sample.farmgenerator.pane.title=Farm Generator sample.farmgenerator.pane.length=Length @@ -20,5 +25,9 @@ sample.farmgenerator.pane.animals.title=Animals sample.farmgenerator.pane.animals.cow=Cow sample.farmgenerator.pane.animals.sheep=Sheep sample.farmgenerator.pane.animals.pig=Pig -sample.farmgenerator.keyBinding.toggleTool=Toggle Farm Generator Tool -sample.farmgenerator.keyBinding.place=Place Farm At Cursor \ No newline at end of file +sample.farmgenerator.keyBinding.toggleTool=Sample Farm Generator ### Sample Text. {MaxLength=1000} +sample.farmgenerator.keyBinding.place=Place Farm At Cursor +sample.portalgenerator.title=Sample Portal Generator ### Sample Text. {MaxLength=1000} +sample.portalgenerator.keyBinding.toggleTool=Sample Portal Generator ### Sample Text. {MaxLength=1000} +sample.treegenerator.tool.title=Sample Tree Generator ### Sample Text. {MaxLength=1000} +sample.treegenerator.keyBinding.toggleTool=Sample Tree Generator ### Sample Text. {MaxLength=1000} \ No newline at end of file diff --git a/farm-generator/farm-generator.ts b/farm-generator/farm-generator.ts index 1e35c90..4e6ecab 100644 --- a/farm-generator/farm-generator.ts +++ b/farm-generator/farm-generator.ts @@ -398,7 +398,7 @@ function addFarmGeneratorTool(uiSession: IPlayerUISession) { uiSession.inputManager.registerKeyBinding( EditorInputContext.GlobalToolMode, toolToggleAction, - { key: KeyboardKey.KEY_F, modifier: InputModifier.Control | InputModifier.Shift }, + { key: KeyboardKey.KEY_F, modifier: InputModifier.Control | InputModifier.Shift | InputModifier.Alt }, { uniqueId: 'editorSamples:farmGenerator:toggleTool', label: 'sample.farmgenerator.keyBinding.toggleTool', diff --git a/goto-mark/en_US.lang b/goto-mark/en_US.lang index 0628847..4b61ddc 100644 --- a/goto-mark/en_US.lang +++ b/goto-mark/en_US.lang @@ -2,7 +2,7 @@ ## ## Note, trailing spaces will NOT be trimmed. If you want room between the end of the string and the start of a ## comment on the same line, use TABs. -sample.gotomark.tool.title=Goto Mark +sample.gotomark.tool.title=Sample Goto Mark ### Sample Text. {MaxLength=1000} sample.gotomark.tool.tooltip=Set or Jump to a stored location sample.gotomark.pane.title=Goto Mark sample.gotomark.pane.location=Player Location @@ -14,4 +14,14 @@ sample.gotomark.pane.locationpane.button.teleport=Teleport to Stored Location %1 sample.gotomark.pane.locationpane.button.delete=Delete Stored Location sample.gotomark.pane.locationpane.input.name=New Name sample.gotomark.pane.locationpane.button.store=Store Current Location As... -sample.gotomark.pane.locationpane.dropdownLabel=Stored Location \ No newline at end of file +sample.gotomark.pane.locationpane.dropdownLabel=Stored Location +sample.cameragrapple.title=Sample Camera Base Grapple ### Sample Text. {MaxLength=1000} +sample.cameragrapple.keyBinding.flyToCursor=Fly To Cursor (Sample) ### Sample Text. {MaxLength=1000} +sample.cameragrapple.keyBinding.flyToSelection=Fly To Selection (Sample) ### Sample Text. {MaxLength=1000} +sample.dyebrush.tool.title=Sample Dye Brush ### Sample Text. {MaxLength=1000} +sample.farmgenerator.tool.title=Sample Farm Generator ### Sample Text. {MaxLength=1000} +sample.farmgenerator.keyBinding.toggleTool=Sample Farm Generator ### Sample Text. {MaxLength=1000} +sample.portalgenerator.title=Sample Portal Generator ### Sample Text. {MaxLength=1000} +sample.portalgenerator.keyBinding.toggleTool=Sample Portal Generator ### Sample Text. {MaxLength=1000} +sample.treegenerator.tool.title=Sample Tree Generator ### Sample Text. {MaxLength=1000} +sample.treegenerator.keyBinding.toggleTool=Sample Tree Generator ### Sample Text. {MaxLength=1000} \ No newline at end of file diff --git a/goto-mark/goto-mark.ts b/goto-mark/goto-mark.ts index 73d460f..9970b30 100644 --- a/goto-mark/goto-mark.ts +++ b/goto-mark/goto-mark.ts @@ -122,6 +122,7 @@ function addExtensionTool(uiSession: IPlayerUISession): IModal function buildParentPane(uiSession: IPlayerUISession, storage: ExtensionStorage): IRootPropertyPane { const parentPane = uiSession.createPropertyPane({ title: 'sample.gotomark.pane.title', + uniqueId: 'editorSamples:pane:goToMark', }); const playerLocation = makeObservable(vector3Truncate(uiSession.extensionContext.player.location)); @@ -420,7 +421,7 @@ export function registerGotoMarkExtension() { `Found ${storage.storedLocations.length} stored locations during initialization` ); } - } catch (e) { + } catch (_e) { uiSession.log.info('No stored locations found during initialization'); } diff --git a/minimal/en_US.lang b/minimal/en_US.lang index d5f4a97..59f0253 100644 --- a/minimal/en_US.lang +++ b/minimal/en_US.lang @@ -2,7 +2,18 @@ ## ## Note, trailing spaces will NOT be trimmed. If you want room between the end of the string and the start of a ## comment on the same line, use TABs. +sample.gotomark.tool.title=Sample Goto Mark ### Sample Text. {MaxLength=1000} +sample.cameragrapple.title=Sample Camera Base Grapple ### Sample Text. {MaxLength=1000} +sample.cameragrapple.keyBinding.flyToCursor=Fly To Cursor (Sample) ### Sample Text. {MaxLength=1000} +sample.cameragrapple.keyBinding.flyToSelection=Fly To Selection (Sample) ### Sample Text. {MaxLength=1000} +sample.dyebrush.tool.title=Sample Dye Brush ### Sample Text. {MaxLength=1000} +sample.farmgenerator.tool.title=Sample Farm Generator ### Sample Text. {MaxLength=1000} +sample.farmgenerator.keyBinding.toggleTool=Sample Farm Generator ### Sample Text. {MaxLength=1000} sample.minimal.pane.title=Minimal Extension Pane sample.minimal.pane.button.clickme=Click Me! sample.minimal.menu.title=Minimal Extension -sample.minimal.menu.showpane=Show my property pane \ No newline at end of file +sample.minimal.menu.showpane=Show my property pane +sample.portalgenerator.title=Sample Portal Generator ### Sample Text. {MaxLength=1000} +sample.portalgenerator.keyBinding.toggleTool=Sample Portal Generator ### Sample Text. {MaxLength=1000} +sample.treegenerator.tool.title=Sample Tree Generator ### Sample Text. {MaxLength=1000} +sample.treegenerator.keyBinding.toggleTool=Sample Tree Generator ### Sample Text. {MaxLength=1000} \ No newline at end of file diff --git a/minimal/minimal.ts b/minimal/minimal.ts index e08a24a..e7024d6 100644 --- a/minimal/minimal.ts +++ b/minimal/minimal.ts @@ -66,6 +66,7 @@ export function registerMinimalExtension() { // when you adjust the slider, you can inspect the binding object property 'mySlider' for the current value. const extensionPane = uiSession.createPropertyPane({ title: 'sample.minimal.pane.title', + uniqueId: 'editorSamples:pane:minimal', }); // Creating UI elements like buttons and sliders require a couple of simple steps. diff --git a/portal-generator/en_US.lang b/portal-generator/en_US.lang index 7d486db..c54e7a9 100644 --- a/portal-generator/en_US.lang +++ b/portal-generator/en_US.lang @@ -2,7 +2,14 @@ ## ## Note, trailing spaces will NOT be trimmed. If you want room between the end of the string and the start of a ## comment on the same line, use TABs. -sample.portalgenerator.title=Portal Generator +sample.gotomark.tool.title=Sample Goto Mark ### Sample Text. {MaxLength=1000} +sample.cameragrapple.title=Sample Camera Base Grapple ### Sample Text. {MaxLength=1000} +sample.cameragrapple.keyBinding.flyToCursor=Fly To Cursor (Sample) ### Sample Text. {MaxLength=1000} +sample.cameragrapple.keyBinding.flyToSelection=Fly To Selection (Sample) ### Sample Text. {MaxLength=1000} +sample.dyebrush.tool.title=Sample Dye Brush ### Sample Text. {MaxLength=1000} +sample.farmgenerator.tool.title=Sample Farm Generator ### Sample Text. {MaxLength=1000} +sample.farmgenerator.keyBinding.toggleTool=Sample Farm Generator ### Sample Text. {MaxLength=1000} +sample.portalgenerator.title=Sample Portal Generator ### Sample Text. {MaxLength=1000} sample.portalgenerator.tooltip=Create Portals with a single click sample.portalgenerator.pane.title=Portal Generator sample.portalgenerator.pane.replacefloor=Replace Floor @@ -20,4 +27,6 @@ sample.portalgenerator.pane.nether.pane.corners.tooltip=Adds corner blocks to th sample.portalgenerator.pane.nether.pane.percentage=Percentage Complete sample.portalgenerator.pane.end.pane.title=End Portal sample.portalgenerator.pane.end.pane.filledcount=Filled 'Eye of Ender' count -sample.portalgenerator.keyBinding.toggleTool=Toggle Portal Generator Tool \ No newline at end of file +sample.portalgenerator.keyBinding.toggleTool=Sample Portal Generator ### Sample Text. {MaxLength=1000} +sample.treegenerator.tool.title=Sample Tree Generator ### Sample Text. {MaxLength=1000} +sample.treegenerator.keyBinding.toggleTool=Sample Tree Generator ### Sample Text. {MaxLength=1000} \ No newline at end of file diff --git a/portal-generator/portal-generator.ts b/portal-generator/portal-generator.ts index 7470a6b..4ae92e3 100644 --- a/portal-generator/portal-generator.ts +++ b/portal-generator/portal-generator.ts @@ -104,7 +104,7 @@ class PortalGenerator implements IDisposable { uiSession.inputManager.registerKeyBinding( EditorInputContext.GlobalToolMode, toolToggleAction, - { key: KeyboardKey.KEY_P, modifier: InputModifier.Control | InputModifier.Shift }, + { key: KeyboardKey.KEY_P, modifier: InputModifier.Control | InputModifier.Shift | InputModifier.Alt }, { uniqueId: 'editorSamples:portalGenerator:toggleTool', label: 'sample.portalgenerator.keyBinding.toggleTool', @@ -178,8 +178,6 @@ class PortalGenerator implements IDisposable { } activatePortalGenerator(uiSession: PortalGeneratorSession, portalType: PortalType): void { - this._pane?.hide(); - if (this._activePortal) { this._activePortal.deactivatePane(); } @@ -191,8 +189,6 @@ class PortalGenerator implements IDisposable { } this._activePortal.activatePane(uiSession); - - this._pane?.show(); } } @@ -227,15 +223,12 @@ class NetherPortal implements IPortalGenerator { } this._pane = this.buildSubPane(uiSession); - this._pane?.show(); } deactivatePane(): void { if (this._pane) { - this._pane.hide(); this._parentPane?.removeSubPane(this._pane); } - this._pane = undefined; } @@ -250,6 +243,8 @@ class NetherPortal implements IPortalGenerator { title: 'sample.portalgenerator.pane.nether.pane.title', }); + subPane.beginConstruct(); + subPane.addDropdown(this._orientation, { title: 'sample.portalgenerator.pane.nether.pane.orientation', entries: [ @@ -290,6 +285,8 @@ class NetherPortal implements IPortalGenerator { variant: NumberPropertyItemVariant.InputFieldAndSlider, }); + subPane.endConstruct(); + return subPane; } @@ -429,17 +426,13 @@ class EndPortal implements IPortalGenerator { if (this._pane) { this.deactivatePane(); } - this._pane = this.buildSubPane(uiSession); - this._pane?.show(); } deactivatePane(): void { if (this._pane) { - this._pane.hide(); this._parentPane?.removeSubPane(this._pane); } - this._pane = undefined; } @@ -454,6 +447,8 @@ class EndPortal implements IPortalGenerator { title: 'sample.portalgenerator.pane.end.pane.title', }); + subPane.beginConstruct(); + subPane.addNumber(this._filledEyeCount, { title: 'sample.portalgenerator.pane.end.pane.filledcount', min: 0, @@ -462,6 +457,8 @@ class EndPortal implements IPortalGenerator { isInteger: true, }); + subPane.endConstruct(); + return subPane; } diff --git a/tree-generator/en_US.lang b/tree-generator/en_US.lang index 2a14b53..6ede9a7 100644 --- a/tree-generator/en_US.lang +++ b/tree-generator/en_US.lang @@ -2,11 +2,20 @@ ## ## Note, trailing spaces will NOT be trimmed. If you want room between the end of the string and the start of a ## comment on the same line, use TABs. -sample.treegenerator.tool.title=Tree Generator +sample.gotomark.tool.title=Sample Goto Mark ### Sample Text. {MaxLength=1000} +sample.cameragrapple.title=Sample Camera Base Grapple ### Sample Text. {MaxLength=1000} +sample.cameragrapple.keyBinding.flyToCursor=Fly To Cursor (Sample) ### Sample Text. {MaxLength=1000} +sample.cameragrapple.keyBinding.flyToSelection=Fly To Selection (Sample) ### Sample Text. {MaxLength=1000} +sample.dyebrush.tool.title=Sample Dye Brush ### Sample Text. {MaxLength=1000} +sample.farmgenerator.tool.title=Sample Farm Generator ### Sample Text. {MaxLength=1000} +sample.farmgenerator.keyBinding.toggleTool=Sample Farm Generator ### Sample Text. {MaxLength=1000} +sample.portalgenerator.title=Sample Portal Generator ### Sample Text. {MaxLength=1000} +sample.portalgenerator.keyBinding.toggleTool=Sample Portal Generator ### Sample Text. {MaxLength=1000} +sample.treegenerator.tool.title=Sample Tree Generator ### Sample Text. {MaxLength=1000} sample.treegenerator.tool.tooltip=Single Click to place whole trees sample.treegenerator.pane.title=Tree Generator sample.treegenerator.pane.type=Tree Type sample.treegenerator.pane.height=Tree Height sample.treegenerator.pane.variance=Tree Height Random Variance sample.treegenerator.keyBinding.place=Place Tree At Cursor -sample.treegenerator.keyBinding.toggleTool=Toggle Tree Generator Tool \ No newline at end of file +sample.treegenerator.keyBinding.toggleTool=Sample Tree Generator ### Sample Text. {MaxLength=1000} \ No newline at end of file diff --git a/tree-generator/tree-generator.ts b/tree-generator/tree-generator.ts index 3b2e37a..ebb9cef 100644 --- a/tree-generator/tree-generator.ts +++ b/tree-generator/tree-generator.ts @@ -339,6 +339,8 @@ function addToolSettingsPane(uiSession: IPlayerUISession, tool: IModalTool) { uiSession.extensionContext.transactionManager.commitOpenTransaction(); }; + pane.beginConstruct(); + // Add a dropdown for available tree types pane.addDropdown(settings.treeType, { title: 'sample.treegenerator.pane.type', @@ -381,7 +383,8 @@ function addToolSettingsPane(uiSession: IPlayerUISession, tool: IModalTool) { ); tool.bindPropertyPane(pane); - pane.hide(); + pane.endConstruct(); + // Create an action that will be executed on left mouse click const executeMouseAction = uiSession.actionManager.createAction({ actionType: ActionTypes.MouseRayCastAction, @@ -423,7 +426,7 @@ function addTool(uiSession: IPlayerUISession) { uiSession.inputManager.registerKeyBinding( EditorInputContext.GlobalToolMode, toolToggleAction, - { key: KeyboardKey.KEY_T, modifier: InputModifier.Control | InputModifier.Shift }, + { key: KeyboardKey.KEY_T, modifier: InputModifier.Control | InputModifier.Shift | InputModifier.Alt }, { uniqueId: 'editorSamples:treeGenerator:toggleTool', label: 'sample.treegenerator.keyBinding.toggleTool' } );