Skip to content

Commit

Permalink
Imrovement
Browse files Browse the repository at this point in the history
  • Loading branch information
DreamXZE committed Mar 26, 2023
1 parent 95944a9 commit d2dd119
Showing 1 changed file with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { FunctionComponent, useEffect, useState } from 'react';
import { useNavigate } from 'react-router-dom';

import { FfsComponent, Outfit, Prop } from '../../../shared/cloth';
import { NuiEvent } from '../../../shared/event';
Expand Down Expand Up @@ -79,6 +80,7 @@ export const FightForStyleShowRoomMenu: FunctionComponent<FightForStyleShowRoomC
const [shouldCraft, setshouldCraft] = useState<{ drawables: object; props: object }>();
const [description, setDescription] = useState<string>();
const [price, setPrice] = useState<number>();
const navigate = useNavigate();
const state = data.state;
const can_craft = data.can_craft;

Expand Down Expand Up @@ -109,6 +111,7 @@ export const FightForStyleShowRoomMenu: FunctionComponent<FightForStyleShowRoomC
} else {
await onPropChange(data.index, 'drawable', data.drawable);
}
navigate(-1);
}
);

Expand Down Expand Up @@ -194,9 +197,7 @@ export const FightForStyleShowRoomMenu: FunctionComponent<FightForStyleShowRoomC
👕 Vêtements, chaussures, masques et accessoires
</MenuItemSubMenuLink>
<MenuItemSubMenuLink id={'player_style_props'}>🎩 Autres accessoires</MenuItemSubMenuLink>
<MenuItemSubMenuLink id={'crafting_menu'} disabled={!can_craft}>
Selection et Confection des tenues
</MenuItemSubMenuLink>
<MenuItemSubMenuLink id={'crafting_menu'}>Selection et Confection des tenues</MenuItemSubMenuLink>
</MenuContent>
</MainMenu>
<SubMenu id={'player_style_components'}>
Expand All @@ -220,7 +221,7 @@ export const FightForStyleShowRoomMenu: FunctionComponent<FightForStyleShowRoomC
</MenuContent>
</SubMenu>
<SubMenu id="crafting_menu">
<MenuTitle banner={banner}></MenuTitle>
<MenuTitle banner={banner}>Selection et Confection des tenues</MenuTitle>
<MenuContent>
{Object.keys(currentCraft?.drawables || {}).map(componentIndex => (
<MenuItemCheckbox
Expand Down Expand Up @@ -277,6 +278,7 @@ export const FightForStyleShowRoomMenu: FunctionComponent<FightForStyleShowRoomC
onConfirm={async () => {
await fetchNui(NuiEvent.FfsMenuCraftOutfit);
}}
disabled={!can_craft}
>
{`Confectionner la tenue - ${price}$`}
</MenuItemButton>
Expand Down Expand Up @@ -331,6 +333,16 @@ export const FightForStyleShowRoomMenu: FunctionComponent<FightForStyleShowRoomC
</MenuItemSelectOption>
))}
</MenuItemSelect>
{parseInt(componentIndex) == FfsComponent.Undershirt ? (
<MenuItemButton
onConfirm={async () => {
await onComponentChange(componentIndex, 'drawable', 0);
await onComponentChange(componentIndex, 'texture', 25);
}}
>{`Retirer l'Undershirt`}</MenuItemButton>
) : (
<></>
)}
</MenuContent>
</SubMenu>
))}
Expand Down

0 comments on commit d2dd119

Please sign in to comment.