Build XCUI splitter foundation and test harness
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
set(EDITOR_UI_INPUT_POINTER_STATES_RESOURCES
|
||||
View.xcui
|
||||
${CMAKE_SOURCE_DIR}/tests/UI/Editor/integration/shared/themes/editor_validation.xctheme
|
||||
)
|
||||
|
||||
add_executable(editor_ui_input_pointer_states_validation WIN32
|
||||
main.cpp
|
||||
${EDITOR_UI_INPUT_POINTER_STATES_RESOURCES}
|
||||
)
|
||||
|
||||
target_include_directories(editor_ui_input_pointer_states_validation PRIVATE
|
||||
${CMAKE_SOURCE_DIR}/tests/UI/Editor/integration/shared/src
|
||||
${CMAKE_SOURCE_DIR}/engine/include
|
||||
)
|
||||
|
||||
target_compile_definitions(editor_ui_input_pointer_states_validation PRIVATE
|
||||
UNICODE
|
||||
_UNICODE
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
target_compile_options(editor_ui_input_pointer_states_validation PRIVATE /utf-8 /FS)
|
||||
set_property(TARGET editor_ui_input_pointer_states_validation PROPERTY
|
||||
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
|
||||
endif()
|
||||
|
||||
target_link_libraries(editor_ui_input_pointer_states_validation PRIVATE
|
||||
editor_ui_integration_host
|
||||
)
|
||||
|
||||
set_target_properties(editor_ui_input_pointer_states_validation PROPERTIES
|
||||
OUTPUT_NAME "XCUIEditorInputPointerStatesValidation"
|
||||
)
|
||||
|
||||
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" FILES View.xcui)
|
||||
17
tests/UI/Editor/integration/input/pointer_states/README.md
Normal file
17
tests/UI/Editor/integration/input/pointer_states/README.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Pointer States Validation
|
||||
|
||||
可执行 target:
|
||||
|
||||
- `editor_ui_input_pointer_states_validation`
|
||||
|
||||
运行:
|
||||
|
||||
```bash
|
||||
build\tests\UI\Editor\integration\input\pointer_states\Debug\XCUIEditorInputPointerStatesValidation.exe
|
||||
```
|
||||
|
||||
检查点:
|
||||
|
||||
1. hover 左侧按钮,只应变化 `hover`
|
||||
2. 按住中间按钮,应看到 `focus`、`active`、`capture`
|
||||
3. 拖到右侧再松开,应看到 `capture` 清空,route 转到新的目标
|
||||
30
tests/UI/Editor/integration/input/pointer_states/View.xcui
Normal file
30
tests/UI/Editor/integration/input/pointer_states/View.xcui
Normal file
@@ -0,0 +1,30 @@
|
||||
<View
|
||||
name="EditorInputPointerStates"
|
||||
theme="../../shared/themes/editor_validation.xctheme">
|
||||
<Column padding="24" gap="16">
|
||||
<Card
|
||||
title="Editor Validation | Pointer States"
|
||||
subtitle="当前批次:鼠标 hover / focus / active / capture"
|
||||
tone="accent"
|
||||
height="90">
|
||||
<Column gap="8">
|
||||
<Text text="这是 editor 侧验证场景,不承载 runtime 游戏 UI。" />
|
||||
<Text text="这一轮只检查鼠标输入状态,不混入别的控件实验。" />
|
||||
</Column>
|
||||
</Card>
|
||||
|
||||
<Card title="Pointer Input" subtitle="hover focus active capture" height="196">
|
||||
<Column gap="12">
|
||||
<Text text="这一轮只需要检查下面这三个按钮。" />
|
||||
<Row gap="12">
|
||||
<Button id="input-hover" text="Hover / Focus" />
|
||||
<Button id="input-capture" text="Pointer Capture" capturePointer="true" />
|
||||
<Button id="input-route" text="Route Target" />
|
||||
</Row>
|
||||
<Text text="1. 鼠标移到左侧按钮:hover 应变化,focus 保持空。" />
|
||||
<Text text="2. 按住中间按钮:focus、active、capture 都应留在中间。" />
|
||||
<Text text="3. 拖到右侧再松开:hover 移到右侧,capture 清空,focus 仍留中间。" />
|
||||
</Column>
|
||||
</Card>
|
||||
</Column>
|
||||
</View>
|
||||
@@ -0,0 +1,8 @@
|
||||
#include "Application.h"
|
||||
|
||||
int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE, LPWSTR, int nCmdShow) {
|
||||
return XCEngine::Tests::EditorUI::RunEditorUIValidationApp(
|
||||
hInstance,
|
||||
nCmdShow,
|
||||
"editor.input.pointer_states");
|
||||
}
|
||||
Reference in New Issue
Block a user