SpiderPig Posted March 13, 2023 Posted March 13, 2023 I noticed this a while ago just briefly. Text area works but text field is not visible. The project is up to date. #include "UltraEngine.h" #include "ComponentSystem.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { auto displays = GetDisplays(); auto window = CreateWindow("Ultra Engine", 0, 0, 1440, 900, displays[0]); auto framebuffer = CreateFramebuffer(window); auto world = CreateWorld(); auto camera = CreateCamera(world); camera->Move(0, 2, -3); camera->SetClearColor(1, 0, 0); auto light = CreateDirectionalLight(world); light->SetRotation(35, 35, 35); auto floor = CreateBox(world, 100.0f, 0.5f, 100.0f); auto default_font = LoadFont("Fonts\\arial.ttf"); auto ui = CreateInterface(world, default_font, framebuffer->size); ui->SetRenderLayers(2); ui->root->SetColor(0.0f, 0.0f, 0.0f, 0.0f); auto ui_camera = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); ui_camera->SetPosition((float)framebuffer->size.x * 0.5f, (float)framebuffer->size.y * 0.5f, 0); ui_camera->SetRenderLayers(2); ui_camera->SetClearMode(CLEAR_DEPTH); //auto text = CreateTextArea(0, 0, 512, 30, ui->root); auto text = CreateTextField(0, 0, 512, 30, ui->root); text->SetText("Hello Ultra"); while (window->KeyHit(KEY_ESCAPE) == false && window->Closed() == false) { while (PeekEvent()) { ui->ProcessEvent(WaitEvent()); } world->Update(); world->Render(framebuffer); } return 0; }
SpiderPig Posted June 2, 2023 Author Posted June 2, 2023 Wondering If you've had a chance to look at this yet? Been in Leadwerks for a bit and I'm keen to get back into Ultra!
Josh Posted June 3, 2023 Posted June 3, 2023 I want to focus on the editor first because any changes I make to the GUI system could affect this issue, rather than the reverse. 1 Let's build cool stuff and have fun.
Josh Posted September 7, 2023 Posted September 7, 2023 Simplifying this a bit... #include "UltraEngine.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { auto displays = GetDisplays(); auto window = CreateWindow("Ultra Engine", 0, 0, 1440, 900, displays[0]); auto framebuffer = CreateFramebuffer(window); auto world = CreateWorld(); auto default_font = LoadFont("Fonts\\arial.ttf"); auto ui = CreateInterface(world, default_font, framebuffer->size); auto ui_camera = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); ui_camera->SetPosition((float)framebuffer->size.x * 0.5f, (float)framebuffer->size.y * 0.5f, 0); auto text1 = CreateTextArea(10, 10, 512, 30, ui->root); auto text2 = CreateTextField(10, 50, 512, 30, ui->root); text1->SetText("Hello Ultra"); text2->SetText("Hello Ultra"); while (window->KeyHit(KEY_ESCAPE) == false && window->Closed() == false) { while (PeekEvent()) { ui->ProcessEvent(WaitEvent()); } world->Update(); world->Render(framebuffer); } return 0; } Let's build cool stuff and have fun.
Solution Josh Posted September 7, 2023 Solution Posted September 7, 2023 Fixed for next build... 1 Let's build cool stuff and have fun.
Recommended Posts