From b055156aa63c36f1cbbae6881879fd9bd41d90bd Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Fri, 21 Feb 2014 21:21:41 +0100 Subject: [PATCH] [DEV] add basic cmake generator (not work) --- external/CMakeLists.txt | 2 ++ external/bullet/CMakeLists.txt | 27 +++++++++++++++++++++ external/bullet/bullet | 2 +- external/etk | 2 +- external/png | 2 +- sources/ewol/resource/DistanceFieldFont.cpp | 7 ++++-- sources/ewol/widget/Button.cpp | 11 ++++++--- sources/ewol/widget/Button.h | 1 + 8 files changed, 45 insertions(+), 9 deletions(-) create mode 100644 external/CMakeLists.txt create mode 100644 external/bullet/CMakeLists.txt diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt new file mode 100644 index 00000000..ac07a7dd --- /dev/null +++ b/external/CMakeLists.txt @@ -0,0 +1,2 @@ +#SUBDIRS(bullet/bullet/src z/zlib/ etk png ) +SUBDIRS(bullet z/zlib/ etk png ) \ No newline at end of file diff --git a/external/bullet/CMakeLists.txt b/external/bullet/CMakeLists.txt new file mode 100644 index 00000000..666d0fd7 --- /dev/null +++ b/external/bullet/CMakeLists.txt @@ -0,0 +1,27 @@ +cmake_minimum_required(VERSION 2.6) + +# Declare the project +project(bulletlib) + +# set output path: +set(LIBRARY_OUTPUT_PATH lib/${CMAKE_BUILD_TYPE}) + +include_directories(bullet/src) + +#Create src file list +set(src_files + bullet/src/LinearMath/btQuickprof.cpp + bullet/src/LinearMath/btGeometryUtil.cpp + bullet/src/LinearMath/btAlignedAllocator.cpp + bullet/src/LinearMath/btSerializer.cpp + bullet/src/LinearMath/btConvexHull.cpp + bullet/src/LinearMath/btPolarDecomposition.cpp + bullet/src/LinearMath/btVector3.cpp + bullet/src/LinearMath/btConvexHullComputer.cpp +) + +#add_definitions( -DDEBUG_LEVEL=3 ) + +#Create a static Lib: +add_library(linearmath STATIC ${src_files} ) + diff --git a/external/bullet/bullet b/external/bullet/bullet index 5a7a38c1..99f63824 160000 --- a/external/bullet/bullet +++ b/external/bullet/bullet @@ -1 +1 @@ -Subproject commit 5a7a38c1824799bbd5030f0d7ed784895802cd1c +Subproject commit 99f638245307b977c7926e373d01b73c2cf3b4b3 diff --git a/external/etk b/external/etk index 89d9bc87..48448f46 160000 --- a/external/etk +++ b/external/etk @@ -1 +1 @@ -Subproject commit 89d9bc87ad5570400a54be781b6750dabcbafd35 +Subproject commit 48448f465dcdda58a94bd0a373244465c21e70dd diff --git a/external/png b/external/png index 2b5aabe6..6e0a9a2e 160000 --- a/external/png +++ b/external/png @@ -1 +1 @@ -Subproject commit 2b5aabe60cad2b53a2a4f8808f50860e918c638b +Subproject commit 6e0a9a2e2d428f3270a59010a5241db0e46d1196 diff --git a/sources/ewol/resource/DistanceFieldFont.cpp b/sources/ewol/resource/DistanceFieldFont.cpp index cc30aee5..f0eed3fa 100644 --- a/sources/ewol/resource/DistanceFieldFont.cpp +++ b/sources/ewol/resource/DistanceFieldFont.cpp @@ -21,8 +21,11 @@ #undef __class__ #define __class__ "resource::DistanceFieldFont" - -#define SIZE_GENERATION (30) +#ifdef __TARGET_OS__Android + #define SIZE_GENERATION (20) +#else + #define SIZE_GENERATION (30) +#endif ewol::resource::DistanceFieldFont::DistanceFieldFont(const std::string& _fontName) : ewol::resource::Texture(_fontName), diff --git a/sources/ewol/widget/Button.cpp b/sources/ewol/widget/Button.cpp index 77b7b446..807ca9f1 100644 --- a/sources/ewol/widget/Button.cpp +++ b/sources/ewol/widget/Button.cpp @@ -230,10 +230,7 @@ bool ewol::widget::Button::onEventInput(const ewol::event::Input& _event) { } } } - if( m_mouseHover != previousHoverState - || m_buttonPressed != previousPressed) { - CheckStatus(); - } + CheckStatus(); return m_mouseHover; } @@ -249,6 +246,12 @@ bool ewol::widget::Button::onEventEntry(const ewol::event::Entry& _event) { return false; } +void ewol::widget::Button::onLostFocus(void) { + m_buttonPressed = false; + EWOL_VERBOSE(getName() << " : Remove Focus ..."); + CheckStatus(); +} + void ewol::widget::Button::CheckStatus(void) { if (true == m_buttonPressed) { changeStatusIn(STATUS_PRESSED); diff --git a/sources/ewol/widget/Button.h b/sources/ewol/widget/Button.h index 05886dca..f98b659b 100644 --- a/sources/ewol/widget/Button.h +++ b/sources/ewol/widget/Button.h @@ -142,6 +142,7 @@ namespace ewol { } private: // derived function virtual void periodicCall(const ewol::event::Time& _event); + virtual void onLostFocus(void); }; }; };