-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from dragoni7/36-improve-layout-for-loadout-sc…
…reen 36 improve layout for loadout screen
- Loading branch information
Showing
16 changed files
with
511 additions
and
640 deletions.
There are no files selected for viewing
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,65 @@ | ||
.back-button { | ||
position: absolute; | ||
top: 20px; | ||
left: 20px; | ||
background: rgba(0, 0, 0, 0.5); | ||
border: none; | ||
color: white; | ||
font-size: 16px; | ||
cursor: pointer; | ||
padding: 10px; | ||
border-radius: 5px; | ||
z-index: 1; | ||
} | ||
|
||
.submenu-grid { | ||
display: none; | ||
position: absolute; | ||
top: 100%; | ||
left: 0; | ||
background-color: rgba(0, 0, 0, 0.5); | ||
backdrop-filter: blur(10px); | ||
z-index: 10; | ||
flex-direction: row; | ||
flex-wrap: wrap; | ||
border-radius: 5px; | ||
border: none; | ||
padding: 0; | ||
margin: 0; | ||
width: 480px; | ||
} | ||
|
||
.fragment-slot:hover .submenu-grid, | ||
.other-slot:hover .submenu-grid, | ||
.selected-super:hover .submenu-grid, | ||
.aspect-slot:hover .submenu-grid { | ||
display: flex; | ||
z-index: 10; | ||
} | ||
|
||
.submenu-item { | ||
width: 80px; | ||
height: 80px; | ||
background-size: contain; | ||
background-repeat: no-repeat; | ||
background-position: center; | ||
cursor: pointer; | ||
position: relative; | ||
border: 1px solid rgba(255, 255, 255, 0.5); | ||
box-shadow: none; | ||
padding: 0; | ||
margin: 0; | ||
opacity: 0.99; | ||
z-index: 1000; | ||
} | ||
|
||
.submenu-item:hover::after { | ||
content: ''; | ||
position: absolute; | ||
top: -4px; | ||
left: -4px; | ||
right: -4px; | ||
bottom: -4px; | ||
border: 1px solid rgba(255, 255, 255, 1); | ||
z-index: -1; | ||
} |
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,81 @@ | ||
import React from 'react'; | ||
import './LoadoutCustomization.css'; | ||
import { Button, Box, Container, Grid } from '@mui/material'; | ||
import { styled } from '@mui/material/styles'; | ||
import ModCustomization from '../features/armor/components/ModCustomization'; | ||
import EquipLoadout from '../features/loadouts/components/EquipLoadout'; | ||
import AbilitiesModification from '../features/subclass/AbilitiesModification'; | ||
import { ManifestSubclass } from '../types/manifest-types'; | ||
|
||
interface LoadoutCustomizationProps { | ||
onBackClick: () => void; | ||
screenshot: string; | ||
subclass: ManifestSubclass; | ||
} | ||
|
||
const TransparentButton = styled(Button)(({ theme }) => ({ | ||
zIndex: 1000, | ||
background: 'transparent', | ||
color: 'white', | ||
padding: theme.spacing(1, 2), | ||
'&:hover': { | ||
background: 'rgba(255, 255, 255, 0.1)', | ||
}, | ||
'& .MuiButton-startIcon': { | ||
marginRight: theme.spacing(1), | ||
}, | ||
})); | ||
|
||
const LoadoutCustomization: React.FC<LoadoutCustomizationProps> = ({ | ||
onBackClick, | ||
screenshot, | ||
subclass, | ||
}) => { | ||
return ( | ||
<Box | ||
sx={{ | ||
width: '100vw', | ||
display: 'flex', | ||
flexGrow: 1, | ||
backgroundImage: `url(${screenshot})`, | ||
backgroundSize: 'cover', | ||
backgroundPosition: 'center', | ||
}} | ||
> | ||
<Grid container columns={2}> | ||
<Grid item md={1} sx={{ backgroundColor: 'rgba(0, 0, 0, 0.5)' }}> | ||
<TransparentButton | ||
onClick={onBackClick} | ||
startIcon={<span style={{ fontSize: '1.2em' }}>←</span>} | ||
> | ||
Back | ||
</TransparentButton> | ||
</Grid> | ||
<Grid item md={1} /> | ||
<Grid | ||
item | ||
md={1} | ||
sx={{ | ||
backgroundColor: 'rgba(0, 0, 0, 0.5)', | ||
}} | ||
> | ||
<Container maxWidth="lg"> | ||
<ModCustomization /> | ||
</Container> | ||
</Grid> | ||
<Grid item md={1}> | ||
<AbilitiesModification subclass={subclass} /> | ||
</Grid> | ||
<Grid item md={1} sx={{ backgroundColor: 'rgba(0, 0, 0, 0.5)', textAlign: 'center' }}> | ||
FREE SPACE FOR SOMETHING | ||
</Grid> | ||
<Grid item md={1} sx={{ textAlign: 'center' }}> | ||
<EquipLoadout /> | ||
SHARE LOADOUT BUTTON ? | ||
</Grid> | ||
</Grid> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default LoadoutCustomization; |
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
Oops, something went wrong.