Gap-closing work for the declarative UI module vs UE/Unity/Godot: - Layout: real measure pass (measureTree) + pure flexArrange with margin/padding/min-max/percent/anchor/absolute placement; window size, anchors and percentage sizing; script layout props. - Widgets: Image/ImageButton (engine textures + nine-patch + tint/uv), Combo, text wrapping + CJK font candidates/ranges, InputText 1024B, virtualized ScrollList/virtualList. - Events: script onClick/onChange callbacks with structured payloads (keeps the poll queues for compatibility). - Tooling: UI JSON save/load (saveTreeJson/loadTreeJson), host pos tween animation, gamepad nav, per-frame UI stats. - Viewport: embedded offscreen render target widget with input routing; RenderSystem3D::renderToCanvas preview pass + Graphics::renderScene3DToCanvas; editor.newHeightmapMesh/updateHeightmapMesh for heightmap terrain; examples/terrain-editor demonstrating orbit camera + raise/lower brush. - Tests: 32 UI tests including real-window Vulkan smoke for the viewport.
15 lines
436 B
C++
15 lines
436 B
C++
#include "zeroerr/assert.h"
|
|
#include "zeroerr/unittest.h"
|
|
|
|
#include "ui/UIHost.h"
|
|
#include "ui/Widget.h"
|
|
|
|
// Regression probe: WidgetDesc move must work in the test binary even with the
|
|
// image/layout fields present (crash investigation, kept as a regression test).
|
|
TEST_CASE("UI.regression.widgetDescMove") {
|
|
eve::ui::WidgetDesc w;
|
|
w.id = "root";
|
|
eve::ui::WidgetDesc moved = std::move(w);
|
|
CHECK(moved.id == "root");
|
|
}
|