Skip to content

Commit

Permalink
changed
Browse files Browse the repository at this point in the history
  • Loading branch information
ErrorRExorY committed Feb 16, 2024
1 parent bf7a394 commit 1cf894a
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions web/src/assets/Components/InfoHud.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,12 @@ const AmmoIcon = () => <svg width="15" height="11" viewBox="0 0 15 11" fill="non
</svg>

const FirstRow = (props) =>{
const hudStorageState = useHudStorageState();
const backgroundStyle = {
backgroundImage: `url('${hudStorageState.hud.backgroundImageUrl}')`,
backgroundImage: `url(${props.backgroundImageUrl})`,
backgroundSize: 'cover',
backgroundPosition: 'center',
backgroundRepeat: 'no-repeat',
// Füge hier weitere Styles hinzu, wenn nötig
};

// Für eine Farbe
const backgroundColorStyle = {
backgroundColor: '#ff0000'
backgroundRepeat: 'no-repeat'
};


return(
<Show keyed when={!props?.hide}>
<div className="flex gap-2 mb-4" style={backgroundStyle}>
Expand Down Expand Up @@ -176,7 +167,7 @@ export const InfoHud = (props) => {

return (
<div className="flex flex-col gap-2 w-48 absolute right-0 top-6">
<FirstRow hide={settings().Info} playerId={hud().playerId} onlinePlayers={hud().onlinePlayers} serverLogo={serverLogo()}/>
<FirstRow hide={settings().Info} backgroundImageUrl={hud().backgroundImageUrl} playerId={hud().playerId} onlinePlayers={hud().onlinePlayers} serverLogo={serverLogo()}/>
<SecondRow hide={settings().Money} bank={hudStorageState.hud.moneys.bank} money={moneys().money} jobLabel={job()} />
<ThirdRow hide={settings().Weapon} use={hud().weaponData?.use} name={weapon().name} image={weapon().image} currentAmmo={weapon().currentAmmo} isWeaponMelee={weapon().isWeaponMelee} maxAmmo={weapon().maxAmmo}/>
</div>
Expand Down

0 comments on commit 1cf894a

Please sign in to comment.