Fixed FileInfo::isHidden.

clang formated files.
This commit is contained in:
Martín Lucas Golini
2020-08-18 01:24:49 -03:00
parent 1250fc9972
commit 2c9e58763b
57 changed files with 186 additions and 202 deletions

View File

@@ -65,7 +65,7 @@ class EE_API SoundFileWriter {
/// }
///
/// virtual bool open(const std::string& filename, unsigned int sampleRate, unsigned int
///channelCount)
/// channelCount)
/// {
/// // open the file 'filename' for writing,
/// // write the given sample rate and channel count to the file header

View File

@@ -41,7 +41,7 @@ template <typename T> class tSoundManager {
SoundBuffer& getBuffer( const T& id );
/** Play the sound. This method will open a new channel if the channel seted for the sound is
*already playing. * @param id The sound id to play */
*already playing. * @param id The sound id to play */
Sound* play( const T& id );
/** Remove a sound from the sound manager.
@@ -52,7 +52,7 @@ template <typename T> class tSoundManager {
Sound& operator[]( const T& id );
/** @brief Search for the sound id, and return a sound that is not playing, if all the sounds
*are playing, creates a new sound. * @return The sound */
*are playing, creates a new sound. * @return The sound */
Sound& getFreeSound( const T& id );
~tSoundManager();

View File

@@ -40,8 +40,8 @@ class EE_API String {
static const OccTable createOccTable( const unsigned char* needle, size_t needleLength );
/** @returns haystackLength if not found, otherwise the position */
static size_t search( const unsigned char* haystack, size_t haystackLength, const unsigned char* needle,
const size_t needleLength,
static size_t search( const unsigned char* haystack, size_t haystackLength,
const unsigned char* needle, const size_t needleLength,
const OccTable& occ );
/** @returns -1 if not found otherwise the position */

View File

@@ -11,11 +11,11 @@ using namespace EE::System;
namespace EE { namespace Graphics {
/** @brief The scroll parallax renders a TextureRegion to the screen from a position and a size
*specified. If the size is bigger than the TextureRegion, the TextureRegion is rendered as a
*repeated TextureRegion until it covers all the size of the parallax, adding movement to more than
*one Scroll Parallax will generate the ilusion of depth. * More info in wikipedia:
*http://en.wikipedia.org/wiki/Parallax_scrolling
*/
*specified. If the size is bigger than the TextureRegion, the TextureRegion is rendered as a
*repeated TextureRegion until it covers all the size of the parallax, adding movement to more than
*one Scroll Parallax will generate the ilusion of depth. * More info in wikipedia:
*http://en.wikipedia.org/wiki/Parallax_scrolling
*/
class EE_API ScrollParallax {
public:
ScrollParallax();

View File

@@ -70,13 +70,11 @@ class EE_API TexturePacker {
*is not compatible with eepp ( since it can't flip the textures back to the original
*orientation ). So avoid it for eepp.
*/
static TexturePacker*
New( const Uint32& maxWidth, const Uint32& maxHeight,
const Float& pixelDensity = 1,
const bool& forcePowOfTwo = true, const bool& scalableSVG = false,
const Uint32& pixelBorder = 2,
const Texture::Filter& textureFilter = Texture::Filter::Linear,
const bool& allowChilds = false, const bool& allowFlipping = false );
static TexturePacker* New( const Uint32& maxWidth, const Uint32& maxHeight,
const Float& pixelDensity = 1, const bool& forcePowOfTwo = true,
const bool& scalableSVG = false, const Uint32& pixelBorder = 2,
const Texture::Filter& textureFilter = Texture::Filter::Linear,
const bool& allowChilds = false, const bool& allowFlipping = false );
/** Creates a new texture packer ( you will need to call SetOptions before adding any texture or
* image ). */
@@ -102,8 +100,7 @@ class EE_API TexturePacker {
*is not compatible with eepp ( since it can't flip the textures back to the original
*orientation ). So avoid it for eepp.
*/
TexturePacker( const Uint32& maxWidth, const Uint32& maxHeight,
const Float& pixelDensity = 1,
TexturePacker( const Uint32& maxWidth, const Uint32& maxHeight, const Float& pixelDensity = 1,
const bool& forcePowOfTwo = true, const bool& scalableSVG = false,
const Uint32& pixelBorder = 2,
const Texture::Filter& textureFilter = Texture::Filter::Linear,
@@ -168,8 +165,7 @@ class EE_API TexturePacker {
*is not compatible with eepp ( since it can't flip the textures back to the original
*orientation ). So avoid it for eepp.
*/
void setOptions( const Uint32& maxWidth, const Uint32& maxHeight,
const Float& pixelDensity = 1,
void setOptions( const Uint32& maxWidth, const Uint32& maxHeight, const Float& pixelDensity = 1,
const bool& forcePowOfTwo = true, const bool& scalableSVG = false,
const Uint32& pixelBorder = 2,
const Texture::Filter& textureFilter = Texture::Filter::Linear,

View File

@@ -143,7 +143,7 @@ class EE_API Interpolation1d {
/** @return The current progress porcentage of the current interpolation.
* This is the partial progress, not the global of the whole interpolation.
*/
*/
Float getPartialCurrentProgress();
protected:

View File

@@ -12,9 +12,9 @@ And for the C++ implementation of Henrik Krysell.
namespace EE { namespace Math {
/** @brief Perlin noise can be used to generate gradients, textures and effects. For more
*information go to http://en.wikipedia.org/wiki/Perlin_noise * To get a better understanding of
*the variables to generate the noise, visit
*http://freespace.virgin.net/hugo.elias/models/m_perlin.htm */
*information go to http://en.wikipedia.org/wiki/Perlin_noise * To get a better understanding of
*the variables to generate the noise, visit
*http://freespace.virgin.net/hugo.elias/models/m_perlin.htm */
class EE_API PerlinNoise {
public:
PerlinNoise();

View File

@@ -171,7 +171,7 @@ class EE_API Http : NonCopyable {
///< target resource.
Patch, ///< The PATCH method is used to apply partial modifications to a resource.
Connect ///< The CONNECT method starts two-way communications with the requested
///< resource. It can be used to open a tunnel.
///< resource. It can be used to open a tunnel.
};
/** @brief Enumerate the available states for a request */

View File

@@ -41,11 +41,11 @@ class EE_API PhysicsManager {
~PhysicsManager();
/** The Memory Manager will keep track of all the allocations from Space, Body, Shape and
*Constraint and will release any non-released pointer.
*** This is a lazy deallocation for the lazy programmers. It is disabled by default.
*** To work properly set as active before allocating anything, activate it just after the
*singleton instantiation.
*/
*Constraint and will release any non-released pointer.
*** This is a lazy deallocation for the lazy programmers. It is disabled by default.
*** To work properly set as active before allocating anything, activate it just after the
*singleton instantiation.
*/
void setMemoryManager( bool memoryManager );
const bool& isMemoryManagerEnabled() const;

View File

@@ -23,7 +23,7 @@ class EE_API SceneManager {
~SceneManager();
SceneNode* add(SceneNode* sceneNode );
SceneNode* add( SceneNode* sceneNode );
bool remove( SceneNode* sceneNode );

View File

@@ -211,7 +211,7 @@ class EE_API IniFile {
/** Delete all header comments. */
void deleteHeaderComments() { mComments.clear(); }
std::map<std::string, std::string> getKeyMap( const unsigned & keyID ) const;
std::map<std::string, std::string> getKeyMap( const unsigned& keyID ) const;
std::map<std::string, std::string> getKeyMap( const std::string& keyname ) const;

View File

@@ -17,8 +17,8 @@ class EE_API PackManager : protected Container<Pack> {
virtual ~PackManager();
/** @brief Searchs for the filepath in the packs, if the file is found it will return the pack
*that belongs to. * @return The pack where the file exists. If the file is not found, returns
*NULL. * @param path The file path to search. */
*that belongs to. * @return The pack where the file exists. If the file is not found,
*returns NULL. * @param path The file path to search. */
Pack* exists( std::string& path );
/** @brief Search for a pack by its path.
@@ -30,14 +30,14 @@ class EE_API PackManager : protected Container<Pack> {
const bool& isFallbackToPacksActive() const;
/** @brief Sets if the files that failed to be loaded from the file system should try to be
*loaded from the currently open packs.
** For example if you try to load a texture from the file system a fails it will search the
*same path in the opened packs, and load it from there. *
*TextureFactory::instance()->loadFromFile( "mytexture.png" );
** If the file is not in the file system, it will be searched in the opened packs, and
*loaded if is found. * In case that the process path is appended to the path... like
*Sys::GetProcessPath() + "mytexture.png", the process path will be removed from the file path.
*/
*loaded from the currently open packs.
** For example if you try to load a texture from the file system a fails it will search the
*same path in the opened packs, and load it from there. *
*TextureFactory::instance()->loadFromFile( "mytexture.png" );
** If the file is not in the file system, it will be searched in the opened packs, and
*loaded if is found. * In case that the process path is appended to the path... like
*Sys::GetProcessPath() + "mytexture.png", the process path will be removed from the file path.
*/
void setFallbackToPacks( const bool& fallback );
protected:

View File

@@ -59,8 +59,8 @@ template <typename R> class Callback0 {
public:
/// Constructs the callback to a specific object and member function.
///\param object Pointer to the object to call upon. Care should be taken that this object
///remains valid as long as the callback may be invoked. \param function Member function address
///to call.
/// remains valid as long as the callback may be invoked. \param function Member function
/// address to call.
template <typename C>
Callback0( C* object, R ( C::*function )() ) :
mCallback( new ( &mMem ) ChildMethod<C>( object, function ) ) {}
@@ -93,8 +93,8 @@ template <typename R> class Callback0 {
/// Sets the callback to a specific object and member function.
///\param object Pointer to the object to call upon. Care should be taken that this object
///remains valid as long as the callback may be invoked. \param function Member function address
///to call.
/// remains valid as long as the callback may be invoked. \param function Member function
/// address to call.
template <typename C> void Reset( C* object, R ( C::*function )() ) {
mCallback = new ( &mMem ) ChildMethod<C>( object, function );
}
@@ -240,8 +240,8 @@ template <typename R, typename T0> class Callback1 {
public:
/// Constructs the callback to a specific object and member function.
///\param object Pointer to the object to call upon. Care should be taken that this object
///remains valid as long as the callback may be invoked. \param function Member function address
///to call.
/// remains valid as long as the callback may be invoked. \param function Member function
/// address to call.
template <typename C>
Callback1( C* object, R ( C::*function )( T0 t0 ) ) :
mCallback( new ( &mMem ) ChildMethod<C>( object, function ) ) {}
@@ -274,8 +274,8 @@ template <typename R, typename T0> class Callback1 {
/// Sets the callback to a specific object and member function.
///\param object Pointer to the object to call upon. Care should be taken that this object
///remains valid as long as the callback may be invoked. \param function Member function address
///to call.
/// remains valid as long as the callback may be invoked. \param function Member function
/// address to call.
template <typename C> void Reset( C* object, R ( C::*function )( T0 t0 ) ) {
mCallback = new ( &mMem ) ChildMethod<C>( object, function );
}
@@ -422,8 +422,8 @@ template <typename R, typename T0, typename T1> class Callback2 {
public:
/// Constructs the callback to a specific object and member function.
///\param object Pointer to the object to call upon. Care should be taken that this object
///remains valid as long as the callback may be invoked. \param function Member function address
///to call.
/// remains valid as long as the callback may be invoked. \param function Member function
/// address to call.
template <typename C>
Callback2( C* object, R ( C::*function )( T0 t0, T1 t1 ) ) :
mCallback( new ( &mMem ) ChildMethod<C>( object, function ) ) {}
@@ -457,8 +457,8 @@ template <typename R, typename T0, typename T1> class Callback2 {
/// Sets the callback to a specific object and member function.
///\param object Pointer to the object to call upon. Care should be taken that this object
///remains valid as long as the callback may be invoked. \param function Member function address
///to call.
/// remains valid as long as the callback may be invoked. \param function Member function
/// address to call.
template <typename C> void Reset( C* object, R ( C::*function )( T0 t0, T1 t1 ) ) {
mCallback = new ( &mMem ) ChildMethod<C>( object, function );
}
@@ -609,8 +609,8 @@ template <typename R, typename T0, typename T1, typename T2> class Callback3 {
public:
/// Constructs the callback to a specific object and member function.
///\param object Pointer to the object to call upon. Care should be taken that this object
///remains valid as long as the callback may be invoked. \param function Member function address
///to call.
/// remains valid as long as the callback may be invoked. \param function Member function
/// address to call.
template <typename C>
Callback3( C* object, R ( C::*function )( T0 t0, T1 t1, T2 t2 ) ) :
mCallback( new ( &mMem ) ChildMethod<C>( object, function ) ) {}
@@ -644,8 +644,8 @@ template <typename R, typename T0, typename T1, typename T2> class Callback3 {
/// Sets the callback to a specific object and member function.
///\param object Pointer to the object to call upon. Care should be taken that this object
///remains valid as long as the callback may be invoked. \param function Member function address
///to call.
/// remains valid as long as the callback may be invoked. \param function Member function
/// address to call.
template <typename C> void Reset( C* object, R ( C::*function )( T0 t0, T1 t1, T2 t2 ) ) {
mCallback = new ( &mMem ) ChildMethod<C>( object, function );
}
@@ -796,8 +796,8 @@ template <typename R, typename T0, typename T1, typename T2, typename T3> class
public:
/// Constructs the callback to a specific object and member function.
///\param object Pointer to the object to call upon. Care should be taken that this object
///remains valid as long as the callback may be invoked. \param function Member function address
///to call.
/// remains valid as long as the callback may be invoked. \param function Member function
/// address to call.
template <typename C>
Callback4( C* object, R ( C::*function )( T0 t0, T1 t1, T2 t2, T3 t3 ) ) :
mCallback( new ( &mMem ) ChildMethod<C>( object, function ) ) {}
@@ -831,8 +831,8 @@ template <typename R, typename T0, typename T1, typename T2, typename T3> class
/// Sets the callback to a specific object and member function.
///\param object Pointer to the object to call upon. Care should be taken that this object
///remains valid as long as the callback may be invoked. \param function Member function address
///to call.
/// remains valid as long as the callback may be invoked. \param function Member function
/// address to call.
template <typename C>
void Reset( C* object, R ( C::*function )( T0 t0, T1 t1, T2 t2, T3 t3 ) ) {
mCallback = new ( &mMem ) ChildMethod<C>( object, function );
@@ -987,8 +987,8 @@ class Callback5 {
public:
/// Constructs the callback to a specific object and member function.
///\param object Pointer to the object to call upon. Care should be taken that this object
///remains valid as long as the callback may be invoked. \param function Member function address
///to call.
/// remains valid as long as the callback may be invoked. \param function Member function
/// address to call.
template <typename C>
Callback5( C* object, R ( C::*function )( T0 t0, T1 t1, T2 t2, T3 t3, T4 t4 ) ) :
mCallback( new ( &mMem ) ChildMethod<C>( object, function ) ) {}
@@ -1022,8 +1022,8 @@ class Callback5 {
/// Sets the callback to a specific object and member function.
///\param object Pointer to the object to call upon. Care should be taken that this object
///remains valid as long as the callback may be invoked. \param function Member function address
///to call.
/// remains valid as long as the callback may be invoked. \param function Member function
/// address to call.
template <typename C>
void Reset( C* object, R ( C::*function )( T0 t0, T1 t1, T2 t2, T3 t3, T4 t4 ) ) {
mCallback = new ( &mMem ) ChildMethod<C>( object, function );
@@ -1181,8 +1181,8 @@ class Callback6 {
public:
/// Constructs the callback to a specific object and member function.
///\param object Pointer to the object to call upon. Care should be taken that this object
///remains valid as long as the callback may be invoked. \param function Member function address
///to call.
/// remains valid as long as the callback may be invoked. \param function Member function
/// address to call.
template <typename C>
Callback6( C* object, R ( C::*function )( T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5 ) ) :
mCallback( new ( &mMem ) ChildMethod<C>( object, function ) ) {}
@@ -1216,8 +1216,8 @@ class Callback6 {
/// Sets the callback to a specific object and member function.
///\param object Pointer to the object to call upon. Care should be taken that this object
///remains valid as long as the callback may be invoked. \param function Member function address
///to call.
/// remains valid as long as the callback may be invoked. \param function Member function
/// address to call.
template <typename C>
void Reset( C* object, R ( C::*function )( T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5 ) ) {
mCallback = new ( &mMem ) ChildMethod<C>( object, function );
@@ -1379,8 +1379,8 @@ class Callback7 {
public:
/// Constructs the callback to a specific object and member function.
///\param object Pointer to the object to call upon. Care should be taken that this object
///remains valid as long as the callback may be invoked. \param function Member function address
///to call.
/// remains valid as long as the callback may be invoked. \param function Member function
/// address to call.
template <typename C>
Callback7( C* object, R ( C::*function )( T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6 ) ) :
mCallback( new ( &mMem ) ChildMethod<C>( object, function ) ) {}
@@ -1414,8 +1414,8 @@ class Callback7 {
/// Sets the callback to a specific object and member function.
///\param object Pointer to the object to call upon. Care should be taken that this object
///remains valid as long as the callback may be invoked. \param function Member function address
///to call.
/// remains valid as long as the callback may be invoked. \param function Member function
/// address to call.
template <typename C>
void Reset( C* object, R ( C::*function )( T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6 ) ) {
mCallback = new ( &mMem ) ChildMethod<C>( object, function );
@@ -1579,8 +1579,8 @@ class Callback8 {
public:
/// Constructs the callback to a specific object and member function.
///\param object Pointer to the object to call upon. Care should be taken that this object
///remains valid as long as the callback may be invoked. \param function Member function address
///to call.
/// remains valid as long as the callback may be invoked. \param function Member function
/// address to call.
template <typename C>
Callback8( C* object,
R ( C::*function )( T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7 ) ) :
@@ -1615,8 +1615,8 @@ class Callback8 {
/// Sets the callback to a specific object and member function.
///\param object Pointer to the object to call upon. Care should be taken that this object
///remains valid as long as the callback may be invoked. \param function Member function address
///to call.
/// remains valid as long as the callback may be invoked. \param function Member function
/// address to call.
template <typename C>
void Reset( C* object,
R ( C::*function )( T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7 ) ) {
@@ -1781,8 +1781,8 @@ class Callback9 {
public:
/// Constructs the callback to a specific object and member function.
///\param object Pointer to the object to call upon. Care should be taken that this object
///remains valid as long as the callback may be invoked. \param function Member function address
///to call.
/// remains valid as long as the callback may be invoked. \param function Member function
/// address to call.
template <typename C>
Callback9( C* object, R ( C::*function )( T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6,
T7 t7, T8 t8 ) ) :
@@ -1817,8 +1817,8 @@ class Callback9 {
/// Sets the callback to a specific object and member function.
///\param object Pointer to the object to call upon. Care should be taken that this object
///remains valid as long as the callback may be invoked. \param function Member function address
///to call.
/// remains valid as long as the callback may be invoked. \param function Member function
/// address to call.
template <typename C>
void Reset( C* object, R ( C::*function )( T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6,
T7 t7, T8 t8 ) ) {

View File

@@ -20,8 +20,8 @@ using namespace EE::System;
namespace EE { namespace UI { namespace CSS {
typedef std::function<Drawable*( const FunctionString& functionType, const Sizef& size,
bool& ownIt, UINode* node )>
typedef std::function<Drawable*( const FunctionString& functionType, const Sizef& size, bool& ownIt,
UINode* node )>
DrawableImageParserFunc;
class EE_API DrawableImageParser {

View File

@@ -62,6 +62,6 @@ class EE_API TextDocumentLine {
void updateHash() { mHash = mText.getHash(); }
};
}}}
}}} // namespace EE::UI::Doc
#endif // EE_UI_DOC_TEXTDOCUMENTLINE_HPP

View File

@@ -54,13 +54,9 @@ class EE_API TextRange {
return true;
}
bool hasSelection() const {
return isValid() && mStart != mEnd;
}
bool hasSelection() const { return isValid() && mStart != mEnd; }
bool inSameLine() const {
return isValid() && mStart.line() == mEnd.line();
}
bool inSameLine() const { return isValid() && mStart.line() == mEnd.line(); }
std::string toString() {
return String::format( "%s - %s", mStart.toString().c_str(), mEnd.toString().c_str() );

View File

@@ -23,7 +23,7 @@ template <typename T> class ItemListModel final : public Model {
virtual Variant data( const ModelIndex& index, Role role = Role::Display ) const {
if ( role == Role::Display )
return Variant( mData[ index.row() ] );
return Variant( mData[index.row()] );
return {};
}

View File

@@ -43,6 +43,6 @@ class EE_API ModelEditingDelegate {
UIWidget* mWidget;
};
}}} // namespace EE::UI::Model
}}} // namespace EE::UI::Models
#endif // EE_UI_MODELEDITINGDELEGATE_HPP

View File

@@ -9,9 +9,9 @@
#include <eepp/ui/uidropdownlist.hpp>
#include <eepp/ui/uigridlayout.hpp>
#include <eepp/ui/uilistbox.hpp>
#include <eepp/ui/uimenubar.hpp>
#include <eepp/ui/uispinbox.hpp>
#include <eepp/ui/uiwindow.hpp>
#include <eepp/ui/uimenubar.hpp>
namespace EE { namespace UI { namespace Tools {

View File

@@ -59,7 +59,7 @@ class EE_API UIScrollView : public UITouchDraggableWidget {
virtual void onAlphaChange();
virtual void onChildCountChange( Node * child, const bool& removed );
virtual void onChildCountChange( Node* child, const bool& removed );
virtual void onPaddingChange();

View File

@@ -102,7 +102,7 @@ class EE_API UISlider : public UIWidget {
virtual void onPaddingChange();
virtual Uint32 onMouseDown( const Vector2i& position, const Uint32& flags );;
virtual Uint32 onMouseDown( const Vector2i& position, const Uint32& flags );
void fixSliderPos();

View File

@@ -87,6 +87,7 @@ class EE_API UITextView : public UIWidget {
const Uint32& propertyIndex = 0 );
void setTextAlign( const Uint32& align );
protected:
Text* mTextCache;
String mString;

View File

@@ -41,9 +41,9 @@ class InputEvent {
struct KeySym {
Scancode scancode; /**< physical key code - see ::Scancode for details */
Keycode sym; /**< virtual key code - see ::Keycode for details */
Uint32 mod; /** current key modifiers */
Uint32 unicode; /** translated character */
Keycode sym; /**< virtual key code - see ::Keycode for details */
Uint32 mod; /** current key modifiers */
Uint32 unicode; /** translated character */
};
/** Application visibility event structure */

View File

@@ -141,6 +141,7 @@ class EE_API InputTextBuffer {
void setSelectionChangeCallback( const SelectionChangeCallback& selectionChangeCallback );
void selectAll();
protected:
enum Flags {
SUPPORT_NEW_LINE = 0,
@@ -188,7 +189,7 @@ class EE_API InputTextBuffer {
bool isIgnoredChar( const String::StringBaseType& c );
bool validChar(const String::StringBaseType& c );
bool validChar( const String::StringBaseType& c );
void tryAddChar( const String::StringBaseType& c );

View File

@@ -460,7 +460,7 @@ class EE_API Window {
const Sizei& getLastWindowedSize() const;
protected:
protected:
friend class Engine;
friend class Input;

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.12.2, 2020-08-17T01:30:18. -->
<!-- Written by QtCreator 4.12.2, 2020-08-18T01:07:54. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>

View File

@@ -7,7 +7,6 @@ SINGLETON_DECLARE_IMPLEMENTATION( GlobalTextureAtlas )
GlobalTextureAtlas::GlobalTextureAtlas() : TextureAtlas( "global" ) {}
GlobalTextureAtlas::~GlobalTextureAtlas() {
}
GlobalTextureAtlas::~GlobalTextureAtlas() {}
}} // namespace EE::Graphics

View File

@@ -16,8 +16,8 @@ TexturePacker* TexturePacker::New() {
TexturePacker* TexturePacker::New( const Uint32& maxWidth, const Uint32& maxHeight,
const Float& pixelDensity, const bool& forcePowOfTwo,
const bool& scalableSVG, const Uint32& pixelBorder,
const Texture::Filter& textureFilter,
const bool& allowChilds, const bool& allowFlipping ) {
const Texture::Filter& textureFilter, const bool& allowChilds,
const bool& allowFlipping ) {
return eeNew( TexturePacker, ( maxWidth, maxHeight, pixelDensity, forcePowOfTwo, scalableSVG,
pixelBorder, textureFilter, allowChilds, allowFlipping ) );
}
@@ -136,8 +136,8 @@ Uint32 TexturePacker::getAtlasNumChannels() {
void TexturePacker::setOptions( const Uint32& maxWidth, const Uint32& maxHeight,
const Float& pixelDensity, const bool& forcePowOfTwo,
const bool& scalableSVG, const Uint32& pixelBorder,
const Texture::Filter& textureFilter,
const bool& allowChilds, const bool& allowFlipping ) {
const Texture::Filter& textureFilter, const bool& allowChilds,
const bool& allowFlipping ) {
if ( !mTextures.size() ) { // only can change the dimensions before adding any texture
mMaxSize.x = maxWidth;
mMaxSize.y = maxHeight;

View File

@@ -4,8 +4,8 @@
#include <eepp/maps/base.hpp>
#include <eepp/maps/maphelper.hpp>
#include <eepp/maps/maplayer.hpp>
#include <eepp/ui/uiwidgettable.hpp>
#include <eepp/ui/uitextinput.hpp>
#include <eepp/ui/uiwidgettable.hpp>
#include <eepp/ui/uiwindow.hpp>
using namespace EE::UI;

View File

@@ -4,8 +4,8 @@
#include <eepp/maps/base.hpp>
#include <eepp/maps/gameobjectobject.hpp>
#include <eepp/maps/maphelper.hpp>
#include <eepp/ui/uiwidgettable.hpp>
#include <eepp/ui/uitextinput.hpp>
#include <eepp/ui/uiwidgettable.hpp>
#include <eepp/ui/uiwindow.hpp>
using namespace EE::UI;

View File

@@ -4,8 +4,8 @@
#include <eepp/maps/base.hpp>
#include <eepp/maps/tilemap.hpp>
#include <eepp/ui/uislider.hpp>
#include <eepp/ui/uiwidgettable.hpp>
#include <eepp/ui/uitextinput.hpp>
#include <eepp/ui/uiwidgettable.hpp>
#include <eepp/ui/uiwindow.hpp>
using namespace EE::UI;

View File

@@ -98,7 +98,7 @@ Time Spawn::getTotalTime() {
max = eemax( max, spawn->getTotalTime().asMicroseconds() );
}
return Microseconds(max);
return Microseconds( max );
}
Action* Spawn::clone() const {

View File

@@ -233,10 +233,10 @@ bool FileSystem::fileCanWrite( const std::string& filepath ) {
bool FileSystem::fileIsHidden( const std::string& filepath ) {
#if EE_PLATFORM == EE_PLATFORM_WIN
#if UNICODE
return 0 == ( GetFileAttributes( String::fromUtf8( filepath ).toWideString().c_str() ) &
return 0 != ( GetFileAttributes( String::fromUtf8( filepath ).toWideString().c_str() ) &
FILE_ATTRIBUTE_HIDDEN );
#else
return 0 == ( GetFileAttributes( (LPCTSTR)filepath.c_str() ) & FILE_ATTRIBUTE_HIDDEN );
return 0 != ( GetFileAttributes( (LPCTSTR)filepath.c_str() ) & FILE_ATTRIBUTE_HIDDEN );
#endif
#else
std::string filename( fileNameFromPath( filepath ) );

View File

@@ -363,7 +363,7 @@ init: /* using goto's to optimize tail recursion */
}
case '+': /* 1 or more repetitions */
s++; /* 1 match already done */
/* go through */
/* go through */
case '*': /* 0 or more repetitions */
s = max_expand( ms, s, p, ep );
break;

View File

@@ -4,16 +4,16 @@
#include <eepp/config.hpp>
#if defined( EE_PLATFORM_POSIX )
#include <eepp/system/platform/posix/threadimpl.hpp>
#include <eepp/system/platform/posix/muteximpl.hpp>
#include <eepp/system/platform/posix/clockimpl.hpp>
#include <eepp/system/platform/posix/conditionimpl.hpp>
#include <eepp/system/platform/posix/muteximpl.hpp>
#include <eepp/system/platform/posix/threadimpl.hpp>
#include <eepp/system/platform/posix/threadlocalimpl.hpp>
#elif EE_PLATFORM == EE_PLATFORM_WIN
#include <eepp/system/platform/win/threadimpl.hpp>
#include <eepp/system/platform/win/muteximpl.hpp>
#include <eepp/system/platform/win/clockimpl.hpp>
#include <eepp/system/platform/win/conditionimpl.hpp>
#include <eepp/system/platform/win/muteximpl.hpp>
#include <eepp/system/platform/win/threadimpl.hpp>
#include <eepp/system/platform/win/threadlocalimpl.hpp>
#else
#error Threads, mutexes, conditions, timers and thread local storage not implemented for this platform.

View File

@@ -10,7 +10,7 @@ namespace EE { namespace UI { namespace CSS {
#define MediaOrientationStrings "portrait;landscape"
#define MediaFeatureStrings \
#define MediaFeatureStrings \
"none;width;min-width;max-width;height;min-height;max-height;device-width;min-device-" \
"width;max-device-width;device-height;min-device-height;max-device-height;orientation;" \
"aspect-ratio;min-aspect-ratio;max-aspect-ratio;device-aspect-ratio;min-device-aspect-" \
@@ -18,8 +18,7 @@ namespace EE { namespace UI { namespace CSS {
"color-index;monochrome;min-monochrome;max-monochrome;resolution;min-resolution;max-" \
"resolution"
#define MediaTypeStrings \
"none;all;screen;print;braille;embossed;handheld;projection;speech;tty;tv"
#define MediaTypeStrings "none;all;screen;print;braille;embossed;handheld;projection;speech;tty;tv"
MediaQuery::MediaQuery() {
mMediaType = media_type_all;
@@ -56,8 +55,8 @@ MediaQuery::ptr MediaQuery::parse( const std::string& str ) {
if ( !exprTokens.empty() ) {
String::trimInPlace( exprTokens[0] );
expr.feature = (MediaFeature)String::valueIndex(
exprTokens[0], MediaFeatureStrings, media_feature_none );
expr.feature = (MediaFeature)String::valueIndex( exprTokens[0], MediaFeatureStrings,
media_feature_none );
if ( expr.feature != media_feature_none ) {
if ( exprTokens.size() == 1 ) {

View File

@@ -432,9 +432,13 @@ void StyleSheetSpecification::registerDefaultNodeSelectors() {
return NULL != node->getParent() && node->getParent()->getFirstChild() == node;
};
mNodeSelectors["enabled"] = []( const UIWidget* node, int a, int b,
const FunctionString& data ) -> bool { return node->isEnabled(); };
const FunctionString& data ) -> bool {
return node->isEnabled();
};
mNodeSelectors["disabled"] = []( const UIWidget* node, int a, int b,
const FunctionString& data ) -> bool { return !node->isEnabled(); };
const FunctionString& data ) -> bool {
return !node->isEnabled();
};
mNodeSelectors["first-of-type"] = []( const UIWidget* node, int a, int b,
const FunctionString& data ) -> bool {
Node* child = NULL != node->getParent() ? node->getParent()->getFirstChild() : NULL;
@@ -506,7 +510,8 @@ void StyleSheetSpecification::registerDefaultNodeSelectors() {
const FunctionString& data ) -> bool {
return 0 != ( node->getFlags() & UI_CHECKED );
};
mNodeSelectors["not"] = []( const UIWidget* node, int a, int b, const FunctionString& data ) -> bool {
mNodeSelectors["not"] = []( const UIWidget* node, int a, int b,
const FunctionString& data ) -> bool {
if ( !data.isEmpty() && !data.getParameters().empty() && data.getName() == "not" ) {
for ( const auto& param : data.getParameters() ) {
if ( !param.empty() ) {

View File

@@ -333,8 +333,8 @@ void TextureAtlasEditor::onTextureFilterChange( const Event* ) {
return;
Texture::Filter textureFilter = mTextureFilterList->getText() == "Nearest"
? Texture::Filter::Nearest
: Texture::Filter::Linear;
? Texture::Filter::Nearest
: Texture::Filter::Linear;
mTextureAtlasLoader->setTextureFilter( textureFilter );
}

View File

@@ -164,8 +164,8 @@ void TextureAtlasNew::textureAtlasSave( const Event* Event ) {
bool Res2 = String::fromString<Int32>( h, mComboHeight->getText() );
b = static_cast<Int32>( mPixelSpace->getValue() );
Texture::Filter textureFilter = mTextureFilter->getText() == "Nearest"
? Texture::Filter::Nearest
: Texture::Filter::Linear;
? Texture::Filter::Nearest
: Texture::Filter::Linear;
if ( Res1 && Res2 ) {
TexturePacker* texturePacker = TexturePacker::New(

View File

@@ -30,10 +30,10 @@ class EE_API TextureAtlasNew {
UIDropDownList* mSaveFileType;
UIDropDownList* mPixelDensity;
UIDropDownList* mTextureFilter;
UICheckBox * mForcePow2;
UICheckBox * mScalableSVG;
UICheckBox * mSaveExtensions;
UICheckBox * mAllowChilds;
UICheckBox* mForcePow2;
UICheckBox* mScalableSVG;
UICheckBox* mSaveExtensions;
UICheckBox* mAllowChilds;
void windowClose( const Event* Event );

View File

@@ -44,8 +44,7 @@ UIDropDownList::UIDropDownList( const std::string& tag ) :
mListBox->addEventListener( Event::OnItemKeyDown,
cb::Make1( this, &UIDropDownList::onItemKeyDown ) );
mListBox->addEventListener( Event::KeyDown, cb::Make1( this, &UIDropDownList::onItemKeyDown ) );
mListBox->addEventListener( Event::OnClear,
cb::Make1( this, &UIDropDownList::onWidgetClear ) );
mListBox->addEventListener( Event::OnClear, cb::Make1( this, &UIDropDownList::onWidgetClear ) );
}
UIDropDownList::~UIDropDownList() {
@@ -277,8 +276,7 @@ void UIDropDownList::hide() {
if ( NULL != getUISceneNode() &&
getUISceneNode()->getUIThemeManager()->getDefaultEffectsEnabled() ) {
mListBox->runAction( Actions::Sequence::New(
Actions::FadeOut::New(
getUISceneNode()->getUIThemeManager()->getWidgetsFadeOutTime() ),
Actions::FadeOut::New( getUISceneNode()->getUIThemeManager()->getWidgetsFadeOutTime() ),
Actions::Spawn::New( Actions::Disable::New(), Actions::Visible::New( false ) ) ) );
} else {
mListBox->setEnabled( false );

View File

@@ -74,7 +74,7 @@ void UIMenuBar::addMenuButton( const String& buttonText, UIPopUpMenu* menu ) {
button->unselect();
}
} );
menu->addEventListener( Event::OnItemClicked, [&] ( const Event* ) {
menu->addEventListener( Event::OnItemClicked, [&]( const Event* ) {
mWaitingUp = nullptr;
mCurrentMenu = nullptr;
} );

View File

@@ -125,7 +125,7 @@ Uint32 UIMenuSubMenu::onMouseLeave( const Vector2i& pos, const Uint32& flags ) {
}
Uint32 UIMenuSubMenu::onMouseClick( const Vector2i&, const Uint32& flags ) {
if ( (flags & EE_BUTTON_LMASK) && !mSubMenu->isVisible() )
if ( ( flags & EE_BUTTON_LMASK ) && !mSubMenu->isVisible() )
showSubMenu();
return 1;
}

View File

@@ -1,6 +1,6 @@
#include <eepp/ui/uimenubar.hpp>
#include <eepp/ui/uiselectbutton.hpp>
#include <eepp/ui/uistyle.hpp>
#include <eepp/ui/uimenubar.hpp>
namespace EE { namespace UI {

View File

@@ -234,8 +234,7 @@ void UISplitter::updateFromDrag() {
mFirstWidget->setPixelsPosition( mPaddingPx.Left, mPaddingPx.Top );
if ( UIOrientation::Horizontal == mOrientation ) {
mFirstWidget->setPixelsSize( mSplitter->getPixelsPosition().x - mPaddingPx.Left,
mSize.getHeight() - mPaddingPx.Top -
mPaddingPx.Bottom );
mSize.getHeight() - mPaddingPx.Top - mPaddingPx.Bottom );
} else {
mFirstWidget->setPixelsSize( mSize.getWidth() - mPaddingPx.Left - mPaddingPx.Right,
mSplitter->getPixelsPosition().y - mPaddingPx.Top );
@@ -247,10 +246,10 @@ void UISplitter::updateFromDrag() {
mLastWidget->setPixelsPosition( mSplitter->getPixelsPosition().x +
mSplitter->getPixelsSize().getWidth(),
mPaddingPx.Top );
mLastWidget->setPixelsSize(
mSize.getWidth() - mPaddingPx.Right - mSplitter->getPixelsPosition().x -
mSplitter->getPixelsSize().getWidth(),
mSize.getHeight() - mPaddingPx.Top - mPaddingPx.Bottom );
mLastWidget->setPixelsSize( mSize.getWidth() - mPaddingPx.Right -
mSplitter->getPixelsPosition().x -
mSplitter->getPixelsSize().getWidth(),
mSize.getHeight() - mPaddingPx.Top - mPaddingPx.Bottom );
} else {
mLastWidget->setPixelsPosition( mPaddingPx.Left,
mSplitter->getPixelsPosition().y +
@@ -327,8 +326,7 @@ void UISplitter::updateLayout() {
if ( mFirstWidget ) {
mFirstWidget->setPixelsPosition( mPaddingPx.Left, mPaddingPx.Top );
mFirstWidget->setPixelsSize( mSize.getWidth() - mPaddingPx.Left - mPaddingPx.Right,
mSize.getHeight() - mPaddingPx.Top -
mPaddingPx.Bottom );
mSize.getHeight() - mPaddingPx.Top - mPaddingPx.Bottom );
}
mDirtyLayout = false;
@@ -358,8 +356,8 @@ void UISplitter::updateLayout() {
firstSplit = eemax( firstSplit, fMinSize );
secondSplit = totalSpace - firstSplit;
mFirstWidget->setPixelsSize( firstSplit, mSize.getHeight() - mPaddingPx.Top -
mPaddingPx.Bottom );
mFirstWidget->setPixelsSize( firstSplit,
mSize.getHeight() - mPaddingPx.Top - mPaddingPx.Bottom );
mSplitter->setPixelsPosition( mFirstWidget->getPixelsPosition().x +
mFirstWidget->getPixelsSize().getWidth(),
@@ -389,8 +387,8 @@ void UISplitter::updateLayout() {
mLastWidget->setPixelsPosition( mSplitter->getPixelsPosition().x +
mSplitter->getPixelsSize().getWidth(),
mPaddingPx.Top );
mLastWidget->setPixelsSize( secondSplit, mSize.getHeight() - mPaddingPx.Top -
mPaddingPx.Bottom );
mLastWidget->setPixelsSize( secondSplit,
mSize.getHeight() - mPaddingPx.Top - mPaddingPx.Bottom );
} else {
mLastWidget->setPixelsPosition( mPaddingPx.Left,
mSplitter->getPixelsPosition().y +

View File

@@ -137,14 +137,15 @@ void UISprite::updateSize() {
if ( NULL != mSprite->getCurrentTextureRegion() ) {
if ( mWidthPolicy == SizePolicy::WrapContent ) {
setInternalPixelsWidth( mSprite->getCurrentTextureRegion()->getPixelsSize().getWidth() +
mPaddingPx.Left + mPaddingPx.Right );
setInternalPixelsWidth(
mSprite->getCurrentTextureRegion()->getPixelsSize().getWidth() +
mPaddingPx.Left + mPaddingPx.Right );
}
if ( mHeightPolicy == SizePolicy::WrapContent ) {
setInternalPixelsHeight(
mSprite->getCurrentTextureRegion()->getPixelsSize().getHeight() + mPaddingPx.Top +
mPaddingPx.Bottom );
mSprite->getCurrentTextureRegion()->getPixelsSize().getHeight() +
mPaddingPx.Top + mPaddingPx.Bottom );
}
}
}

View File

@@ -100,9 +100,8 @@ void UITextInput::onCursorPosChange() {
void UITextInput::drawWaitingCursor() {
if ( mVisible && hasFocus() && mShowingWait && mAllowEditing ) {
Vector2f cursor(
eefloor( mScreenPos.x + mRealAlignOffset.x + mCurPos.x + mPaddingPx.Left ),
mScreenPos.y + mRealAlignOffset.y + mCurPos.y + mPaddingPx.Top );
Vector2f cursor( eefloor( mScreenPos.x + mRealAlignOffset.x + mCurPos.x + mPaddingPx.Left ),
mScreenPos.y + mRealAlignOffset.y + mCurPos.y + mPaddingPx.Top );
Primitives primitives;
primitives.setColor( Color( mFontStyleConfig.FontColor ).blendAlpha( mAlpha ) );
@@ -138,8 +137,7 @@ void UITextInput::draw() {
}
mTextCache->setAlign( getFlags() );
mTextCache->draw( (Float)mScreenPosi.x + (int)mRealAlignOffset.x +
(int)mPaddingPx.Left,
mTextCache->draw( (Float)mScreenPosi.x + (int)mRealAlignOffset.x + (int)mPaddingPx.Left,
mFontLineCenter + (Float)mScreenPosi.y + (int)mRealAlignOffset.y +
(int)mPaddingPx.Top,
Vector2f::One, 0.f, getBlendMode() );
@@ -154,8 +152,7 @@ void UITextInput::draw() {
mSize.getHeight() - mPaddingPx.Top - mPaddingPx.Bottom );
}
mHintCache->draw( (Float)mScreenPosi.x + (int)mRealAlignOffset.x +
(int)mPaddingPx.Left,
mHintCache->draw( (Float)mScreenPosi.x + (int)mRealAlignOffset.x + (int)mPaddingPx.Left,
mFontLineCenter + (Float)mScreenPosi.y + (int)mRealAlignOffset.y +
(int)mPaddingPx.Top,
Vector2f::One, 0.f, getBlendMode() );

View File

@@ -36,10 +36,9 @@ void UITextInputPassword::draw() {
}
mPassCache->setAlign( getFlags() );
mPassCache->draw(
(Float)mScreenPosi.x + (int)mRealAlignOffset.x + (int)mPaddingPx.Left,
(Float)mScreenPosi.y + (int)mRealAlignOffset.y + (int)mPaddingPx.Top,
Vector2f::One, 0.f, getBlendMode() );
mPassCache->draw( (Float)mScreenPosi.x + (int)mRealAlignOffset.x + (int)mPaddingPx.Left,
(Float)mScreenPosi.y + (int)mRealAlignOffset.y + (int)mPaddingPx.Top,
Vector2f::One, 0.f, getBlendMode() );
if ( isClipped() ) {
clipSmartDisable();
@@ -51,8 +50,7 @@ void UITextInputPassword::draw() {
mSize.getHeight() - mPaddingPx.Top - mPaddingPx.Bottom );
}
mHintCache->draw( (Float)mScreenPosi.x + (int)mHintAlignOffset.x +
(int)mPaddingPx.Left,
mHintCache->draw( (Float)mScreenPosi.x + (int)mHintAlignOffset.x + (int)mPaddingPx.Left,
mFontLineCenter + (Float)mScreenPosi.y + (int)mHintAlignOffset.y +
(int)mPaddingPx.Top,
Vector2f::One, 0.f, getBlendMode() );

View File

@@ -56,8 +56,8 @@ void UITextureRegion::onAutoSize() {
if ( mWidthPolicy == SizePolicy::WrapContent || mHeightPolicy == SizePolicy::WrapContent ) {
if ( mWidthPolicy == SizePolicy::WrapContent ) {
setInternalPixelsWidth( mTextureRegion->getPixelsSize().getWidth() + mPaddingPx.Left +
mPaddingPx.Right );
setInternalPixelsWidth( mTextureRegion->getPixelsSize().getWidth() +
mPaddingPx.Left + mPaddingPx.Right );
}
if ( mHeightPolicy == SizePolicy::WrapContent ) {
@@ -92,10 +92,8 @@ void UITextureRegion::draw() {
mTextureRegion->setOffset( Vector2i( 0, 0 ) );
Sizef pxSize = mTextureRegion->getPixelsSize();
Float Scale1 =
( mSize.x - mPaddingPx.Left - mPaddingPx.Right ) / (Float)pxSize.x;
Float Scale2 =
( mSize.y - mPaddingPx.Top - mPaddingPx.Bottom ) / (Float)pxSize.y;
Float Scale1 = ( mSize.x - mPaddingPx.Left - mPaddingPx.Right ) / (Float)pxSize.x;
Float Scale2 = ( mSize.y - mPaddingPx.Top - mPaddingPx.Bottom ) / (Float)pxSize.y;
if ( Scale1 < 1 || Scale2 < 1 ) {
if ( Scale2 < Scale1 )

View File

@@ -84,8 +84,7 @@ void UITextView::draw() {
}
mTextCache->setAlign( getFlags() );
mTextCache->draw( (Float)mScreenPosi.x + (int)mRealAlignOffset.x +
(int)mPaddingPx.Left,
mTextCache->draw( (Float)mScreenPosi.x + (int)mRealAlignOffset.x + (int)mPaddingPx.Left,
mFontLineCenter + (Float)mScreenPosi.y + (int)mRealAlignOffset.y +
(int)mPaddingPx.Top,
Vector2f::One, 0.f, getBlendMode() );
@@ -704,7 +703,7 @@ std::string UITextView::getPropertyString( const PropertyDefinition* propertyDef
}
void UITextView::setTextAlign( const Uint32& align ) {
mFlags &= ~(UI_HALIGN_CENTER|UI_HALIGN_RIGHT);
mFlags &= ~( UI_HALIGN_CENTER | UI_HALIGN_RIGHT );
mFlags |= align;
onAlignChange();
}

View File

@@ -20,7 +20,6 @@ UITooltip::UITooltip() :
mTextCache = Text::New();
mEnabled = false;
UITheme* theme = getUISceneNode()->getUIThemeManager()->getDefaultTheme();
if ( NULL != theme && NULL != theme->getDefaultFont() ) {
@@ -186,8 +185,8 @@ void UITooltip::autoAlign() {
switch ( Font::getHorizontalAlign( getFlags() ) ) {
case UI_HALIGN_CENTER:
mAlignOffset.x = mPaddingPx.Left +
( Float )( ( Int32 )( Width - mTextCache->getTextWidth() ) / 2 );
mAlignOffset.x =
mPaddingPx.Left + ( Float )( ( Int32 )( Width - mTextCache->getTextWidth() ) / 2 );
break;
case UI_HALIGN_RIGHT:
mAlignOffset.x =

View File

@@ -15,8 +15,8 @@ void DisplayManagerSDL2::setDPIAwareness() {
if ( DISPLAY_REQUEST_DPI_AWARENESS ) {
void* user32 = Sys::loadObject( "user32.dll" );
if ( user32 ) {
int (*SetProcessDPIAware)() =
(int (*)()) Sys::loadFunction( user32, "SetProcessDPIAware" );
int ( *SetProcessDPIAware )() =
(int ( * )())Sys::loadFunction( user32, "SetProcessDPIAware" );
if ( SetProcessDPIAware ) {
SetProcessDPIAware();
DISPLAY_REQUEST_DPI_AWARENESS = false;
@@ -43,9 +43,9 @@ Float DisplaySDL2::getDPI() {
#if EE_PLATFORM == EE_PLATFORM_EMSCRIPTEN
return 96.f * emscripten_get_device_pixel_ratio();
#else
#if EE_PLATFORM == EE_PLATFORM_WIN
#if EE_PLATFORM == EE_PLATFORM_WIN
DisplayManagerSDL2::setDPIAwareness();
#endif
#endif
float ddpi, hdpi, vdpi;
if ( 0 == SDL_GetDisplayDPI( 0, &ddpi, &hdpi, &vdpi ) )
return ddpi;
@@ -110,9 +110,9 @@ Rect DisplaySDL2::getUsableBounds() {
}
int DisplayManagerSDL2::getDisplayCount() {
#if EE_PLATFORM == EE_PLATFORM_WIN
#if EE_PLATFORM == EE_PLATFORM_WIN
setDPIAwareness();
#endif
#endif
if ( !SDL_WasInit( SDL_INIT_VIDEO ) )
SDL_Init( SDL_INIT_VIDEO );
return SDL_GetNumVideoDisplays();

View File

@@ -28,9 +28,9 @@ class EE_API DisplaySDL2 : public Display {
class EE_API DisplayManagerSDL2 : public DisplayManager {
public:
#if EE_PLATFORM == EE_PLATFORM_WIN
#if EE_PLATFORM == EE_PLATFORM_WIN
static void setDPIAwareness();
#endif
#endif
int getDisplayCount();

View File

@@ -215,9 +215,9 @@ WindowSDL::~WindowSDL() {
}
bool WindowSDL::create( WindowSettings Settings, ContextSettings Context ) {
#if EE_PLATFORM == EE_PLATFORM_WIN
#if EE_PLATFORM == EE_PLATFORM_WIN
DisplayManagerSDL2::setDPIAwareness();
#endif
#endif
if ( mWindow.Created )
return false;

View File

@@ -18,7 +18,7 @@
namespace EE { namespace Window { namespace Backend { namespace SDL2 {
#ifdef EE_WMINFO
WMInfo::WMInfo( SDL_Window* win ) : mWMInfo( eeMalloc( sizeof(SDL_SysWMinfo) ) ) {
WMInfo::WMInfo( SDL_Window* win ) : mWMInfo( eeMalloc( sizeof( SDL_SysWMinfo ) ) ) {
SDL_SysWMinfo* info = static_cast<SDL_SysWMinfo*>( mWMInfo );
SDL_VERSION( &info->version );
SDL_GetWindowWMInfo( win, info );

View File

@@ -164,8 +164,8 @@ EE_MAIN_FUNC int main( int argc, char* argv[] ) {
addIcon( "tree-expanded", 0xea50 );
addIcon( "tree-contracted", 0xea54 );
addIcon( "file", 0xecc3 );
//addIcon( "arrow-up", 0xea78 );
//addIcon( "arrow-down", 0xea4e );
// addIcon( "arrow-up", 0xea78 );
// addIcon( "arrow-down", 0xea4e );
UISceneNode* uiSceneNode = UISceneNode::New();
SceneManager::instance()->add( uiSceneNode );
uiSceneNode->getUIThemeManager()->setDefaultFont( font );
@@ -194,16 +194,16 @@ EE_MAIN_FUNC int main( int argc, char* argv[] ) {
Clock clock;
auto model = FileSystemModel::New( "." ); // std::make_shared<TestModel>();
//UITreeView* view = UITreeView::New();
// UITreeView* view = UITreeView::New();
UITableView* view = UITableView::New();
//view->setExpanderIconSize( PixelDensity::dpToPx( 20 ) );
// view->setExpanderIconSize( PixelDensity::dpToPx( 20 ) );
view->setId( "treeview" );
/*view->setExpandedIcon( open );
view->setContractedIcon( closed );*/
view->setLayoutSizePolicy( SizePolicy::MatchParent, SizePolicy::MatchParent );
view->setParent( vlay );
view->setModel( SortingProxyModel::New( model ) );
//view->setModel( model );
// view->setModel( model );
eePRINTL( "Total time: %.2fms", clock.getElapsedTime().asMilliseconds() );
UIWindow* uiWin = UIWindow::NewOpt( UIWindow::LINEAR_LAYOUT );

View File

@@ -71,8 +71,7 @@ EE_MAIN_FUNC int main( int argc, char* argv[] ) {
parser, "texture-filter",
"Texture filter to use with the texture atlas. Available filters: \"linear\" or "
"\"nearest\".",
{"texture-filter"}, textureFilterMap, Texture::Filter::Linear,
args::Options::Single );
{"texture-filter"}, textureFilterMap, Texture::Filter::Linear, args::Options::Single );
try {
parser.ParseCLI( argc, argv );