Add core popup overlay primitive
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
add_subdirectory(keyboard_focus)
|
||||
add_subdirectory(popup_menu_overlay)
|
||||
add_subdirectory(pointer_states)
|
||||
add_subdirectory(scroll_view)
|
||||
add_subdirectory(shortcut_scope)
|
||||
@@ -6,6 +7,7 @@ add_subdirectory(shortcut_scope)
|
||||
add_custom_target(core_ui_input_integration_tests
|
||||
DEPENDS
|
||||
core_ui_input_keyboard_focus_validation
|
||||
core_ui_input_popup_menu_overlay_validation
|
||||
core_ui_input_pointer_states_validation
|
||||
core_ui_input_scroll_view_validation
|
||||
core_ui_input_shortcut_scope_validation
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
set(CORE_UI_INPUT_POPUP_MENU_OVERLAY_RESOURCES
|
||||
View.xcui
|
||||
${CMAKE_SOURCE_DIR}/tests/UI/Core/integration/shared/themes/core_validation.xctheme
|
||||
)
|
||||
|
||||
add_executable(core_ui_input_popup_menu_overlay_validation WIN32
|
||||
main.cpp
|
||||
${CORE_UI_INPUT_POPUP_MENU_OVERLAY_RESOURCES}
|
||||
)
|
||||
|
||||
target_include_directories(core_ui_input_popup_menu_overlay_validation PRIVATE
|
||||
${CMAKE_SOURCE_DIR}/tests/UI/Core/integration/shared/src
|
||||
${CMAKE_SOURCE_DIR}/engine/include
|
||||
)
|
||||
|
||||
target_compile_definitions(core_ui_input_popup_menu_overlay_validation PRIVATE
|
||||
UNICODE
|
||||
_UNICODE
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
target_compile_options(core_ui_input_popup_menu_overlay_validation PRIVATE /utf-8 /FS)
|
||||
set_property(TARGET core_ui_input_popup_menu_overlay_validation PROPERTY
|
||||
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
|
||||
endif()
|
||||
|
||||
target_link_libraries(core_ui_input_popup_menu_overlay_validation PRIVATE
|
||||
core_ui_integration_host
|
||||
)
|
||||
|
||||
set_target_properties(core_ui_input_popup_menu_overlay_validation PROPERTIES
|
||||
OUTPUT_NAME "XCUICoreInputPopupMenuOverlayValidation"
|
||||
)
|
||||
|
||||
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" FILES View.xcui)
|
||||
10
tests/UI/Core/integration/input/popup_menu_overlay/README.md
Normal file
10
tests/UI/Core/integration/input/popup_menu_overlay/README.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# Core Input | Popup Menu Overlay
|
||||
|
||||
这个场景只验证 `Core popup / menu overlay primitive`:
|
||||
|
||||
- 根 popup 打开与关闭
|
||||
- submenu 展开与分支关闭
|
||||
- overlay 空白区点击 dismiss
|
||||
- popup 打开时阻断底层按钮命中
|
||||
|
||||
不验证 Editor 菜单栏,不验证业务命令。
|
||||
18
tests/UI/Core/integration/input/popup_menu_overlay/View.xcui
Normal file
18
tests/UI/Core/integration/input/popup_menu_overlay/View.xcui
Normal file
@@ -0,0 +1,18 @@
|
||||
<View
|
||||
name="CoreInputPopupMenuOverlay"
|
||||
theme="../../shared/themes/core_validation.xctheme">
|
||||
<Column padding="24" gap="16">
|
||||
<Card
|
||||
title="测试内容:Core Popup / Menu Overlay Primitive"
|
||||
subtitle="只验证 popup 打开关闭、overlay 遮挡、outside click dismiss 与 hover 展开子菜单"
|
||||
tone="accent"
|
||||
height="160">
|
||||
<Column gap="8">
|
||||
<Text text="1. 点击下方交互区里的 Open Menu,根 popup 应在 overlay 层弹出。" />
|
||||
<Text text="2. hover 到 Open Submenu 后,右侧应直接弹出 child popup;再点根 popup 空白区,应该只关闭 child popup。" />
|
||||
<Text text="3. popup 打开时,Background Button 不应在同一次点击里被命中;先 dismiss,再点它才应生效。" />
|
||||
<Text text="4. 按 Esc 应关闭当前最上层 popup;点击 overlay 空白区应关闭整条 popup 链。" />
|
||||
</Column>
|
||||
</Card>
|
||||
</Column>
|
||||
</View>
|
||||
@@ -0,0 +1,8 @@
|
||||
#include "Application.h"
|
||||
|
||||
int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE, LPWSTR, int nCmdShow) {
|
||||
return XCEngine::Tests::CoreUI::RunCoreUIValidationApp(
|
||||
hInstance,
|
||||
nCmdShow,
|
||||
"core.input.popup_menu_overlay");
|
||||
}
|
||||
Reference in New Issue
Block a user