mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-11-10 16:46:06 -08:00
Controller: subtitle line actions, Button Style, keyboard-only mode pause, Alt+C fixes (#316)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
1 parent
6d0f37ac21
commit
b99409bbcd
60 files changed
+1900
-219
No files matched your search
@@ -15,6 +15,7 @@ import {
|
||||
getControllerReviewInputContext,
|
||||
} from './controller-screen-layout.js';
|
||||
import type { GamepadLike } from './gamepad-controller.js';
|
||||
import { resolveControllerConfigForGamepad } from '../controller-profile-config.js';
|
||||
|
||||
const CONFIG: ResolvedControllerConfig = { ...CORE_DEFAULT_CONFIG.controller, enabled: true };
|
||||
const { repeatDelayMs, repeatIntervalMs } = CONFIG;
|
||||
@@ -155,3 +156,33 @@ test('remapped duplicate card bindings replace the defaults', () => {
|
||||
|
||||
assert.deepEqual(actions, ['cancelMerge']);
|
||||
});
|
||||
|
||||
test('dialog hints follow the button style of the controller in use', () => {
|
||||
const config: ResolvedControllerConfig = {
|
||||
...CONFIG,
|
||||
profiles: {
|
||||
'pad-ps': {
|
||||
label: 'DualSense',
|
||||
faceButtonLabels: 'playstation',
|
||||
buttonIndices: CONFIG.buttonIndices,
|
||||
bindings: CONFIG.bindings,
|
||||
reviewBindings: CONFIG.reviewBindings,
|
||||
fieldGroupingBindings: CONFIG.fieldGroupingBindings,
|
||||
},
|
||||
},
|
||||
};
|
||||
const hintsFor = (gamepadId: string) => {
|
||||
const padConfig = resolveControllerConfigForGamepad(config, gamepadId);
|
||||
return formatControllerScreenHints(
|
||||
CONTROLLER_FIELD_GROUPING_SCREEN,
|
||||
padConfig.fieldGroupingBindings,
|
||||
padConfig,
|
||||
'standard',
|
||||
);
|
||||
};
|
||||
|
||||
assert.equal(hintsFor('pad-ps').continue, '╳');
|
||||
assert.equal(hintsFor('pad-ps').toggleView, '△');
|
||||
// Controllers without their own style use controller.faceButtonLabels.
|
||||
assert.equal(hintsFor('other-pad').continue, 'A');
|
||||
});
|
||||
Reference in new issue
Block a user