Josh Posted 2 hours ago Posted 2 hours ago If you want to make the window background black before graphics start rendering, here is one possible way: auto window = CreateWindow("Leadwerks", 0, 0, 1280, 720, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR | WINDOW_HIDDEN); auto ui = CreateInterface(window); ui->background->SetColor(0,0,0); window->SetHidden(false); window->Activate(); ui = nullptr; If you do this in Lua make sure you call collectgarbage() to delete the UI object. 1 Quote Let's build cool stuff and have fun.
Yue Posted 1 hour ago Posted 1 hour ago I thought that with a 3D world it wouldn't be feasible because I would have to go through the process of creating the world and then creating the UI to give it that color. And it would always remain white. Quote Murphy's Law: We don't fix bugs, we document them as features. – Murphy Games
Yue Posted 1 hour ago Posted 1 hour ago It doesn't work in Lua, the window is white. -- Objects local window = CWindow:New() ui = CreateInterface(window:Get()) ui.background:SetColor(0,0,0) window:Get():SetHidden(false); window:Get():Activate() ui = nil Quote Murphy's Law: We don't fix bugs, we document them as features. – Murphy Games
Josh Posted 1 hour ago Author Posted 1 hour ago 32 minutes ago, Yue said: It doesn't work in Lua, the window is white. -- Objects local window = CWindow:New() ui = CreateInterface(window:Get()) ui.background:SetColor(0,0,0) window:Get():SetHidden(false); window:Get():Activate() ui = nil You window probably isn't hidden to start with. Quote Let's build cool stuff and have fun.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.