Slightly reduce included headers by only including SFML headers where needed instead of always including SFML/Graphics.hpp
parent
4e145942b5
commit
abdbf5eeae
|
@ -27,7 +27,9 @@
|
|||
#define TGUI_CLIPBOARD_HPP
|
||||
|
||||
|
||||
#include <TGUI/Global.hpp>
|
||||
#include <TGUI/Config.hpp>
|
||||
#include <SFML/System/String.hpp>
|
||||
#include <SFML/Window/WindowHandle.hpp>
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
#define TGUI_CLIPPING_HPP
|
||||
|
||||
#include <TGUI/Global.hpp>
|
||||
#include <SFML/Graphics/RenderTarget.hpp>
|
||||
#include <SFML/Graphics/View.hpp>
|
||||
#include <SFML/OpenGL.hpp>
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -33,8 +33,6 @@
|
|||
#include <TGUI/FloatRect.hpp>
|
||||
#include <TGUI/Exception.hpp>
|
||||
|
||||
#include <SFML/Graphics.hpp>
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
|
|
|
@ -27,9 +27,9 @@
|
|||
#define TGUI_WINDOW_HPP
|
||||
|
||||
|
||||
#include <queue>
|
||||
|
||||
#include <TGUI/Container.hpp>
|
||||
#include <SFML/Graphics/RenderWindow.hpp>
|
||||
#include <queue>
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
|
|
@ -34,6 +34,10 @@
|
|||
#include <TGUI/Aurora/SmartPtr/CopiedPtr.hpp>
|
||||
#include <TGUI/Aurora/Tools/Downcast.hpp>
|
||||
|
||||
#include <SFML/System/Time.hpp>
|
||||
#include <SFML/Window/Event.hpp>
|
||||
#include <SFML/Graphics/RenderTarget.hpp>
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
namespace tgui
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
|
||||
|
||||
#include <TGUI/Widgets/ClickableWidget.hpp>
|
||||
#include <SFML/Graphics/RenderTexture.hpp>
|
||||
#include <SFML/Graphics/Sprite.hpp>
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#include <SFML/Config.hpp>
|
||||
#include <TGUI/Clipboard.hpp>
|
||||
|
||||
#ifdef SFML_SYSTEM_WINDOWS
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include <TGUI/Gui.hpp>
|
||||
#include <TGUI/DefaultFont.hpp>
|
||||
|
||||
#include <SFML/Graphics/RenderTexture.hpp>
|
||||
#include <SFML/OpenGL.hpp>
|
||||
|
||||
#include <cassert>
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
#include <TGUI/Text.hpp>
|
||||
#include <TGUI/Global.hpp>
|
||||
#include <SFML/Graphics/RenderTarget.hpp>
|
||||
#include <cmath>
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
#include <TGUI/ToolTip.hpp>
|
||||
#include <TGUI/Container.hpp>
|
||||
#include <TGUI/Animation.hpp>
|
||||
|
||||
#include <cassert>
|
||||
#include <SFML/System/Err.hpp>
|
||||
#include <SFML/Graphics/RectangleShape.hpp>
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
|
|
@ -258,11 +258,7 @@ namespace tgui
|
|||
|
||||
// Draw the background
|
||||
if (getRenderer()->getBackgroundColor() != sf::Color::Transparent)
|
||||
{
|
||||
sf::RectangleShape background(getSize());
|
||||
background.setFillColor(getRenderer()->getBackgroundColor());
|
||||
target.draw(background, states);
|
||||
}
|
||||
drawRectangleShape(target, states, getSize(), getRenderer()->getBackgroundColor());
|
||||
|
||||
// Draw the widgets
|
||||
drawWidgetContainer(&target, states);
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
#include <TGUI/Widgets/CheckBox.hpp>
|
||||
#include <TGUI/Clipping.hpp>
|
||||
|
||||
#include <SFML/Graphics/RectangleShape.hpp>
|
||||
#include <cmath>
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <TGUI/Container.hpp>
|
||||
#include <TGUI/Widgets/ComboBox.hpp>
|
||||
#include <TGUI/Clipping.hpp>
|
||||
#include <SFML/Graphics/ConvexShape.hpp>
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
|
||||
#include <TGUI/Widgets/Knob.hpp>
|
||||
#include <SFML/Graphics/CircleShape.hpp>
|
||||
#include <cmath>
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
#include <TGUI/Container.hpp>
|
||||
#include <TGUI/Widgets/RadioButton.hpp>
|
||||
#include <SFML/Graphics/CircleShape.hpp>
|
||||
|
||||
namespace tgui
|
||||
{
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
|
||||
#include <TGUI/Widgets/Scrollbar.hpp>
|
||||
#include <SFML/Graphics/ConvexShape.hpp>
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
|
||||
|
||||
#include <TGUI/Widgets/SpinButton.hpp>
|
||||
#include <SFML/Graphics/ConvexShape.hpp>
|
||||
#include <SFML/Graphics/RectangleShape.hpp>
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "Tests.hpp"
|
||||
#include <TGUI/Widgets/Panel.hpp>
|
||||
#include <TGUI/Gui.hpp>
|
||||
#include <SFML/Graphics/RenderTexture.hpp>
|
||||
|
||||
TGUI_IMPORT_LAYOUT_BIND_FUNCTIONS
|
||||
using tgui::Layout;
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
#include "catch.hpp"
|
||||
#include <TGUI/Texture.hpp>
|
||||
#include <SFML/System/Err.hpp>
|
||||
|
||||
TEST_CASE("[Texture]")
|
||||
{
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "catch.hpp"
|
||||
#include <TGUI/TextureManager.hpp>
|
||||
#include <TGUI/Texture.hpp>
|
||||
#include <SFML/System/Err.hpp>
|
||||
|
||||
TEST_CASE("[TextureManager]")
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue