[Help] Pointer select more text.. -
SteeLFelna - 21.03.2012
Problem on mouse pointer, look. [ Couser is pointer, i mixed some words ]
Image if I can put the pointer on the text.
http://www.dodaj.rs/f/1S/JF/3byXmRHP/sa-mp-001.png
When I put the pointer to text "Kola" select and text "Out of character".
http://www.dodaj.rs/f/1j/N8/trYkwyX/sa-mp-003.png
How to select only "Kola" and "out of character" stay white color?
Re: [Help] Pointer select more text.. -
Kalcor - 21.03.2012
Each selectable text must be its own seperate TextDraw. Adjust the TextDrawSetSize parameters until the area matches your desired clickable area. The TextDrawSetSize areas can't overlap.
Re: [Help] Pointer select more text.. -
Kar - 21.03.2012
Quote:
Originally Posted by Kalcor
Each selectable text must be its own seperate TextDraw. Adjust the TextDrawSetSize parameters until the area matches your desired clickable area. The TextDrawSetSize areas can't overlap.
|
Excuse me.. what is TextDrawSetSize? you mean TextDrawTextSize right?
Edit: gosh, I am not trying to disrespect Kalcor, I was just wondering if there was a new function that he didn't mention in the RC thread...
Re: [Help] Pointer select more text.. - T0pAz - 21.03.2012
Quote:
Originally Posted by vassilis
TextDrawTextSize
And this is how a sa-mp developer is getting pwnt  +rep from me kar xD
|
What so funny about it? Can't human make mistakes?
Re: [Help] Pointer select more text.. -
vassilis - 21.03.2012
Quote:
Originally Posted by T0pAz
What so funny about it? Can't human make mistakes? 
|
Haha was just kidding by the way
So if i understood well from the conclusion if you set the text size bigger which will end to be part with other textdraw it will make 2 textdraws clickable by mistake?
Re: [Help] Pointer select more text.. - T0pAz - 21.03.2012
Quote:
Originally Posted by vassilis
Haha was just kidding by the way
So if i understood well from the conclusion if you set the text size bigger which will end to be part with other textdraw it will make 2 textdraws clickable by mistake?
|
Yes, you have to understand that textdraw is text drawn on the screen, not some special GUI system. That's why text size matters on textdraw select. I will probably create a GUI library to make things easier for myself and many others who is facing the problem, misunderstanding with the term textdraw.
Re: [Help] Pointer select more text.. -
SteeLFelna - 22.03.2012
Quote:
Originally Posted by Kalcor
Each selectable text must be its own seperate TextDraw. Adjust the TextDrawSetSize parameters until the area matches your desired clickable area. The TextDrawSetSize areas can't overlap.
|
Yes, I did so for each selectable text separate textdraw.
Look at this as an example:
pawn Код:
Stats[7] = TextDrawCreate(219.000000, 122.000000, "In character");
TextDrawAlignment(Stats[7], 2);
TextDrawBackgroundColor(Stats[7], 255);
TextDrawFont(Stats[7], 1);
TextDrawLetterSize(Stats[7], 0.239999, 0.999999);
TextDrawColor(Stats[7], 7660031);
TextDrawSetOutline(Stats[7], 0);
TextDrawSetProportional(Stats[7], 1);
TextDrawSetShadow(Stats[7], 1);
TextDrawUseBox(Stats[7], 1);
TextDrawBoxColor(Stats[7], 0);
TextDrawTextSize(Stats[7], 269.000000, 66.000000);
TextDrawSetSelectable(Stats[7], 1);
Re: [Help] Pointer select more text.. -
SteeLFelna - 23.03.2012
Bump
Re: [Help] Pointer select more text.. -
Kalcor - 23.03.2012
For some reason you have to reverse the TextDrawTextSize width/height when using alignment = 2 (centered). This is something to do with GTA:SA. It's not designed by SA-MP.
https://sampwiki.blast.hk/wiki/TextDrawTextSize
try:
pawn Код:
TextDrawTextSize(Stats[7], 20.0, 269.0);
If multiple text is still selected, change 20.0 to 15.0 or 10.0.
Re: [Help] Pointer select more text.. - T0pAz - 23.03.2012
Quote:
Originally Posted by Kalcor
For some reason you have to reverse the TextDrawTextSize width/height when using alignment = 2 (centered). This is something to do with GTA:SA. It's not designed by SA-MP.
https://sampwiki.blast.hk/wiki/TextDrawTextSize
try:
pawn Код:
TextDrawTextSize(Stats[7], 20.0, 269.0);
If multiple text is still selected, change 20.0 to 15.0 or 10.0.
|
Do we need to play with the coordinates now to acquire the best result or just reverse the exact value?