TGUI Forum

General Category => Feature requests => Topic started by: ingar on 21 April 2019, 18:03:38

Title: tgui::Gui setting background color
Post by: ingar on 21 April 2019, 18:03:38
Hi!

One thing I miss in tgui::Gui:

Setting the background color. Because from what I can see the background color is black. I can do this by creating a Picture widget that has a specific color. But why not have a function tgui::Gui::SetBackgroundColor(...)?

Perhaps I missed something?

Ingar
Title: Re: tgui::Gui setting background color
Post by: texus on 21 April 2019, 18:08:24
The background color of all rendering is chosen in the window.clear() call. If you want a red background behind everything then you can just do window.clear(sf::Color::Red).
If the gui only fills part of the screen and you want to give it a different color then you can just add a Panel to the gui and add your widgets to the panel.
Title: Re: tgui::Gui setting background color
Post by: ingar on 24 April 2019, 15:22:44
Worked!

Thanks!

Ingar

The background color of all rendering is chosen in the window.clear() call. If you want a red background behind everything then you can just do window.clear(sf::Color::Red).
If the gui only fills part of the screen and you want to give it a different color then you can just add a Panel to the gui and add your widgets to the panel.