diff --git a/tgui/packages/tgui/interfaces/SoundPanel.tsx b/tgui/packages/tgui/interfaces/SoundPanel.tsx
index cee18b9630..899a4be58a 100644
--- a/tgui/packages/tgui/interfaces/SoundPanel.tsx
+++ b/tgui/packages/tgui/interfaces/SoundPanel.tsx
@@ -1,8 +1,17 @@
-import { useBackend, useLocalState } from 'tgui/backend';
-import { Box, Button, Dropdown, Input, Section, Slider, Stack, Tabs } from 'tgui/components';
-import { Window } from 'tgui/layouts';
-import { Component } from 'react';
import { debounce } from 'common/timer';
+import { Component, useState } from 'react';
+import { useBackend } from 'tgui/backend';
+import {
+ Box,
+ Button,
+ Dropdown,
+ Input,
+ Section,
+ Slider,
+ Stack,
+ Tabs,
+} from 'tgui/components';
+import { Window } from 'tgui/layouts';
interface SoundPanelData {
sound_list: string[];
@@ -10,7 +19,7 @@ interface SoundPanelData {
zlevel_list: string[];
group_list: string[];
sound_path: string;
- sound_category: number;
+ sound_category: string;
sound_volume: number;
sound_pitch: number;
sound_duration: number;
@@ -44,9 +53,8 @@ export const SoundPanel = () => {
component: ,
},
];
- const [tabIndex, setTabIndex] = useLocalState(
- 'tabIndex',
- PAGES.findIndex((page) => page.title === 'Local')
+ const [tabIndex, setTabIndex] = useState(
+ PAGES.findIndex((page) => page.title === 'Local'),
);
return (
@@ -77,7 +85,8 @@ export const SoundPanel = () => {
setTabIndex(i)}>
+ onClick={() => setTabIndex(i)}
+ >
{page.title}
);
@@ -170,7 +179,6 @@ class ListSearchBox extends Component {
return (
@@ -229,12 +240,13 @@ const SoundOptions = () => {
Category
act('set_sound_category', { sound_category: value })
}
options={category_list}
selected={sound_category}
+ menuWidth="100px"
+ width="100px"
/>
@@ -294,16 +306,15 @@ const SoundOptions = () => {
-
@@ -319,7 +330,7 @@ const ClientPage = () => {
return (
- act('select_client')} />
+ act('select_client')}>Select Client
{target_player_desc || 'N/A'}
@@ -328,9 +339,10 @@ const ClientPage = () => {
act('play_client')}
- />
+ >
+ Play to Client
+
);
@@ -347,17 +359,19 @@ const LocalPage = () => {
act('toggle_loc_click_intercept')}
- />
+ >
+ Click Target
+
act('toggle_loc_click_play')}
- />
+ >
+ Play on Click
+
@@ -368,9 +382,10 @@ const LocalPage = () => {
act('play_local')}
- />
+ >
+ Play Locally
+
);
@@ -389,8 +404,8 @@ const ZLevelPage = () => {
onSelected={(value) =>
act('set_target_zlevel', { target_zlevel: value })
}
+ menuWidth="180px"
width="180px"
- noscroll
over
/>
@@ -398,9 +413,10 @@ const ZLevelPage = () => {
act('play_zlevel')}
- />
+ >
+ Play to ZLevel
+
);
@@ -419,8 +435,8 @@ const ServerPage = () => {
onSelected={(value) =>
act('set_target_group', { target_group: value })
}
+ menuWidth="80px"
width="80px"
- noscroll
over
/>
@@ -428,9 +444,10 @@ const ServerPage = () => {
act('play_group')}
- />
+ >
+ Play to Group
+
);