mirror of
https://github.com/4ian/GDevelop.git
synced 2025-10-15 10:19:04 +00:00
Put the button to restore the default collision mask in a split menu
This is because its usage is less frequent, so it does not eat the bottom space. We can also now delete all polygons to restore the default masks, so its usage will decrease.
This commit is contained in:
@@ -25,7 +25,7 @@ import AddIcon from '@material-ui/icons/Add';
|
||||
import FlatButton from '../../../../UI/FlatButton';
|
||||
import { Trans, t } from '@lingui/macro';
|
||||
import { Column, Line, Spacer } from '../../../../UI/Grid';
|
||||
import RaisedButton from '../../../../UI/RaisedButton';
|
||||
import RaisedButtonWithSplitMenu from '../../../../UI/RaisedButtonWithSplitMenu';
|
||||
import AlertMessage from '../../../../UI/AlertMessage';
|
||||
import GDevelopThemeContext from '../../../../UI/Theme/ThemeContext';
|
||||
import ScrollView from '../../../../UI/ScrollView';
|
||||
@@ -250,13 +250,19 @@ const PolygonsList = (props: PolygonsListProps) => {
|
||||
</ScrollView>
|
||||
<Column>
|
||||
<Line alignItems="center" justifyContent="center">
|
||||
<RaisedButton
|
||||
<RaisedButtonWithSplitMenu
|
||||
primary
|
||||
icon={<AddIcon />}
|
||||
label={<Trans>Add collision mask</Trans>}
|
||||
onClick={() => {
|
||||
addCollisionMask();
|
||||
}}
|
||||
buildMenuTemplate={i18n => [
|
||||
{
|
||||
label: i18n._(t`Restore the default collision mask`),
|
||||
click: restoreCollisionMask,
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</Line>
|
||||
</Column>
|
||||
|
@@ -250,13 +250,6 @@ const CollisionMasksEditor = (props: Props) => {
|
||||
spriteWidth={spriteWidth}
|
||||
spriteHeight={spriteHeight}
|
||||
/>
|
||||
<Line justifyContent="center">
|
||||
<FlatButton
|
||||
label={<Trans>Restore the default collision mask</Trans>}
|
||||
primary={false}
|
||||
onClick={() => onSetCollisionMaskAutomatic(true)}
|
||||
/>
|
||||
</Line>
|
||||
</React.Fragment>
|
||||
)}
|
||||
{!!sprite && sprite.isCollisionMaskAutomatic() && (
|
||||
|
Reference in New Issue
Block a user