diff options
author | Uros Majstorovic <majstor@majstor.org> | 2021-02-26 23:17:59 +0100 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2021-02-26 23:17:59 +0100 |
commit | 9d91377659c1ffc0f23373dc0b2ff4edaafac6a8 (patch) | |
tree | 0ae2c77a942a787b5ea606bd0e75a4697ee3748c /fw/fe310/eos/eve/widget/strw.c | |
parent | 5073075e39a1e35ab7408e3d325bf00a8e0a2230 (diff) |
fixed tag opts for string and text widget
Diffstat (limited to 'fw/fe310/eos/eve/widget/strw.c')
-rw-r--r-- | fw/fe310/eos/eve/widget/strw.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/fw/fe310/eos/eve/widget/strw.c b/fw/fe310/eos/eve/widget/strw.c index c96608d..20d3292 100644 --- a/fw/fe310/eos/eve/widget/strw.c +++ b/fw/fe310/eos/eve/widget/strw.c @@ -16,6 +16,12 @@ #include "widget.h" #include "strw.h" +#define STRW_TOUCH_OPT EVE_TOUCH_OPT_TRACK | EVE_TOUCH_OPT_TRACK_X | EVE_TOUCH_OPT_TRACK_EXT_X | EVE_TOUCH_OPT_LPRESS + +#define STRW_TRACK_NONE 0 +#define STRW_TRACK_CRSR 1 +#define STRW_TRACK_TXT 2 + #define CH_BS 0x08 #define CH_DEL 0x7f #define CH_EOF 0x1a @@ -24,10 +30,6 @@ #define CH_CTRLC 0x03 #define CH_CTRLV 0x16 -#define STRW_TRACK_NONE 0 -#define STRW_TRACK_CRSR 1 -#define STRW_TRACK_TXT 2 - #define CHAR_VALID_INPUT(c) ((c >= 0x20) && (c < 0x7f)) int eve_strw_create(EVEStrWidget *widget, EVERect *g, EVEStrSpec *spec) { @@ -214,7 +216,7 @@ uint8_t eve_strw_draw(EVEWidget *_widget, EVEPage *page, uint8_t tag0) { _widget->tag0 = tag0; if (tag0 != EVE_TAG_NOTAG) { eve_cmd_dl(TAG(tag0)); - eve_touch_set_opt(tag0, EVE_TOUCH_OPT_LPRESS); + eve_touch_set_opt(tag0, STRW_TOUCH_OPT); tag0++; } _widget->tagN = tag0; |