Textdraws problems
#1

I have 3 clickable textdraws, one downside the other. If I try clicking the 3rd textdraw it will 'click me' the 1st, the same happens with the 2nd.

Another problem is the highlighting area. I've tried setting the box and it still won't work okay..
Reply
#2

You should provide the code where you create the textdraws and the pieces from 'OnPlayerClickTextDraw' where you click these specific textdraws. Further what I can say about the clickable area, play around with TextDrawTextSize.

Best regards,
Jesse
Reply
#3

Change TextDrawAligment to 2 and edit selectable area with TextDrawTextSize
Reply
#4

FullCircle, that's what I actually did.
Reply
#5

here is what I'm talking about:


sorry for bumping, I don't know why I couldn't post the picture in the above post, lol

if I click 'leave garage' it will install the component, wtf?
Reply
#6

Quote:
Originally Posted by fordawinzz
Посмотреть сообщение
here is what I'm talking about:


sorry for bumping, I don't know why I couldn't post the picture in the above post, lol

if I click 'leave garage' it will install the component, wtf?
Look if you look at all well in OnPlayerClickTextDraw
Reply
#7

Quote:
Originally Posted by fordawinzz
Посмотреть сообщение
here is what I'm talking about:


sorry for bumping, I don't know why I couldn't post the picture in the above post, lol

if I click 'leave garage' it will install the component, wtf?
As I said before, show code, without showing code all we can do is guess just like you. It's up to yourself but if you're not providing any code creating a topic like this is useless as you already know about TextDrawTextSize and TextDrawAlignment.

Jesse
Reply
#8

Here's the code for the textdraws:
pawn Код:
Text_Tuning[3] = TextDrawCreate(571.555664, 376.319885, "buy component(s)");
    TextDrawLetterSize(Text_Tuning[3], 0.226888, 0.858308);
    TextDrawTextSize(Text_Tuning[3], 753.332702, 94.577728);
    TextDrawAlignment(Text_Tuning[3], 2);
    TextDrawColor(Text_Tuning[3], -1);
    TextDrawSetShadow(Text_Tuning[3], 0);
    TextDrawSetOutline(Text_Tuning[3], 1);
    TextDrawBackgroundColor(Text_Tuning[3], 51);
    TextDrawFont(Text_Tuning[3], 2);
    TextDrawUseBox(Text_Tuning[3], true);
    TextDrawBoxColor(Text_Tuning[3], 140);
    TextDrawSetProportional(Text_Tuning[3], 1);
    TextDrawSetSelectable(Text_Tuning[3], true);
   
    Text_Tuning[4] = TextDrawCreate(575.111450, 356.40896, "add component");
    TextDrawLetterSize(Text_Tuning[4], 0.226888, 0.858308);
    TextDrawTextSize(Text_Tuning[4], 284.888275, 102.044441);
    TextDrawAlignment(Text_Tuning[4], 2);
    TextDrawColor(Text_Tuning[4], -1);
    TextDrawSetShadow(Text_Tuning[4], 0);
    TextDrawSetOutline(Text_Tuning[4], 1);
    TextDrawBackgroundColor(Text_Tuning[4], 51);
    TextDrawFont(Text_Tuning[4], 2);
    TextDrawSetProportional(Text_Tuning[4], 1);
    TextDrawUseBox(Text_Tuning[4], true);
    TextDrawBoxColor(Text_Tuning[4], 140);
    TextDrawSetSelectable(Text_Tuning[4], true);
I removed the Leave button because I use a command now.

pawn Код:
public OnPlayerClickTextDraw(playerid, Text: clickedid) {
    if(clickedid == Text_Tuning[3]) { // Buy components
        // code here...
    }
    else if(clickedid == Text_Tuning[4]) { // Add/remove a component
        // more code here ...
    }
    return 1;
}
Reply
#9

still didn't find any solution ..
Reply
#10

Код:
TextDrawTextSize(Text_Tuning[4], 284.888275, 102.044441);
TextDrawTextSize(Text_Tuning[3], 753.332702, 94.577728);
These values are way too high, at least, what I can tell from the screenshots the textdraws aren't so big so you should get the right TextDrawTextSize, I use different sizes but actually not one of my clickable textdraws has a TextSize bigger then 39.000000, 335.000000 and that's the very limit I'm using, the average TextSize(s) are ~20.000000, ~35.000000 in my script.

Best regards,
Jesse
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)