Minor changes.

--HG--
branch : dev
This commit is contained in:
Martí­n Lucas Golini
2017-04-08 18:16:55 -03:00
parent be62297f5a
commit b5e2920aa3
6 changed files with 15 additions and 5 deletions

View File

@@ -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;

View File

@@ -17,7 +17,7 @@ class CursorManager;
namespace WindowStyle {
enum
{
NoBorder = ( 1 << 0 ),
Borderless = ( 1 << 0 ),
Titlebar = ( 1 << 1 ),
Resize = ( 1 << 2 ),
Fullscreen = ( 1 << 3 ),

View File

@@ -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() {

View File

@@ -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;
}

View File

@@ -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 ) {

View File

@@ -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;