SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 21/03/2012, 07:01 PM   #1
SteeLFelna
Little Clucker
 
SteeLFelna's Avatar
 
Join Date: Mar 2011
Location: Serbia
Posts: 18
Reputation: 2
Default [Help] Pointer select more text..

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?
SteeLFelna is offline   Reply With Quote
Old 21/03/2012, 07:26 PM   #2
Kalcor
SA-MP Developer
 
Join Date: Apr 2005
Posts: 619
Reputation: 1890
Default Re: [Help] Pointer select more text..

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.
Kalcor is offline   Reply With Quote
Old 21/03/2012, 09:24 PM   #3
Kar
High-roller
 
Join Date: May 2010
Location: Black Asylum
Posts: 2,866
Reputation: 278
Default Re: [Help] Pointer select more text..

Quote:
Originally Posted by Kalcor View Post
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...
__________________

  • Twisted Metal's Website & Forums are up! http://tm.lvcnr.net

    Are you prepared to get your wish? Twisted Metal SA-MP is coming soon! Join the IRC Channel: #tm on irc.tl - @tmsamp_dev

server.lvcnr.net:7777 | samp://server.lvcnr.net:7777
www.lvcnr.net | @kcnrdev
Channel: #lvcnr on irc.tl

Last edited by Kar; 21/03/2012 at 10:09 PM.
Kar is offline   Reply With Quote
Old 21/03/2012, 09:46 PM   #4
T0pAz
Guest
 
Posts: n/a
Default Re: [Help] Pointer select more text..

Quote:
Originally Posted by vassilis View Post
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?
  Reply With Quote
Old 21/03/2012, 09:47 PM   #5
vassilis
High-roller
 
vassilis's Avatar
 
Join Date: Nov 2009
Location: Greece,Athens
Posts: 1,102
Reputation: 141
Default Re: [Help] Pointer select more text..

Quote:
Originally Posted by T0pAz View Post
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?
__________________
|
Scripting again Chaos Cops N Robbers for Unlimited Gaming Community | Greek SA-MP Community
Vassilis.
vassilis is offline   Reply With Quote
Old 21/03/2012, 09:51 PM   #6
T0pAz
Guest
 
Posts: n/a
Default Re: [Help] Pointer select more text..

Quote:
Originally Posted by vassilis View Post
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.
  Reply With Quote
Old 21/03/2012, 09:52 PM   #7
vassilis
High-roller
 
vassilis's Avatar
 
Join Date: Nov 2009
Location: Greece,Athens
Posts: 1,102
Reputation: 141
Default Re: [Help] Pointer select more text..

Quote:
Originally Posted by T0pAz View Post
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.
OK thanks and +1 about the library it will help people ...because i think lot sa-mp scripters are going to post for that..
__________________
|
Scripting again Chaos Cops N Robbers for Unlimited Gaming Community | Greek SA-MP Community
Vassilis.
vassilis is offline   Reply With Quote
Old 21/03/2012, 09:55 PM   #8
T0pAz
Guest
 
Posts: n/a
Default Re: [Help] Pointer select more text..

Quote:
Originally Posted by vassilis View Post
OK thanks and +1 about the library it will help people ...because i think lot sa-mp scripters are going to post for that..
And I hope Kyeman increase the TextDraw limit as the TextDraws are much more efficient now.
  Reply With Quote
Old 21/03/2012, 09:57 PM   #9
vassilis
High-roller
 
vassilis's Avatar
 
Join Date: Nov 2009
Location: Greece,Athens
Posts: 1,102
Reputation: 141
Default Re: [Help] Pointer select more text..

Quote:
Originally Posted by T0pAz View Post
And I hope Kyeman increase the TextDraw limit as the TextDraws are much more efficient now.
That came to my mind after i saw that post seriously.Except of efficiency i think more people are going to use clickable textdraws so they will use lot textdraws to create nice menus to make the server seems nice.
__________________
|
Scripting again Chaos Cops N Robbers for Unlimited Gaming Community | Greek SA-MP Community
Vassilis.
vassilis is offline   Reply With Quote
Old 22/03/2012, 11:23 AM   #10
SteeLFelna
Little Clucker
 
SteeLFelna's Avatar
 
Join Date: Mar 2011
Location: Serbia
Posts: 18
Reputation: 2
Default Re: [Help] Pointer select more text..

Quote:
Originally Posted by Kalcor View Post
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 Code:
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);
SteeLFelna is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Flashlight Pointer [SFA]SpiRRiT Scripting Help 3 04/02/2012 02:43 PM
Vehicle 3 Pointer [Minimode] Austin General 7 22/05/2011 06:46 PM
Text when you select.. davelord Help Archive 2 23/01/2011 07:17 PM
Pointer above the car Nameless303 Help Archive 8 24/09/2010 10:34 PM


All times are GMT. The time now is 04:16 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.