Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions public/locales/en/menu.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@
"inavlid-ids": "Invalid layout file: All IDs must match panel IDs"
}
},
"idle-behavior-toggle": {
"label": "Idle behavior",
"idle-motion-toggle": {
"label": "Idle motion",
"info": {
"heading": "Idle behavior",
"heading": "Idle motion",
"description": [
"When enabled, the camera will auto-rotate around the current focus until the next navigation interaction.",
"Idle behavior can be set to trigger automatically after inactivity. See Orbital Navigator settings for this and other options, including speed."
"Idle motion can be set to trigger automatically after inactivity. See Orbital Navigator settings for this and other options, including speed."
],
"keybind-label": "Toggle keybind"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,25 @@ import { KeybindButtons } from '@/panels/KeybindsPanel/KeybindButtons';
import { useAppSelector } from '@/redux/hooks';
import styles from '@/theme/global.module.css';

export function IdleBehaviorToggle() {
const { t } = useTranslation('menu', { keyPrefix: 'idle-behavior-toggle' });
export function IdleMotionToggle() {
const { t } = useTranslation('menu', { keyPrefix: 'idle-motion-toggle' });

const [applyIdleBehavior, setApplyIdleBehavior] = useProperty(
const [applyIdleMotion, setApplyIdleMotion] = useProperty(
'BoolProperty',
'NavigationHandler.OrbitalNavigator.IdleBehavior.ApplyIdleBehavior'
'NavigationHandler.OrbitalNavigator.IdleMotion.Apply'
);

const keybinds = useAppSelector((state) => state.actions.keybinds);
const keybind = keybinds.find((keybind) => keybind.action === 'os.ToggleIdleBehavior');
const keybind = keybinds.find((keybind) => keybind.action === 'os.ToggleIdleMotion');

return (
<Group gap={'xs'} wrap={'nowrap'}>
<Chip
checked={applyIdleBehavior}
onChange={setApplyIdleBehavior}
checked={applyIdleMotion}
onChange={setApplyIdleMotion}
size={'xs'}
variant={applyIdleBehavior ? 'light' : 'transparent'}
className={applyIdleBehavior ? styles.blinking : undefined}
variant={applyIdleMotion ? 'light' : 'transparent'}
className={applyIdleMotion ? styles.blinking : undefined}
>
{t('label')}
</Chip>
Expand Down
4 changes: 2 additions & 2 deletions src/panels/Menu/TopMenuBar/TopMenuBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { FileMenu } from './Menus/FileMenu';
import { HelpMenu } from './Menus/HelpMenu';
import { ViewMenu } from './Menus/ViewMenu';
import { WindowsMenu } from './Menus/WindowsMenu';
import { IdleBehaviorToggle } from './IdleBehaviorToggle';
import { IdleMotionToggle } from './IdleMotionToggle';
// import { LocaleSwitcher } from './Menus/LocaleSwitcher';

export function TopMenuBar() {
Expand Down Expand Up @@ -37,7 +37,7 @@ export function TopMenuBar() {
</Box>
<Group flex={1} wrap={'nowrap'} align={'center'} justify={'end'} mr={'xs'}>
<Group gap={'lg'} wrap={'nowrap'}>
<IdleBehaviorToggle />
<IdleMotionToggle />
<Group wrap={'nowrap'} gap={'xs'}>
<FrictionControls size={'xs'} />
<InfoBox>
Expand Down
4 changes: 2 additions & 2 deletions src/panels/NavigationPanel/NavigationSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { SettingsPopout } from '@/components/SettingsPopout/SettingsPopout';
import { useAppDispatch, useAppSelector } from '@/redux/hooks';
import { setOnlyFocusableInNavMenu } from '@/redux/local/localSlice';
import {
ApplyIdleBehaviorOnPathFinishKey,
ApplyIdleMotionOnPathFinishKey,
CameraPathArrivalDistanceFactorKey,
CameraPathSpeedFactorKey,
JumpToFadeDurationKey
Expand Down Expand Up @@ -39,7 +39,7 @@ export function NavigationSettings() {
<Container>
<Property uri={CameraPathSpeedFactorKey} />
<Property uri={CameraPathArrivalDistanceFactorKey} />
<Property uri={ApplyIdleBehaviorOnPathFinishKey} />
<Property uri={ApplyIdleMotionOnPathFinishKey} />
</Container>
</SettingsPopout>
);
Expand Down
4 changes: 2 additions & 2 deletions src/util/keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ export const RotationalFrictionKey =
export const ZoomFrictionKey = 'NavigationHandler.OrbitalNavigator.Friction.ZoomFriction';
export const RollFrictionKey = 'NavigationHandler.OrbitalNavigator.Friction.RollFriction';
// Navigation panel settings
export const ApplyIdleBehaviorOnPathFinishKey =
'NavigationHandler.PathNavigator.ApplyIdleBehaviorOnFinish';
export const ApplyIdleMotionOnPathFinishKey =
'NavigationHandler.PathNavigator.ApplyIdleMotionOnFinish';
export const CameraPathArrivalDistanceFactorKey =
'NavigationHandler.PathNavigator.ArrivalDistanceFactor';
export const CameraPathSpeedFactorKey = 'NavigationHandler.PathNavigator.SpeedScale';
Expand Down