Textdraw Selection
#1

I've looked over my code several times and I can't find a reason as to why I can't select this textdraw. It doesn't turn yellow when I put my mouse over it but the 'close' button under it works.

pawn Код:
gPhoneEnterNum[2] = TextDrawCreate(533.000000, 362.000000, "1");
TextDrawBackgroundColor(gPhoneEnterNum[2], 255);
TextDrawFont(gPhoneEnterNum[2], 1);
TextDrawLetterSize(gPhoneEnterNum[2], 0.600000, 1.000000);
TextDrawColor(gPhoneEnterNum[2], -1);
TextDrawSetOutline(gPhoneEnterNum[2], 1);
TextDrawSetProportional(gPhoneEnterNum[2], 1);
TextDrawTextSize(gPhoneEnterNum[2], 100.000000, 20.000000);
TextDrawSetSelectable(gPhoneEnterNum[2], 1);
pawn Код:
gPhoneMain[11] = TextDrawCreate(571.000000, 421.000000, "~r~close");
TextDrawAlignment(gPhoneMain[11], 2);
TextDrawBackgroundColor(gPhoneMain[11], 255);
TextDrawFont(gPhoneMain[11], 2);
TextDrawLetterSize(gPhoneMain[11], 0.419999, 1.300000);
TextDrawColor(gPhoneMain[11], -1);
TextDrawSetOutline(gPhoneMain[11], 1);
TextDrawSetProportional(gPhoneMain[11], 1);
TextDrawUseBox(gPhoneMain[11], 1);
TextDrawBoxColor(gPhoneMain[11], 53);
TextDrawTextSize(gPhoneMain[11], 15.000000, 86.000000);
TextDrawSetSelectable(gPhoneMain[11], 1);
Reply
#2

From this point onwards I refuse to reply to help in this section!, THis shouldn't be in the 0.3e Forum it should be in Normal Scripting discussion. FYI I reported this post.
Reply
#3

This is an 0.3e issue.
Reply
#4

It isnt a 0.3e issue, it works fine for everyone else please try to use your logic and look again.
Reply
#5

If you've actually read my post, you would see that I've already gone through the code several times. Instead of acting like a smartass, how about you attempt to help instead of stating that it's "logic", even when you can't find the issue.
Reply
#6

If you cant find the issue you ask for help on Scripting Discussion, I know it isnt a 0.3e issue as i've seen Numerous other servers using it and I have used it in my server without issue.
Reply
#7

It only bugs for my number textdraws, not my other ones. Don't post if you aren't gonna try to help.
Reply
#8

Once the thread is in the right section, I'll be prepared to help.
Reply
#9

IceCube is right. This is for the RC stage of 0.3e, which is over. Post in SCRIPTING DISCUSSION.
Reply
#10

Quote:
Originally Posted by IceCube!
Посмотреть сообщение
From this point onwards I refuse to reply to help in this section!, THis shouldn't be in the 0.3e Forum it should be in Normal Scripting discussion. FYI I reported this post.


Shut up about your 'wrong section' and just help the guy already. Right now you're just being a hypocrite.



OT: The close button does not change colour because of the ~r~ in the textdraw, making it permanent red (You can, however, just get the RGBA code of it and use it in TextDrawColor)

The other button requires a bit more explanation: You need to use TextDrawTextSize with the second parameter as created_x_position + x_offset.

Your code was:
pawn Код:
gPhoneEnterNum[2] = TextDrawCreate(533.000000, 362.000000, "1");
TextDrawTextSize(gPhoneEnterNum[2], 100.000000, 20.000000);
It should be:
pawn Код:
gPhoneEnterNum[2] = TextDrawCreate(533.000000, 362.000000, "1");
TextDrawTextSize(gPhoneEnterNum[2], 533.0 + 100.0, 20.000000);
Which should work. I do recommend changing the offset (+ 100.0) to something smaller like 17.0 (Which I used in testing it on my localhost, and worked great ).

Working with textdraws (and especially selectable ones) is a lot of trial and error work ^^.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)