From 82f7cf13bb2af2c7e7a29ffd8a230dfacbb4464e Mon Sep 17 00:00:00 2001 From: object <110488133+oobjectt@users.noreply.github.com> Date: Fri, 27 Jan 2023 05:32:21 +0100 Subject: [PATCH] Feature - Mystery trophy (#135) --- .../mysterytrophy/frank_mystery_trophy.png | Bin 0 -> 1653 bytes .../FurnitureMysteryTrophyOpenDialogView.tsx | 50 ++++++++++++++ .../widgets/furniture/FurnitureWidgets.scss | 62 ++++++++++++++++++ .../context-menu/FurnitureContextMenuView.tsx | 14 +++- .../useFurnitureContextMenuWidget.ts | 19 +++++- 5 files changed, 143 insertions(+), 2 deletions(-) create mode 100644 src/assets/images/mysterytrophy/frank_mystery_trophy.png create mode 100644 src/components/room/widgets/furniture/FurnitureMysteryTrophyOpenDialogView.tsx diff --git a/src/assets/images/mysterytrophy/frank_mystery_trophy.png b/src/assets/images/mysterytrophy/frank_mystery_trophy.png new file mode 100644 index 0000000000000000000000000000000000000000..67bfeba771e24e4245a29e41e3a2e0b6eecc5c3e GIT binary patch literal 1653 zcmV-*28#KKP)Px#1ZP1_K>z@;j|==^1poj5fly3TMF0Q*_Q{j~=d`eTS+ILqy_tR2x1Q;%Z-Z4j z>8fwMg;0@aIaoI%D;^o3b5q@)b39)FQ-c5`kJ|GwhN>NgbjDTusTslBNCMqgdUtn5TN_Tf^Y;<-2003l9 z{e}Pl04sD-PE-H?|NsC0|NsC0|NsC0|NsC0|NsC0|NsC0|NsC0|NsC0|NsC0|NsC0 z03*q#&;S4c32;bRa{vGi!vFvd!vV){sAK>D1x86kK~z{rm6nTQ+BgtJC6Hoa#u zU5sHllX38Im0zYYAuVGy1M%VFR&`2g34%fdSaO?|(}=;tRrQ(x-n$fm6E`WR=`217 zXQ!(~Z6I?lFjHnAih~m8y~J081sLU_d0e)h zu#|VoAS|kt+W7|}9v*huVnElt}Z-gB0ataItX9zr; zSp`N*L5R-96nx_BAFkiwFUP=)c#jhJewLY~0LD2Ev8N!{Tvj?m>wALeQ(CUlGA5NJ{<$6O#5W5hvz8 zKYVfb_k}<>o5bQys|pL0qbY+@;;ISm?kvH5{rv3<2!-$6x={x*h!UbKDq5+yv$D?G z*RS8d2_e|tu`e(Wv??k{4B|tkN_T^&RYTe z_~D+P9;E}INIdgeX@FqQU93K&KKcceicBuH3GWPzy=r)5dOJDczXJ68T4jiCM`*tk+Mn%h|ML! zuYX^D9{?W&7`AJ2Sf#9PESd$9Eu{c~H$V#x;K(MILt{CSW13V;4fRTnXWs;LH&tFk+9-96Fy~j|d84Oi?06n#wDcTnLJ|bQ}>h5SrWi zAp;@aMvxG>)^^Ws#Waglp%yX1tSb64Fo_uZ%_i*K`+Eyyx7%!#QL(qT?R>)C z?Zi+Xn?IXBudkcU+Z#wD{Jd%(gl;EBw>3T5_FY%o-L#T&Fan6eXm#$|_pPyRs6yj8 zFckY%;q5%+3d9;jy7{qH>Kx%AuTl2hRBB%*C ziW(g+=IsR_Q!2glSyL{<>j_f`Qd$WEg0!w7O46vW5#*14hG4J)QA+J~0$wV-D5+8) z(3Ay3ysoBlkZGNw5DCJ(P*++ck^sIc1WJA|C`115B%mRnA9T+gyRM}E3j@zWFagMa zXKGxJF9c&q24!tJD2@*Cj)!u>JmjQWF=5Q_O*W00000NkvXXu0mjfcBS(| literal 0 HcmV?d00001 diff --git a/src/components/room/widgets/furniture/FurnitureMysteryTrophyOpenDialogView.tsx b/src/components/room/widgets/furniture/FurnitureMysteryTrophyOpenDialogView.tsx new file mode 100644 index 00000000..ab187f12 --- /dev/null +++ b/src/components/room/widgets/furniture/FurnitureMysteryTrophyOpenDialogView.tsx @@ -0,0 +1,50 @@ +import { OpenMysteryTrophyMessageComposer } from '@nitrots/nitro-renderer'; +import { FC, useState } from 'react'; +import { LocalizeText, SendMessageComposer } from '../../../../api'; +import { Button, Column, Flex, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../../../common'; + +interface FurnitureMysteryTrophyOpenDialogViewProps +{ + objectId: number; + onClose: () => void; +} + +export const FurnitureMysteryTrophyOpenDialogView: FC = props => +{ + const { objectId = -1, onClose = null } = props; + const [ description, setDescription ] = useState(''); + + const onConfirm = () => + { + SendMessageComposer(new OpenMysteryTrophyMessageComposer(objectId, description)); + onClose(); + } + + if(objectId === -1) return null; + + return ( + + + + +
+
+ { LocalizeText('mysterytrophy.header.description') } +
+
+ + + +