Add "Default opacity" setting for touch controller

This commit is contained in:
redphx
2024-05-07 17:37:49 +07:00
parent b9355d5c01
commit 2df3bb4611
6 changed files with 55 additions and 7 deletions

View File

@@ -27,6 +27,7 @@ export enum PrefKey {
STREAM_TOUCH_CONTROLLER = 'stream_touch_controller',
STREAM_TOUCH_CONTROLLER_AUTO_OFF = 'stream_touch_controller_auto_off',
STREAM_TOUCH_CONTROLLER_DEFAULT_OPACITY = 'stream_touch_controller_default_opacity',
STREAM_TOUCH_CONTROLLER_STYLE_STANDARD = 'stream_touch_controller_style_standard',
STREAM_TOUCH_CONTROLLER_STYLE_CUSTOM = 'stream_touch_controller_style_custom',
@@ -277,6 +278,20 @@ export class Preferences {
default: false,
unsupported: !STATES.hasTouchSupport,
},
[PrefKey.STREAM_TOUCH_CONTROLLER_DEFAULT_OPACITY]: {
type: SettingElementType.NUMBER_STEPPER,
label: t('tc-default-opacity'),
default: 100,
min: 10,
max: 100,
steps: 10,
params: {
suffix: '%',
ticks: 10,
hideSlider: true,
},
unsupported: !STATES.hasTouchSupport,
},
[PrefKey.STREAM_TOUCH_CONTROLLER_STYLE_STANDARD]: {
label: t('tc-standard-layout-style'),
default: 'default',

View File

@@ -2754,6 +2754,23 @@ const Texts = {
"Màu của bố cục tùy chọn",
"特殊游戏按钮样式",
],
"tc-default-opacity": [
,
,
"Default opacity",
,
,
,
,
,
,
,
,
,
,
"Độ mờ mặc định",
,
],
"tc-muted-colors": [
"Matte Farben",
"Warna redup",