tgui::Gui setting background color

  • 2 Replies
  • 168 Views
*

ingar

  • *
  • 26
    • View Profile
    • Label Printing Software & Solutions
tgui::Gui setting background color
« 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

*

texus

  • *****
  • 1420
    • View Profile
    • Texus's Blog
Re: tgui::Gui setting background color
« Reply #1 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.

*

ingar

  • *
  • 26
    • View Profile
    • Label Printing Software & Solutions
Re: tgui::Gui setting background color
« Reply #2 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.