Skip to content

Commit ff55b8b

Browse files
committed
Merge tutorials and video tutorials in a single tab in the Create Project window
1 parent a98a855 commit ff55b8b

File tree

8 files changed

+230
-189
lines changed

8 files changed

+230
-189
lines changed
36.7 KB
Loading
27.3 KB
Loading
18.5 KB
Loading
85.6 KB
Loading

newIDE/app/src/Hints/index.js

Lines changed: 72 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import { t } from '@lingui/macro';
33
import { type MessageDescriptor } from '../Utils/i18n/MessageDescriptor.flow';
44
import { type AlertMessageIdentifier } from '../MainFrame/Preferences/PreferencesContext';
5+
import { getHelpLink } from '../Utils/HelpLink';
56

67
export type Hint = {|
78
kind: 'warning' | 'info',
@@ -12,9 +13,10 @@ export type TutorialHint = {|
1213
kind: 'tutorial' | 'video-tutorial',
1314
name: string,
1415
message: MessageDescriptor,
15-
iconSrc: string,
16+
iconSrc: ?string,
1617
link: string,
1718
identifier: string,
19+
featuredForGettingStarted?: boolean,
1820
|};
1921

2022
export const getDeprecatedBehaviorsInformation = (): {
@@ -132,6 +134,75 @@ export const getExtraInstructionInformation = (type: string): ?Hint => {
132134
};
133135

134136
const tutorialHints = {
137+
'geometry-monster': {
138+
kind: 'tutorial',
139+
iconSrc: 'res/tutorial_icons/geometry-monster.png',
140+
name: 'Geometry Monster Tutorial',
141+
message: t`Make a hyper-casual mobile game where the player must grab shapes and avoid bombs.`,
142+
link: getHelpLink('/tutorials/geometry-monster'),
143+
identifier: 'geometry-monster',
144+
featuredForGettingStarted: true,
145+
},
146+
platformer: {
147+
kind: 'tutorial',
148+
iconSrc: 'res/tutorial_icons/platformer.png',
149+
name: 'Platformer Tutorial',
150+
message: t`Make a platform game from scratch.`,
151+
link: getHelpLink('/tutorials/platformer/start'),
152+
identifier: 'platformer',
153+
featuredForGettingStarted: true,
154+
},
155+
'space-shooter': {
156+
kind: 'tutorial',
157+
iconSrc: 'res/tutorial_icons/space-shooter.png',
158+
name: 'Space Shooter Tutorial',
159+
message: t`Make a space shooter game from scratch.`,
160+
link: getHelpLink('/tutorials/space-shooter'),
161+
identifier: 'space-shooter',
162+
featuredForGettingStarted: true,
163+
},
164+
'simple-game-physics-particles': {
165+
kind: 'video-tutorial',
166+
iconSrc: 'res/tutorial_icons/simple-game-physics-particles.jpg',
167+
name: 'How to Create a Simple Game with Physics and Particles',
168+
message: t`Create a game from scratch using physics and particles.`,
169+
link: 'https://www.youtube.com/watch?v=w8B84Dpgkjc',
170+
identifier: 'simple-game-physics-particles',
171+
featuredForGettingStarted: true,
172+
},
173+
'tank-shooter': {
174+
kind: 'tutorial',
175+
iconSrc: null,
176+
name: 'Tank Shooter Tutorial',
177+
message: t`Make a simple tank shooter game from scratch.`,
178+
link: getHelpLink('/tutorials/tank-shooter'),
179+
identifier: 'tank-shooter',
180+
},
181+
'endless-runner': {
182+
kind: 'tutorial',
183+
iconSrc: null,
184+
name: 'Endless Runner Tutorial',
185+
message: t`Make a simple game where the player must jump on platforms for as long as possible.`,
186+
link: getHelpLink('/tutorials/endless-runner'),
187+
identifier: 'endless-runner',
188+
},
189+
'endless-car-game': {
190+
kind: 'tutorial',
191+
iconSrc: null,
192+
name: 'Endless Car Game Tutorial',
193+
message: t`Create a simple game where you must dodge the cars on the road.`,
194+
link: getHelpLink('/tutorials/roadrider'),
195+
identifier: 'endless-car-game',
196+
},
197+
'breakout-tutorial': {
198+
kind: 'tutorial',
199+
iconSrc: null,
200+
name: 'Breakout Tutorial',
201+
message: t`Create a simple breakout game where you must destroy all the bricks on the screen.`,
202+
link: getHelpLink('/tutorials/breakout'),
203+
identifier: 'breakout-tutorial',
204+
},
205+
135206
'screen-shake-timer-variables': {
136207
kind: 'video-tutorial',
137208
iconSrc: 'res/tutorial_icons/screen-shake-timer-variables.jpg',

newIDE/app/src/ProjectCreation/CreateProjectDialog.js

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import { Trans } from '@lingui/macro';
44
import * as React from 'react';
55
import Dialog from '../UI/Dialog';
66
import FlatButton from '../UI/FlatButton';
7+
import ScrollView from '../UI/ScrollView';
78
import { Tabs, Tab } from '../UI/Tabs';
89
import Tutorials from './Tutorials';
910
import { Column } from '../UI/Grid';
10-
import { VideoTutorials } from './VideoTutorials';
1111
import { type StorageProvider, type FileMetadata } from '../ProjectsStorage';
1212

1313
type State = {|
@@ -78,34 +78,41 @@ export default class CreateProjectDialog extends React.Component<Props, State> {
7878
onRequestClose={onClose}
7979
open={open}
8080
noMargin
81+
flexBody
8182
>
82-
<Column noMargin>
83+
<Column expand noMargin>
8384
<Tabs value={this.state.currentTab} onChange={this._onChangeTab}>
8485
<Tab label={<Trans>Starters</Trans>} value="starters" />
8586
<Tab label={<Trans>Examples</Trans>} value="examples" />
8687
<Tab label={<Trans>Tutorials</Trans>} value="tutorials" />
87-
<Tab label={<Trans>Videos</Trans>} value="video-tutorials" />
8888
</Tabs>
8989
{this.state.currentTab === 'starters' && (
90-
<StartersComponent
91-
onOpen={onOpen}
92-
onCreate={onCreate}
93-
onChangeOutputPath={outputPath => this.setState({ outputPath })}
94-
onShowExamples={this._showExamples}
95-
outputPath={this.state.outputPath}
96-
/>
90+
<ScrollView>
91+
<StartersComponent
92+
onOpen={onOpen}
93+
onCreate={onCreate}
94+
onChangeOutputPath={outputPath => this.setState({ outputPath })}
95+
onShowExamples={this._showExamples}
96+
outputPath={this.state.outputPath}
97+
/>
98+
</ScrollView>
9799
)}
98100
{this.state.currentTab === 'examples' && (
99-
<ExamplesComponent
100-
onOpen={onOpen}
101-
onCreate={onCreate}
102-
onChangeOutputPath={outputPath => this.setState({ outputPath })}
103-
onExamplesLoaded={this._onExamplesLoaded}
104-
outputPath={this.state.outputPath}
105-
/>
101+
<ScrollView>
102+
<ExamplesComponent
103+
onOpen={onOpen}
104+
onCreate={onCreate}
105+
onChangeOutputPath={outputPath => this.setState({ outputPath })}
106+
onExamplesLoaded={this._onExamplesLoaded}
107+
outputPath={this.state.outputPath}
108+
/>
109+
</ScrollView>
110+
)}
111+
{this.state.currentTab === 'tutorials' && (
112+
<ScrollView>
113+
<Tutorials />
114+
</ScrollView>
106115
)}
107-
{this.state.currentTab === 'tutorials' && <Tutorials />}
108-
{this.state.currentTab === 'video-tutorials' && <VideoTutorials />}
109116
</Column>
110117
</Dialog>
111118
);

0 commit comments

Comments
 (0)