Skip to content
This repository was archived by the owner on Mar 22, 2026. It is now read-only.

Commit 6a8cd97

Browse files
committed
[TouchController] 拆分仅视角移动模式
1 parent 89bfd4f commit 6a8cd97

8 files changed

Lines changed: 40 additions & 11 deletions

File tree

touchcontroller/common/config/data/StatusConfig.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ data class StatusConfig(
88
) {
99
enum class Status {
1010
DISABLED,
11-
ONLY_VIEW,
11+
ONLY_VIEW_CLICK_TO_INTERACT,
12+
ONLY_VIEW_AIMING_BY_CROSSHAIR,
1213
ENABLED,
1314
}
1415
}

touchcontroller/common/event/render/RenderEvents.kt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,13 @@ object RenderEvents {
166166

167167
val preset = when (config.status.status) {
168168
StatusConfig.Status.ENABLED -> GlobalConfigHolder.currentPreset.value
169-
StatusConfig.Status.ONLY_VIEW, StatusConfig.Status.DISABLED -> LayoutPreset()
169+
StatusConfig.Status.ONLY_VIEW_CLICK_TO_INTERACT, StatusConfig.Status.DISABLED -> LayoutPreset()
170+
StatusConfig.Status.ONLY_VIEW_AIMING_BY_CROSSHAIR -> LayoutPreset(
171+
controlInfo = PresetControlInfo(
172+
splitControls = true,
173+
disableCrosshair = false,
174+
)
175+
)
170176
}
171177
val currentPresetUuid = GlobalConfigHolder.currentPresetUuid.value
172178
if (ControllerHudModel.status.previousPresetUuid != currentPresetUuid) {
@@ -255,6 +261,9 @@ object RenderEvents {
255261

256262
fun shouldRenderCrosshair(): Boolean {
257263
val config = GlobalConfigHolder.config.value
264+
if (config.status.status == StatusConfig.Status.ONLY_VIEW_AIMING_BY_CROSSHAIR) {
265+
return true
266+
}
258267
val preset = GlobalConfigHolder.currentPreset.value
259268
if (!preset.controlInfo.disableCrosshair) {
260269
return true

touchcontroller/common/ui/config/tab/status/StatusTab.kt

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,20 @@ object StatusTab : Tab() {
113113
)
114114
StatusItem(
115115
modifier = Modifier.fillMaxWidth(),
116-
title = Text.translatable(Texts.SCREEN_CONFIG_STATUS_STATUS_ONLY_VIEW_TITLE),
117-
description = Text.translatable(Texts.SCREEN_CONFIG_STATUS_STATUS_ONLY_VIEW_DESCRIPTION),
118-
selected = screenState.config.status.status == StatusConfig.Status.ONLY_VIEW,
116+
title = Text.translatable(Texts.SCREEN_CONFIG_STATUS_STATUS_ONLY_VIEW_CLICK_TO_INTERACT_TITLE),
117+
description = Text.translatable(Texts.SCREEN_CONFIG_STATUS_STATUS_ONLY_VIEW_CLICK_TO_INTERACT_DESCRIPTION),
118+
selected = screenState.config.status.status == StatusConfig.Status.ONLY_VIEW_CLICK_TO_INTERACT,
119119
onClick = {
120-
screenModel.updateConfig { copy(status = status.copy(status = StatusConfig.Status.ONLY_VIEW)) }
120+
screenModel.updateConfig { copy(status = status.copy(status = StatusConfig.Status.ONLY_VIEW_CLICK_TO_INTERACT)) }
121+
}
122+
)
123+
StatusItem(
124+
modifier = Modifier.fillMaxWidth(),
125+
title = Text.translatable(Texts.SCREEN_CONFIG_STATUS_STATUS_ONLY_VIEW_AIMING_BY_CROSSHAIR_TITLE),
126+
description = Text.translatable(Texts.SCREEN_CONFIG_STATUS_STATUS_ONLY_VIEW_AIMING_BY_CROSSHAIR_DESCRIPTION),
127+
selected = screenState.config.status.status == StatusConfig.Status.ONLY_VIEW_AIMING_BY_CROSSHAIR,
128+
onClick = {
129+
screenModel.updateConfig { copy(status = status.copy(status = StatusConfig.Status.ONLY_VIEW_AIMING_BY_CROSSHAIR)) }
121130
}
122131
)
123132
StatusItem(

touchcontroller/resources/lang/en_us.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,11 @@
5858
"touchcontroller.screen.config.status.status.title": "Status",
5959
"touchcontroller.screen.config.status.status.enable.title": "Enable",
6060
"touchcontroller.screen.config.status.status.enable.description": "Enable all of TouchController's functionalities.",
61-
"touchcontroller.screen.config.status.status.only_view.title": "Only view movement",
62-
"touchcontroller.screen.config.status.status.only_view.description": "Disable TouchController's layers and widgets. You can only turning view with touch.",
63-
"touchcontroller.screen.config.status.status.disable.title": "Disabled",
61+
"touchcontroller.screen.config.status.status.only_view.click_to_interact.title": "Only view - click to interact",
62+
"touchcontroller.screen.config.status.status.only_view.click_to_interact.description": "Disable TouchController's layers and widgets. Only use touch ring is enabled.",
63+
"touchcontroller.screen.config.status.status.only_view.aiming_by_crosshair.title": "Only view - aiming by crosshair",
64+
"touchcontroller.screen.config.status.status.only_view.aiming_by_crosshair.description": "Disable TouchController's layers and widgets. Only interacting with crosshair is enabled.",
65+
"touchcontroller.screen.config.status.status.disable.title": "Disable",
6466
"touchcontroller.screen.config.status.status.disable.description": "Disable all of TouchController's functionalities.",
6567

6668
"touchcontroller.screen.config.platform.title": "Platform",

touchcontroller/resources/lang/ru_ru.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@
6666

6767

6868

69+
70+
6971

7072

7173

touchcontroller/resources/lang/uk_ua.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@
6666

6767

6868

69+
70+
6971

7072

7173

touchcontroller/resources/lang/zh_cn.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,10 @@
5858
"touchcontroller.screen.config.status.status.title": "状态",
5959
"touchcontroller.screen.config.status.status.enable.title": "启用",
6060
"touchcontroller.screen.config.status.status.enable.description": "启用 TouchController 的全部功能。",
61-
"touchcontroller.screen.config.status.status.only_view.title": "仅视角移动",
62-
"touchcontroller.screen.config.status.status.only_view.description": "禁用 TouchController 的图层、控件功能。你只能使用触控移动视角。",
61+
"touchcontroller.screen.config.status.status.only_view.click_to_interact.title": "仅视角移动 - 点击屏幕交互",
62+
"touchcontroller.screen.config.status.status.only_view.click_to_interact.description": "禁用 TouchController 的图层、控件功能。你只能使用触控圈。",
63+
"touchcontroller.screen.config.status.status.only_view.aiming_by_crosshair.title": "仅视角移动 - 使用准心瞄准",
64+
"touchcontroller.screen.config.status.status.only_view.aiming_by_crosshair.description": "禁用 TouchController 的图层、控件功能。你只能使用准心瞄准。",
6365
"touchcontroller.screen.config.status.status.disable.title": "禁用",
6466
"touchcontroller.screen.config.status.status.disable.description": "禁用 TouchController 的全部功能。",
6567

touchcontroller/resources/lang/zh_tw.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@
6666

6767

6868

69+
70+
6971

7072

7173

0 commit comments

Comments
 (0)