General Category > Discussion - EVE

Tag value of an area with content

(1/3) > >>

T.Pierret:
Hi,
In order to create a "slidable" area with texts and images content, I first drew the content:

--- Code: ---CLEAR_COLOR_RGB()
CLEAR(1 ,1 ,1)
CLEAR_TAG( 0 )
...
BITMAP_SOURCE()
BITMAP_LAYOUT()
BITMAP_SIZE()
BEGIN( BITMAPS )
...
CMD_TEXT()
...

--- End code ---
Then I defined the area where the touch shall be used for scrolling :

--- Code: ---COLOR_MASK(0 ,0 ,0 ,0)
TAG( value )
BEGIN(RECTS)
...

--- End code ---
Touching the scrolling area, I expected to get the defined tag value. However, if the touch happens on a text or an image, the tag value 0 is obtained.
Is there a way to not get the tag value 0 and obtain the tag of the content area ?

Thanks in advance for any support.
Best regards

Rudolph:
You can use the same tag value for several objects.
In your case I would just use an rectangle with the background color and the other objects on top of that.

TAG(10)
COLOR_RGB(Background)
..rect..window-size
..bitmaps
COLOR_RGB(Text)
CMD_TEXT()
TAG(0)

I usually do this with sliders to make them more useable by increasing the touch-area.

Oh, annother thing, avoid tag values below 10, for some reasons these do not give reliable touch events.

BRT Community:
Hello,

Rudolphs suggestion is a suitable solution.
Is there any particular reason you would wish to tag the images and scrolling section with different tag values?

Best Regards,
BRT Community

avanti:

--- Quote from: Rudolph on June 17, 2020, 10:22:24 AM ---Oh, annother thing, avoid tag values below 10, for some reasons these do not give reliable touch events.

--- End quote ---
Is this really true!?  If so, I have a lot of code to revise.

T.Pierret:
Thanks for those answers.
The purpose is to not tag the content of the area while tagging the whole scrollable area.

I tried the solution proposed by @Rudolph, but it did not work. It is even worst since touching the scroll area itself also returns the 0 tag value  :o
To be noted : between the content and the scrollable area drawings, there are other tagged items (title bar, menu bar, ...), that overlay the content if this is too big for the display area.

Regards

Navigation

[0] Message Index

[#] Next page

Go to full version