From 7214cbbe8cb2cb9d5aab54b6e1e05787ad939cdd Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Mon, 15 Feb 2016 23:03:13 +0100 Subject: [PATCH] [DEV] update new API of ewol ==> not update local ... --- ege/Environement.cpp | 2 +- ege/Environement.h | 4 ++-- ege/Particule.cpp | 5 +++-- ege/Particule.h | 6 +++--- ege/ParticuleEngine.cpp | 4 +++- ege/ParticuleEngine.h | 13 +++++-------- ege/ParticuleSimple.cpp | 2 +- ege/ParticuleSimple.h | 2 +- ege/widget/Scene.cpp | 6 +++--- ege/widget/Scene.h | 2 +- 10 files changed, 23 insertions(+), 23 deletions(-) diff --git a/ege/Environement.cpp b/ege/Environement.cpp index bfee620..cae7b5c 100644 --- a/ege/Environement.cpp +++ b/ege/Environement.cpp @@ -293,7 +293,7 @@ ege::Environement::Environement() : m_listElement(), m_status(*this, "status", gameStop, "Satus of the activity of the Environement"), m_ratio(*this, "ratio", 1.0f, "game speed ratio"), - m_particuleEngine(*this) { + m_particuleEngine(this) { // nothing to do ... m_status.add(gameStart, "start", "Scene is started"); m_status.add(gamePause, "pause", "Scene is paused"); diff --git a/ege/Environement.h b/ege/Environement.h index 02645eb..4f9fb90 100644 --- a/ege/Environement.h +++ b/ege/Environement.h @@ -12,6 +12,7 @@ namespace ege { class ElementInteraction; }; #include +#include #include #include @@ -21,11 +22,10 @@ class btDynamicsWorld; #include #include #include -#include #include #include #include -#include +#include #include #include diff --git a/ege/Particule.cpp b/ege/Particule.cpp index ae19457..8cea63d 100644 --- a/ege/Particule.cpp +++ b/ege/Particule.cpp @@ -8,13 +8,14 @@ #include #include +#include #undef __class__ #define __class__ "Particule" -ege::Particule::Particule(ege::ParticuleEngine& _particuleEngine, const char* _particuleType) : +ege::Particule::Particule(ege::ParticuleEngine* _particuleEngine, const char* _particuleType) : m_particuleEngine(_particuleEngine), m_particuleType(_particuleType) { - m_particuleEngine.add(this); + m_particuleEngine->add(this); } diff --git a/ege/Particule.h b/ege/Particule.h index 911a348..b15ae2b 100644 --- a/ege/Particule.h +++ b/ege/Particule.h @@ -8,7 +8,7 @@ #pragma once namespace ege { - class Particule; + class ParticuleEngine; }; #include @@ -24,7 +24,7 @@ namespace ege { */ class Particule { protected: - ege::ParticuleEngine& m_particuleEngine; + ege::ParticuleEngine* m_particuleEngine; const char* m_particuleType; public: /** @@ -32,7 +32,7 @@ namespace ege { * @param[in] _particuleEngine reference on the particule engine ... * @param[in] _particuleType Type of the particule (set nullptr if you did not want to use the respowner ...) */ - Particule(ege::ParticuleEngine& _particuleEngine, const char* _particuleType = nullptr); + Particule(ege::ParticuleEngine* _particuleEngine, const char* _particuleType = nullptr); /** * @brief Destructor. */ diff --git a/ege/ParticuleEngine.cpp b/ege/ParticuleEngine.cpp index 5bff0f4..84573ca 100644 --- a/ege/ParticuleEngine.cpp +++ b/ege/ParticuleEngine.cpp @@ -8,11 +8,13 @@ #include #include +#include +#include #undef __class__ #define __class__ "ParticuleEngine" -ege::ParticuleEngine::ParticuleEngine(ege::Environement& _env) : +ege::ParticuleEngine::ParticuleEngine(ege::Environement* _env) : m_env(_env) { } diff --git a/ege/ParticuleEngine.h b/ege/ParticuleEngine.h index c70da27..af7758e 100644 --- a/ege/ParticuleEngine.h +++ b/ege/ParticuleEngine.h @@ -5,24 +5,21 @@ * * @license BSD v3 (see license file) */ - -#include #pragma once - namespace ege { - class ParticuleEngine; + class Environement; + class Particule; }; - #include #include -#include +#include namespace ege { class ParticuleEngine { private: - ege::Environement& m_env; + ege::Environement* m_env; public: - ParticuleEngine(ege::Environement& _env); // note : need the engine to register has an dynamic element ... (the first ...) + ParticuleEngine(ege::Environement* _env); // note : need the engine to register has an dynamic element ... (the first ...) ~ParticuleEngine(); private: std::vector m_particuleList; //!< all particule created and active diff --git a/ege/ParticuleSimple.cpp b/ege/ParticuleSimple.cpp index 9eb82c5..d8b3fa2 100644 --- a/ege/ParticuleSimple.cpp +++ b/ege/ParticuleSimple.cpp @@ -12,7 +12,7 @@ #undef __class__ #define __class__ "ParticuleSimple" -ege::ParticuleSimple::ParticuleSimple(ege::ParticuleEngine& _particuleEngine, const char* _particuleType) : +ege::ParticuleSimple::ParticuleSimple(ege::ParticuleEngine* _particuleEngine, const char* _particuleType) : Particule(_particuleEngine, _particuleType) { init(); } diff --git a/ege/ParticuleSimple.h b/ege/ParticuleSimple.h index 85b29ba..e5a180d 100644 --- a/ege/ParticuleSimple.h +++ b/ege/ParticuleSimple.h @@ -32,7 +32,7 @@ namespace ege { * @param[in] _name Name of the particule. * @param[in] _standalone The particule are created and have there own life (no dynamic control) */ - ParticuleSimple(ege::ParticuleEngine& _particuleEngine, const char* _particuleType); + ParticuleSimple(ege::ParticuleEngine* _particuleEngine, const char* _particuleType); /** * @brief Destructor. */ diff --git a/ege/widget/Scene.cpp b/ege/widget/Scene.cpp index 7ad0d06..17138dc 100644 --- a/ege/widget/Scene.cpp +++ b/ege/widget/Scene.cpp @@ -47,7 +47,7 @@ void ege::widget::Scene::init(std::shared_ptr _env) { m_env = _env; ewol::Widget::init(); setKeyboardRepeate(false); - setCanHaveFocus(true); + propertyCanFocus.set(true); periodicCallEnable(); m_debugDrawProperty = ewol::resource::Colored3DObject::create(); } @@ -207,8 +207,8 @@ void ege::widget::Scene::setCamera(const std::string& _cameraName) { } } -void ege::widget::Scene::calculateSize(const vec2& _available) { - ewol::Widget::calculateSize(_available); +void ege::widget::Scene::calculateSize() { + ewol::Widget::calculateSize(); // Update camera aspect ratio: std::shared_ptr camera = m_env->getCamera(m_cameraName); if (camera != nullptr) { diff --git a/ege/widget/Scene.h b/ege/widget/Scene.h index 8a9e917..f191d35 100644 --- a/ege/widget/Scene.h +++ b/ege/widget/Scene.h @@ -78,7 +78,7 @@ namespace ege { virtual void systemDraw(const ewol::DrawProperty& _displayProp); virtual void onRegenerateDisplay(); virtual void periodicCall(const ewol::event::Time& _event); - virtual void calculateSize(const vec2& _available); + virtual void calculateSize(); protected: eproperty::Value m_debugPhysic; //!< display Physic Debug public: