From 42984619d763b7ef99298d24dedbfb59361a74fe Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Thu, 28 Nov 2013 21:24:20 +0100 Subject: [PATCH] [DEV] update cursor dusplay function --- build | 2 +- external/etk | 2 +- sources/ewol/compositing/Text.cpp | 4 ++-- sources/ewol/compositing/Text.h | 3 ++- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/build b/build index 18b7c4a3..b685e844 160000 --- a/build +++ b/build @@ -1 +1 @@ -Subproject commit 18b7c4a34a599f24add0d67a0a10e20582adf5d2 +Subproject commit b685e8442a30802718a5bcae77a1c0fc14c1fbba diff --git a/external/etk b/external/etk index 9e93578b..4d1a39ad 160000 --- a/external/etk +++ b/external/etk @@ -1 +1 @@ -Subproject commit 9e93578be9d48f8cbf21de9fe56ceaf17eeb8b21 +Subproject commit 4d1a39adcbf9e12677f5357eefc1e9499a5d41a3 diff --git a/sources/ewol/compositing/Text.cpp b/sources/ewol/compositing/Text.cpp index 34a94f11..ce1c137f 100644 --- a/sources/ewol/compositing/Text.cpp +++ b/sources/ewol/compositing/Text.cpp @@ -1160,10 +1160,10 @@ vec3 ewol::Text::calculateSize(const char32_t& _charcode) { } -void ewol::Text::printCursor(bool _isInsertMode) { +void ewol::Text::printCursor(bool _isInsertMode, float _cursorSize) { int32_t fontHeigh = m_font->getHeight(m_mode); if (true == _isInsertMode) { - m_vectorialDraw.rectangleWidth(vec3(20, fontHeigh, 0) ); + m_vectorialDraw.rectangleWidth(vec3(_cursorSize, fontHeigh, 0) ); } else { m_vectorialDraw.setThickness(2); m_vectorialDraw.lineRel( vec3(0, fontHeigh, 0) ); diff --git a/sources/ewol/compositing/Text.h b/sources/ewol/compositing/Text.h index 7abe810f..b11f6a9c 100644 --- a/sources/ewol/compositing/Text.h +++ b/sources/ewol/compositing/Text.h @@ -365,8 +365,9 @@ namespace ewol { /** * @brief draw a cursor at the specify position * @param[in] _isInsertMode True if the insert mode is activated + * @param[in] _cursorSize The sizae of the cursor that might be set when insert mode is set [default 20] */ - void printCursor(bool _isInsertMode); + void printCursor(bool _isInsertMode, float _cursorSize = 20.0f); private: /** * @brief calculate the element number that is the first out the alignement range