Skip to content

Commit fcec3ee

Browse files
committed
Integrate the icon for global effect toggle
1 parent 1340910 commit fcec3ee

File tree

3 files changed

+33
-3
lines changed

3 files changed

+33
-3
lines changed

newIDE/app/src/LayersList/index.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ import { type ShowConfirmDeleteDialogOptions } from '../UI/Alert/AlertContext';
3838
import GDevelopThemeContext from '../UI/Theme/GDevelopThemeContext';
3939
import { type GDevelopTheme } from '../UI/Theme';
4040
import { type HTMLDataset } from '../Utils/HTMLDataset';
41-
import LightbulbIcon from '../UI/CustomSvgIcons/Lightbulb';
41+
import LightbulbIconOn from '../UI/CustomSvgIcons/LightbulbOn';
42+
import LightbulbIconOff from '../UI/CustomSvgIcons/LightbulbOff';
4243
import { mapReverseFor } from '../Utils/MapFor';
4344
import { addDefaultLightToLayer } from '../ProjectCreation/CreateProject';
4445

@@ -564,8 +565,11 @@ const LayersList = React.forwardRef<Props, LayersListInterface>(
564565
[
565566
gameEditorMode === 'embedded-game'
566567
? {
567-
// TODO Add an icon for the hidden state.
568-
icon: <LightbulbIcon />,
568+
icon: !project.areEffectsHiddenInEditor() ? (
569+
<LightbulbIconOn />
570+
) : (
571+
<LightbulbIconOff />
572+
),
569573
label: !project.areEffectsHiddenInEditor()
570574
? i18n._(t`Disable effects/lighting in the editor`)
571575
: i18n._(t`Display effects/lighting in the editor`),

newIDE/app/src/UI/CustomSvgIcons/LightbulbOff.js

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

newIDE/app/src/UI/CustomSvgIcons/LightbulbOn.js

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

0 commit comments

Comments
 (0)