mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-19 15:06:20 +00:00
↔️ Lets also make the highscore moveable
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
import { RoomObjectCategory } from '@nitrots/nitro-renderer';
|
||||
import { FC } from 'react';
|
||||
import { LocalizeText } from '../../../../api';
|
||||
import { Column, Text } from '../../../../common';
|
||||
import { Column, DraggableWindow, Text } from '../../../../common';
|
||||
import { useFurnitureHighScoreWidget } from '../../../../hooks';
|
||||
import { ContextMenuHeaderView } from '../context-menu/ContextMenuHeaderView';
|
||||
import { ContextMenuListView } from '../context-menu/ContextMenuListView';
|
||||
import { ObjectLocationView } from '../object-location/ObjectLocationView';
|
||||
|
||||
export const FurnitureHighScoreView: FC<{}> = props =>
|
||||
{
|
||||
@@ -18,9 +17,9 @@ export const FurnitureHighScoreView: FC<{}> = props =>
|
||||
{ Array.from(stuffDatas.entries()).map(([ objectId, stuffData ], index) =>
|
||||
{
|
||||
return (
|
||||
<ObjectLocationView key={ index } category={ RoomObjectCategory.FLOOR } objectId={ objectId }>
|
||||
<DraggableWindow key={ index } uniqueKey={ `high-score-${ objectId }` }>
|
||||
<Column className="nitro-widget-high-score nitro-context-menu bg-[#1e1f23] p-2 w-[280px] max-w-[280px] h-[320px]" gap={ 0 }>
|
||||
<ContextMenuHeaderView>
|
||||
<ContextMenuHeaderView classNames={ [ 'drag-handler cursor-move' ] }>
|
||||
{ LocalizeText('high.score.display.caption', [ 'scoretype', 'cleartype' ], [ LocalizeText(`high.score.display.scoretype.${ getScoreType(stuffData.scoreType) }`), LocalizeText(`high.score.display.cleartype.${ getClearType(stuffData.clearType) }`) ]) }
|
||||
</ContextMenuHeaderView>
|
||||
<ContextMenuListView className="!h-auto" gap={ 1 } overflow="hidden">
|
||||
@@ -52,7 +51,7 @@ export const FurnitureHighScoreView: FC<{}> = props =>
|
||||
</Column>
|
||||
</ContextMenuListView>
|
||||
</Column>
|
||||
</ObjectLocationView>
|
||||
</DraggableWindow>
|
||||
);
|
||||
}) }
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user