UiFactory

Introduction

UiFactory is a class made to create easly UI elements (Canvas, Texts, Images).

Code

//create canvas
auto canvas = KapEngine::UI::UiFactory::createCanvas(scene, "Canvas Name");

//create text
auto text = KapEngine::UI::UiFactory::createText(scene, "Text Name");

//create image
auto image = KapEngine::UI::UiFactory::createImage(scene, "Image Name");

all return values are std::shared_ptr<GameObject>

Last updated