-
Notifications
You must be signed in to change notification settings - Fork 916
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more visible placeholder when no effects are present, with help b…
…utton
- Loading branch information
Showing
10 changed files
with
246 additions
and
206 deletions.
There are no files selected for viewing
52 changes: 19 additions & 33 deletions
52
newIDE/app/src/BehaviorsEditor/EmptyBehaviorsPlaceholder.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,29 @@ | ||
// @flow | ||
import { Trans } from '@lingui/macro'; | ||
|
||
import * as React from 'react'; | ||
import HelpButton from '../UI/HelpButton'; | ||
import Text from '../UI/Text'; | ||
import Paper from '@material-ui/core/Paper'; | ||
import { Line, Column } from '../UI/Grid'; | ||
import { EmptyPlaceholder } from '../UI/EmptyPlaceholder'; | ||
|
||
const EmptyBehaviorsPlaceholder = () => ( | ||
<Column alignItems="center"> | ||
<Paper | ||
variant="outlined" | ||
style={{ | ||
maxWidth: '450px', | ||
whiteSpace: 'normal', | ||
}} | ||
> | ||
<Column> | ||
<Text> | ||
<Trans>There are no behaviors here.</Trans> | ||
</Text> | ||
<Text> | ||
<Trans> | ||
Behaviors are predefined actions that are assigned to objects. | ||
Behaviors can have no or multiple parameters. | ||
</Trans> | ||
</Text> | ||
<Text> | ||
<Trans> | ||
Add your first behavior using the button "Add a behavior to the | ||
object". | ||
</Trans> | ||
</Text> | ||
<Line expand justifyContent="flex-end"> | ||
<HelpButton helpPagePath="/behaviors" /> | ||
</Line> | ||
</Column> | ||
</Paper> | ||
</Column> | ||
<EmptyPlaceholder | ||
renderButtons={() => <HelpButton helpPagePath="/behaviors" />} | ||
> | ||
<Text> | ||
<Trans>There are no behaviors here.</Trans> | ||
</Text> | ||
<Text> | ||
<Trans> | ||
Behaviors are predefined actions that are assigned to objects. Behaviors | ||
can have no or multiple parameters. | ||
</Trans> | ||
</Text> | ||
<Text> | ||
<Trans> | ||
Add your first behavior using the button "Add a behavior to the object". | ||
</Trans> | ||
</Text> | ||
</EmptyPlaceholder> | ||
); | ||
|
||
export default EmptyBehaviorsPlaceholder; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// @flow | ||
import { Trans } from '@lingui/macro'; | ||
import * as React from 'react'; | ||
import HelpButton from '../UI/HelpButton'; | ||
import Text from '../UI/Text'; | ||
import { EmptyPlaceholder } from '../UI/EmptyPlaceholder'; | ||
|
||
type Props = {| | ||
target: 'object' | 'layer', | ||
|}; | ||
|
||
export const EmptyEffectsPlaceholder = (props: Props) => ( | ||
<EmptyPlaceholder | ||
renderButtons={() => ( | ||
<HelpButton | ||
helpPagePath={ | ||
props.target === 'object' | ||
? '/objects/effects' | ||
: '/interface/scene-editor/layer-effects' | ||
} | ||
/> | ||
)} | ||
> | ||
<Text> | ||
<Trans> | ||
Effects can change how layers or objects are rendered on screen. | ||
</Trans> | ||
</Text> | ||
<Text> | ||
<Trans> | ||
After adding an effect, set up its parameters. Launch a preview to see | ||
the result. Using the events and the name of the effect, you can change | ||
the parameters during the game. | ||
</Trans> | ||
</Text> | ||
</EmptyPlaceholder> | ||
); |
Oops, something went wrong.