mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-20 07:26:19 +00:00
Merge pull request #77 from duckietm/Dev
↔️ Lets also make the highscore moveable
This commit is contained in:
@@ -1,11 +1,10 @@
|
|||||||
import { RoomObjectCategory } from '@nitrots/nitro-renderer';
|
import { RoomObjectCategory } from '@nitrots/nitro-renderer';
|
||||||
import { FC } from 'react';
|
import { FC } from 'react';
|
||||||
import { LocalizeText } from '../../../../api';
|
import { LocalizeText } from '../../../../api';
|
||||||
import { Column, Text } from '../../../../common';
|
import { Column, DraggableWindow, Text } from '../../../../common';
|
||||||
import { useFurnitureHighScoreWidget } from '../../../../hooks';
|
import { useFurnitureHighScoreWidget } from '../../../../hooks';
|
||||||
import { ContextMenuHeaderView } from '../context-menu/ContextMenuHeaderView';
|
import { ContextMenuHeaderView } from '../context-menu/ContextMenuHeaderView';
|
||||||
import { ContextMenuListView } from '../context-menu/ContextMenuListView';
|
import { ContextMenuListView } from '../context-menu/ContextMenuListView';
|
||||||
import { ObjectLocationView } from '../object-location/ObjectLocationView';
|
|
||||||
|
|
||||||
export const FurnitureHighScoreView: FC<{}> = props =>
|
export const FurnitureHighScoreView: FC<{}> = props =>
|
||||||
{
|
{
|
||||||
@@ -18,9 +17,9 @@ export const FurnitureHighScoreView: FC<{}> = props =>
|
|||||||
{ Array.from(stuffDatas.entries()).map(([ objectId, stuffData ], index) =>
|
{ Array.from(stuffDatas.entries()).map(([ objectId, stuffData ], index) =>
|
||||||
{
|
{
|
||||||
return (
|
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 }>
|
<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) }`) ]) }
|
{ LocalizeText('high.score.display.caption', [ 'scoretype', 'cleartype' ], [ LocalizeText(`high.score.display.scoretype.${ getScoreType(stuffData.scoreType) }`), LocalizeText(`high.score.display.cleartype.${ getClearType(stuffData.clearType) }`) ]) }
|
||||||
</ContextMenuHeaderView>
|
</ContextMenuHeaderView>
|
||||||
<ContextMenuListView className="!h-auto" gap={ 1 } overflow="hidden">
|
<ContextMenuListView className="!h-auto" gap={ 1 } overflow="hidden">
|
||||||
@@ -52,7 +51,7 @@ export const FurnitureHighScoreView: FC<{}> = props =>
|
|||||||
</Column>
|
</Column>
|
||||||
</ContextMenuListView>
|
</ContextMenuListView>
|
||||||
</Column>
|
</Column>
|
||||||
</ObjectLocationView>
|
</DraggableWindow>
|
||||||
);
|
);
|
||||||
}) }
|
}) }
|
||||||
</>
|
</>
|
||||||
|
|||||||
Reference in New Issue
Block a user