TextDraw Selectable problem
#1

Hello. I've got little problem with TextDraws. When one TextDraw is after another, there's a select bug. I'm selecting 2 textdraws, while I have selected just one (second is after first), something like this:





Code:
new Text:_TextD_skinCTRN = Text:INVALID_TEXT_DRAW,
	Text:_TextD_skinCTLN = Text:INVALID_TEXT_DRAW;
+

OnGameModeInit:

Code:
	_TextD_skinCTRN = TextDrawCreate(369.0, 274.0, ">");
	TextDrawBackgroundColor(_TextD_skinCTRN, 255);
	TextDrawFont(_TextD_skinCTRN, 1);
	TextDrawLetterSize(_TextD_skinCTRN, 0.500000, 1.0);
	TextDrawColor(_TextD_skinCTRN, -1);
	TextDrawSetShadow(_TextD_skinCTRN, 0);
	TextDrawSetSelectable(_TextD_skinCTRN, 1);

	_TextD_skinCTLN = TextDrawCreate(264.0, 274.0, "<");
	TextDrawFont(_TextD_skinCTLN, 1);
	TextDrawLetterSize(_TextD_skinCTLN, 0.500000, 1.0);
	TextDrawColor(_TextD_skinCTLN, -1);
	TextDrawSetShadow(_TextD_skinCTLN, 0);
	TextDrawSetSelectable(_TextD_skinCTLN, 1);
+ of course Select TextDraw:

Code:
SelectTextDraw(playerid, 0xFF0097FF);
Is there any way to repair it?

Regards.
Reply
#2

Check this out work more easier and way better and you can create your textdraw's clickable in-game
https://sampforum.blast.hk/showthread.php?tid=387597
Hope i help you .
Reply
#3

In order to get your textdraw to be correctly selectable you have to give it a size, you can notice that there's no TextDrawTextSize in your code, so try to add this :

Code:
TextDrawTextSize(_TextD_skinCTRN, 10.0,10.0);
TextDrawTextSize(_TextD_skinCTLN, 10.0,10.0);
The 2nd parameter is the X size and the third is the Y size, If it ain't working try to add 10 to each X or Y size

Hope it helps you.

Quote:
Originally Posted by SilentSoul
View Post
Check this out work more easier and way better and you can create your textdraw's clickable in-game
https://sampforum.blast.hk/showthread.php?tid=387597
Hope i help you .
Zamaroth's also returns this bug because it don't give a size to the text by default.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)