mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
[MIRROR] Make middle clicks work in the new alt panel (#11178)
Co-authored-by: ShadowLarkens <shadowlarkens@gmail.com>
This commit is contained in:
committed by
GitHub
parent
a8bde62a71
commit
946406b6c8
@@ -1,3 +1,4 @@
|
||||
import { type MouseEvent } from 'react';
|
||||
import { useBackend } from 'tgui/backend';
|
||||
import { Button, Stack } from 'tgui-core/components';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
@@ -38,14 +39,15 @@ export function LootBox(props: Props) {
|
||||
p={0}
|
||||
fluid
|
||||
color="transparent"
|
||||
onClick={(event) =>
|
||||
onMouseDown={(event: MouseEvent) => {
|
||||
act('grab', {
|
||||
alt: event.altKey,
|
||||
ctrl: event.ctrlKey,
|
||||
ref: item.ref,
|
||||
shift: event.shiftKey,
|
||||
})
|
||||
}
|
||||
middle: event.button === 1,
|
||||
});
|
||||
}}
|
||||
onContextMenu={(event) => {
|
||||
event.preventDefault();
|
||||
act('grab', {
|
||||
|
||||
Reference in New Issue
Block a user