Removed and repleaced all Nodes delete without a previous close() call. This fixes a possible crash on UIListBox, UITable and UITabWidget.

Fixed UIWindow frame buffer pixel density.
Allow "text-decoration" CSS property.
Fixed a crash on the TextureAtlasEditor.
Added Action::getCurrentProgress().

--HG--
branch : dev
This commit is contained in:
Martín Lucas Golini
2019-11-26 04:21:41 -03:00
parent 634ea7f3cb
commit 246fa4bf80
33 changed files with 134 additions and 78 deletions

View File

@@ -69,9 +69,6 @@ class EE_API TextureAtlasLoader {
~TextureAtlasLoader();
/** In the case that the loader is threaded, to know if the texture atlas was loaded, the main thread must call Update to update the state of the load. And finish the job. */
void update();
/** Loads a texture atlas from its path ( the texture atlas binary is expected, not the texture, the ".eta" file ).
* If the loader is not threaded, it will load the atlas immediately.
* @param TextureAtlasPath The texture atlas path.
@@ -107,7 +104,7 @@ class EE_API TextureAtlasLoader {
/** @return True if the texture atlas is loaded. */
const bool& isLoaded() const;
/** @return True if the texture atlas is loading. */
const bool& isLoading() const;

View File

@@ -126,6 +126,8 @@ class EE_API Interpolation1d {
UintPtr getData() const;
void setData(const UintPtr & data);
Float getCurrentProgress();
protected:
UintPtr mData;
int mType;

View File

@@ -128,6 +128,8 @@ class EE_API Interpolation2d {
UintPtr getData() const;
void setData(const UintPtr & data);
Float getCurrentProgress();
protected:
UintPtr mData;
int mType;

View File

@@ -35,6 +35,8 @@ class EE_API Action {
virtual bool isDone() = 0;
virtual Float getCurrentProgress() = 0;
virtual Action * clone() const;
virtual Action * reverse() const;

View File

@@ -17,6 +17,8 @@ class EE_API ActionInterpolation1d : public Action {
bool isDone() override;
Float getCurrentProgress();
Interpolation1d * getInterpolation();
protected:
mutable Interpolation1d mInterpolation;

View File

@@ -17,6 +17,8 @@ class EE_API ActionInterpolation2d : public Action {
bool isDone() override;
Float getCurrentProgress() override;
Interpolation2d * getInterpolation();
protected:
mutable Interpolation2d mInterpolation;

View File

@@ -10,7 +10,7 @@ namespace EE { namespace Scene { namespace Actions {
class EE_API Delay : public Action {
public:
static Delay * New( const Time& time );
void start() override;
void stop() override;
@@ -19,6 +19,8 @@ class EE_API Delay : public Action {
bool isDone() override;
Float getCurrentProgress() override;
Action * clone() const override;
Action * reverse() const override;
@@ -26,11 +28,11 @@ class EE_API Delay : public Action {
protected:
Clock mClock;
Time mTime;
Delay( const Time& time );
};
}}}
}}}
#endif

View File

@@ -33,6 +33,8 @@ class EE_API MarginMove : public Action {
Action * reverse() const override;
Float getCurrentProgress();
Interpolation1d getInterpolationLeft() const;
void setInterpolationLeft(const Interpolation1d & interpolationLeft);

View File

@@ -25,6 +25,8 @@ class EE_API Sequence : public Action {
bool isDone() override;
Float getCurrentProgress();
Action * clone() const override;
Action * reverse() const override;
@@ -34,11 +36,11 @@ class EE_API Sequence : public Action {
protected:
std::vector<Action*> mSequence;
Uint32 mCurPos;
Sequence( const std::vector<Action*> sequence );
};
}}}
}}}
#endif

View File

@@ -25,6 +25,8 @@ class EE_API Spawn : public Action {
bool isDone() override;
Float getCurrentProgress();
Action * clone() const override;
Action * reverse() const override;
@@ -33,11 +35,11 @@ class EE_API Spawn : public Action {
protected:
std::vector<Action*> mSpawn;
bool mAllDone;
Spawn( const std::vector<Action*> spawn );
};
}}}
}}}
#endif

View File

@@ -36,6 +36,8 @@ class EE_API Tint : public Action {
Action * reverse() const override;
Float getCurrentProgress();
Interpolation1d getInterpolationR() const;
void setInterpolationR(const Interpolation1d & interpolationR);

View File

@@ -33,25 +33,6 @@ class EE_API TextureAtlasEditor {
bool isEdited() { return mEdited; }
protected:
class UITGEUpdater : public UINode
{
public:
explicit UITGEUpdater( TextureAtlasEditor * TGEditor ) :
UINode(),
mTGEditor( TGEditor )
{
subscribeScheduledUpdate();
}
~UITGEUpdater() {
}
virtual void scheduledUpdate( const Time& ) { mTGEditor->update(); }
protected:
TextureAtlasEditor * mTGEditor;
};
friend class UITGEUpdater;
UIWindow * mUIWindow;
Node * mUIContainer;
UITheme * mTheme;
@@ -68,7 +49,6 @@ class EE_API TextureAtlasEditor {
UIWinMenu * mWinMenu;
UIDropDownList * mTextureFilterList;
TextureAtlasTextureRegionEditor * mTextureRegionEditor;
UITGEUpdater * mTGEU;
bool mEdited;
void windowClose( const Event * Event );

View File

@@ -38,6 +38,8 @@ class EE_API UINodeDrawable : public Drawable {
bool isDone() override;
Float getCurrentProgress();
Action * clone() const override;
Action * reverse() const override;