Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a new in app tutorial for the Tilemap object and his events. #6989

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions newIDE/app/src/InstancesEditor/TileSetVisualizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,7 @@ const TileSetVisualizer = ({
<Line justifyContent="space-between" noMargin>
<LineStackLayout alignItems="center" noMargin>
<IconButton
id="paintBrush"
size="small"
tooltip={t`Paint`}
selected={
Expand All @@ -672,6 +673,7 @@ const TileSetVisualizer = ({
<Brush style={styles.icon} />
</IconButton>
<IconButton
id="horizontalFlip"
size="small"
tooltip={t`Horizontal flip`}
selected={shouldFlipHorizontally}
Expand All @@ -696,6 +698,7 @@ const TileSetVisualizer = ({
<FlipHorizontal style={styles.icon} />
</IconButton>
<IconButton
id="verticalFlip"
size="small"
tooltip={t`Vertical flip`}
selected={shouldFlipVertically}
Expand All @@ -721,6 +724,7 @@ const TileSetVisualizer = ({
</IconButton>
</LineStackLayout>
<IconButton
id="eraseBrush"
size="small"
tooltip={t`Erase`}
selected={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ import {
OBJECT_3D_IN_APP_TUTORIAL_ID,
KNIGHT_PLATFORMER_IN_APP_TUTORIAL_ID,
TOP_DOWN_RPG_MOVEMENT_ID,
FIRE_A_BULLET,
COOP_PLATFORMER,
FIRE_A_BULLET_ID,
COOP_PLATFORMER_ID,
TILEMAP_PLATFORMER_ID,
guidedLessonsIds,
} from '../../../../Utils/GDevelopServices/InAppTutorial';
import MultiplierScore from './Icons/MultiplierScore';
Expand All @@ -42,6 +43,7 @@ import Platformer from './Icons/Platformer';
import TopDownRPGMovement from './Icons/TopDownRPGMovement';
import FireABullet from './Icons/FireAbullet';
import CoopPlatformer from './Icons/CoopPlatformer';
import TilemapPlatformer from './Icons/TilemapPlatformer';

const getColumnsFromWindowSize = (
windowSize: WindowSizeType,
Expand Down Expand Up @@ -178,19 +180,26 @@ const GuidedLessons = ({ selectInAppTutorial, lessonsIds }: Props) => {
renderImage: props => <TopDownRPGMovement {...props} />,
},
{
id: FIRE_A_BULLET,
id: FIRE_A_BULLET_ID,
title: t`Fire a Bullet`,
description: t`Learn how to fire bullets with the help of a behavior. Get ready for a Star Wars show.`,
durationInMinutes: 3,
renderImage: props => <FireABullet {...props} />,
},
{
id: COOP_PLATFORMER,
id: COOP_PLATFORMER_ID,
title: t`The basics of Multiplayer`,
description: t`Learn how to use the multiplayer behavior and the ownership system in this co-op platformer.`,
durationInMinutes: 3,
renderImage: props => <CoopPlatformer {...props} />,
},
{
id: TILEMAP_PLATFORMER_ID,
title: t`The basics of Tilemap`,
description: t`Learn how to use the tilemap object and the event that goes with it.`,
durationInMinutes: 1,
renderImage: props => <TilemapPlatformer {...props} />,
},
].filter(item => displayedGuidedLessonsIds.includes(item.id));

return (
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import React from 'react';
import SvgIcon from '@material-ui/core/SvgIcon';

export default React.memo(props => (
<SvgIcon
{...props}
width="120"
height="138"
viewBox="0 0 120 138"
fill="none"
>
<rect x="13" y="72" width="23.25" height="23.25" fill="#FFC2B4" />
<rect x="82.75" y="48.75" width="23.25" height="23.25" fill="#FFC2B4" />
<rect x="82.75" y="95.25" width="23.25" height="23.25" fill="#FFC2B4" />
<rect x="59.5" y="25.5" width="23.25" height="23.25" fill="#FFC2B4" />
<rect x="59.5" y="72" width="23.25" height="23.25" fill="#FFC2B4" />
<rect x="36.25" y="48.75" width="23.25" height="23.25" fill="#FFC2B4" />
<rect x="36.25" y="95.25" width="23.25" height="23.25" fill="#FFC2B4" />
<rect x="36.25" y="72" width="23.25" height="23.25" fill="#FF8569" />
<rect x="13" y="95.25" width="23.25" height="23.25" fill="#FF8569" />
<rect x="82.75" y="25.5" width="23.25" height="23.25" fill="#FF8569" />
<rect x="82.75" y="72" width="23.25" height="23.25" fill="#FF8569" />
<rect x="59.5" y="48.75" width="23.25" height="23.25" fill="#FF8569" />
<rect x="59.5" y="95.25" width="23.25" height="23.25" fill="#FF8569" />
</SvgIcon>
));
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ const SimpleTileMapEditor = ({
<SemiControlledTextField
floatingLabelFixed
floatingLabelText={<Trans>Tile size</Trans>}
id="tileSize"
onChange={value => setTileSize(Math.max(parseInt(value, 10) || 0, 0))}
value={tileSize.toString()}
/>
Expand Down
10 changes: 6 additions & 4 deletions newIDE/app/src/Utils/GDevelopServices/InAppTutorial.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ export const TIMER_IN_APP_TUTORIAL_ID = 'timer';
export const OBJECT_3D_IN_APP_TUTORIAL_ID = 'object3d';
export const KNIGHT_PLATFORMER_IN_APP_TUTORIAL_ID = 'knightPlatformer';
export const TOP_DOWN_RPG_MOVEMENT_ID = 'topDownRPGMovement';
export const FIRE_A_BULLET = 'fireABullet';
export const COOP_PLATFORMER = 'coopPlatformer';
export const FIRE_A_BULLET_ID = 'fireABullet';
export const COOP_PLATFORMER_ID = 'coopPlatformer';
export const TILEMAP_PLATFORMER_ID = 'tilemapPlatformer';

export const guidedLessonsIds = [
PLINKO_MULTIPLIER_IN_APP_TUTORIAL_ID,
Expand All @@ -26,8 +27,9 @@ export const guidedLessonsIds = [
OBJECT_3D_IN_APP_TUTORIAL_ID,
KNIGHT_PLATFORMER_IN_APP_TUTORIAL_ID,
TOP_DOWN_RPG_MOVEMENT_ID,
FIRE_A_BULLET,
COOP_PLATFORMER,
FIRE_A_BULLET_ID,
COOP_PLATFORMER_ID,
TILEMAP_PLATFORMER_ID,
];

export type InAppTutorialShortHeader = {|
Expand Down
Loading