Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
UIElementPlugin.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team
3#pragma once
4
5#include "BatchPlugin.hpp"
8
9namespace esengine {
10
12public:
13 bool drawsScreenUI() const override { return true; }
14 void collect(RenderCollectContext& ctx) override;
15 const char* collectScope() const override { return "render.collect.ui"; }
16
17 // UI draws above world content: its sort layer is offset past the world
18 // layer range. The SDK's own text renderer puts quads at the same base, so
19 // it crosses — and a second spelling of it is two layers, not one.
20 ES_CONST()
21 static constexpr i32 UI_BASE_LAYER = 1000;
22};
23
24} // namespace esengine
Base class for render-type plugins that emit textured quads into the Batch stream.
Reflection and metadata system for automatic binding generation.
#define ES_CONST(...)
Mark a constant that CROSSES the boundary, so EHT emits its TS twin.
Texture metadata structures for nine-slice and other settings.
void collect(RenderCollectContext &ctx) override
static constexpr i32 UI_BASE_LAYER
bool drawsScreenUI() const override
Whether this plugin can draw an entity that lives in a UI tree.
const char * collectScope() const override
What this plugin's collect is called in a frame profile.
std::int32_t i32
Signed 32-bit integer.
Definition Types.hpp:54
static EstellaContext & ctx()