Skip to content

Commit 1207dac

Browse files
Support global prop on play sound action (#1120)
* feat: support global prop on play sound action * feat: update pacjkage json * feat: update package json and fix issues * feat: install asset packs version * feat: update asset pack version * feat: install asset packs version on inspector * feat: remove asset packs from root package.json * feat: update package-lock
1 parent 56961d7 commit 1207dac

File tree

7 files changed

+45
-23
lines changed

7 files changed

+45
-23
lines changed

package-lock.json

Lines changed: 20 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@dcl/inspector/package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@dcl/inspector/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@dcl/inspector",
33
"version": "0.1.0",
44
"dependencies": {
5-
"@dcl/asset-packs": "2.4.0",
5+
"@dcl/asset-packs": "2.4.1",
66
"ts-deepmerge": "^7.0.0"
77
},
88
"devDependencies": {

packages/@dcl/inspector/src/components/EntityInspector/ActionInspector/PlaySoundAction/PlaySoundAction.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { useAppSelector } from '../../../../redux/hooks'
66
import { selectAssetCatalog } from '../../../../redux/app'
77

88
import { isAudio, isValidVolume, volumeToAudioSource, volumeFromAudioSource } from '../../AudioSourceInspector/utils'
9-
import { Dropdown, RangeField, InfoTooltip, FileUploadField } from '../../../ui'
9+
import { Dropdown, RangeField, InfoTooltip, FileUploadField, CheckboxField } from '../../../ui'
1010
import { ACCEPTED_FILE_TYPES } from '../../../ui/FileUploadField/types'
1111

1212
import { isValid } from './utils'
@@ -67,6 +67,13 @@ const PlaySoundAction: React.FC<Props> = ({ value, onUpdate }: Props) => {
6767
[payload, setPayload]
6868
)
6969

70+
const handleChangeGlobal = useCallback(
71+
(e: React.ChangeEvent<HTMLInputElement>) => {
72+
setPayload({ ...payload, global: e.target.checked })
73+
},
74+
[payload, setPayload]
75+
)
76+
7077
const error = useMemo(() => {
7178
if (!files || !payload.src) {
7279
return false
@@ -109,6 +116,9 @@ const PlaySoundAction: React.FC<Props> = ({ value, onUpdate }: Props) => {
109116
isValidValue={isValidVolume}
110117
/>
111118
</div>
119+
<div className="row">
120+
<CheckboxField label="Global" checked={!!payload.global} onChange={handleChangeGlobal} />
121+
</div>
112122
</div>
113123
</div>
114124
)

packages/@dcl/inspector/src/components/EntityInspector/AdminToolkitView/VideoControl/VideoControl.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
.ScreenSetup {
1414
display: flex;
1515
flex-direction: row;
16-
label {
16+
.Label {
1717
margin-left: 8px;
1818
text-wrap: wrap;
1919
width: 80%;

packages/@dcl/inspector/src/components/EntityInspector/SmartItemBasicView/VideoScreenBasicView/VideoScreenBasicView.css

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
display: flex;
88
flex-direction: row;
99
margin-bottom: 8px;
10-
label {
11-
margin-left: 8px;
12-
text-wrap: wrap;
13-
width: 80%;
14-
}
10+
.Label {
11+
margin-left: 8px;
12+
text-wrap: wrap;
13+
width: 80%;
14+
}
1515
}
1616

1717
.Title {
@@ -56,4 +56,4 @@
5656
font-size: 11px;
5757
}
5858
}
59-
}
59+
}

packages/@dcl/sdk-commands/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)