mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-06-02 03:26:29 +03:00
Minor changes.
--HG-- branch : dev
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ class CursorManager;
|
||||
namespace WindowStyle {
|
||||
enum
|
||||
{
|
||||
NoBorder = ( 1 << 0 ),
|
||||
Borderless = ( 1 << 0 ),
|
||||
Titlebar = ( 1 << 1 ),
|
||||
Resize = ( 1 << 2 ),
|
||||
Fullscreen = ( 1 << 3 ),
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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 ) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user