What it does
Most of the visible content in a Deki scene comes from this module. It ships the day-to-day 2D components an interactive 2D project needs: sprites, text rendering with BitmapFont and live TTF baking in the editor, sprite-sheet animations, procedural gradients, buttons with pressed / hover states, scrollable containers, clip regions, and picker-wheel rollers.
Components
| Component | Purpose |
|---|---|
SpriteComponent |
Sprite rendering with tint, flip, pivot. |
TextComponent |
BitmapFont text with alignment, word-wrap, runtime TTF baking. |
AnimationComponent |
Sprite-sheet animations with named sequences. |
ButtonComponent |
Click detection with pressed / hover states. |
ScrollComponent |
Scrollable content container. |
GradientComponent |
Procedural gradient rendering. |
RollerComponent |
Picker wheel with momentum and snap-to-item. |
ClipComponent |
Rectangular clip region for children, with nested support. |
Example
auto* obj = new DekiObject("Score");
prefab.AddObject(obj);
auto* text = obj->AddComponent<TextComponent>();
text->SetText("000123");
text->SetFont(font_ref);
text->SetAlignment(TextAlignment::Center);
auto* sprite = obj->AddComponent<SpriteComponent>();
sprite->sprite.guid = "coin.dtex";
sprite->tint_color = {255, 215, 0, 255};