diff --git a/include/eepp/ui/uisubtexture.hpp b/include/eepp/ui/uisubtexture.hpp index 8341bff2e..396d82fb2 100644 --- a/include/eepp/ui/uisubtexture.hpp +++ b/include/eepp/ui/uisubtexture.hpp @@ -27,7 +27,7 @@ class EE_API UISubTexture : public UIWidget { Graphics::SubTexture * getSubTexture() const; - void setSubTexture( Graphics::SubTexture * subTexture ); + UISubTexture * setSubTexture( Graphics::SubTexture * subTexture ); const ColorA& getColor() const; diff --git a/include/eepp/window/window.hpp b/include/eepp/window/window.hpp index 53786a4c2..b6c6ad0a9 100644 --- a/include/eepp/window/window.hpp +++ b/include/eepp/window/window.hpp @@ -17,7 +17,7 @@ class CursorManager; namespace WindowStyle { enum { - NoBorder = ( 1 << 0 ), + Borderless = ( 1 << 0 ), Titlebar = ( 1 << 1 ), Resize = ( 1 << 2 ), Fullscreen = ( 1 << 3 ), diff --git a/src/eepp/ui/uisubtexture.cpp b/src/eepp/ui/uisubtexture.cpp index 08f678dc4..a2aac691e 100644 --- a/src/eepp/ui/uisubtexture.cpp +++ b/src/eepp/ui/uisubtexture.cpp @@ -32,7 +32,7 @@ bool UISubTexture::isType( const Uint32& type ) const { return UISubTexture::getType() == type ? true : UIWidget::isType( type ); } -void UISubTexture::setSubTexture( Graphics::SubTexture * subTexture ) { +UISubTexture * UISubTexture::setSubTexture( Graphics::SubTexture * subTexture ) { mSubTexture = subTexture; onAutoSize(); @@ -44,6 +44,8 @@ void UISubTexture::setSubTexture( Graphics::SubTexture * subTexture ) { autoAlign(); notifyLayoutAttrChange(); + + return this; } void UISubTexture::onAutoSize() { diff --git a/src/eepp/window/backend/SDL2/windowsdl2.cpp b/src/eepp/window/backend/SDL2/windowsdl2.cpp index 7e9e59b62..19397047f 100644 --- a/src/eepp/window/backend/SDL2/windowsdl2.cpp +++ b/src/eepp/window/backend/SDL2/windowsdl2.cpp @@ -132,7 +132,7 @@ bool WindowSDL::create( WindowSettings Settings, ContextSettings Context ) { mWindow.Flags |= SDL_WINDOW_RESIZABLE; } - if ( mWindow.WindowConfig.Style & WindowStyle::NoBorder ) { + if ( mWindow.WindowConfig.Style & WindowStyle::Borderless ) { mWindow.Flags |= SDL_WINDOW_BORDERLESS; } diff --git a/src/eepp/window/backend/SFML/windowsfml.cpp b/src/eepp/window/backend/SFML/windowsfml.cpp index 45b9380fc..e5ce0e357 100644 --- a/src/eepp/window/backend/SFML/windowsfml.cpp +++ b/src/eepp/window/backend/SFML/windowsfml.cpp @@ -51,7 +51,7 @@ bool WindowSFML::create( WindowSettings Settings, ContextSettings Context ) { if ( mWindow.WindowConfig.Style & WindowStyle::Resize ) mWindow.Flags |= sf::Style::Resize; - if ( mWindow.WindowConfig.Style & WindowStyle::NoBorder ) + if ( mWindow.WindowConfig.Style & WindowStyle::Borderless ) mWindow.Flags = sf::Style::None; if ( mWindow.WindowConfig.Style & WindowStyle::UseDesktopResolution ) { diff --git a/src/eepp/window/engine.cpp b/src/eepp/window/engine.cpp index 0b22f32bf..1abb25d4f 100755 --- a/src/eepp/window/engine.cpp +++ b/src/eepp/window/engine.cpp @@ -230,6 +230,8 @@ WindowSettings Engine::createWindowSettings( IniFile * ini, std::string iniKeyNa int BitColor = ini->getValueI( iniKeyName, "BitColor", 32); bool Windowed = ini->getValueB( iniKeyName, "Windowed", true ); bool Resizeable = ini->getValueB( iniKeyName, "Resizeable", true ); + bool Borderless = ini->getValueB( iniKeyName, "Borderless", false ); + bool UseDesktopResolution = ini->getValueB( iniKeyName, "UseDesktopResolution", false ); float pixelDensity = ini->getValueF( iniKeyName, "PixelDensity", PixelDensity::getPixelDensity() ); std::string Backend = ini->getValue( iniKeyName, "Backend", "" ); @@ -242,6 +244,12 @@ WindowSettings Engine::createWindowSettings( IniFile * ini, std::string iniKeyNa Uint32 Style = WindowStyle::Titlebar; + if ( Borderless ) + Style = WindowStyle::Borderless; + + if ( UseDesktopResolution ) + Style |= WindowStyle::UseDesktopResolution; + if ( !Windowed ) Style |= WindowStyle::Fullscreen;