Problem with textdraw -
Pawnie - 12.04.2013
I just added this textdraw, but the issue is that when I added it all textdraws starts to dissapear (all selectable ones just dissapear)
Код:
//top with the rest
new Text:Radio;
//Fs init
Radio = TextDrawCreate(111.000000, 390.000000, "Radio");
TextDrawBackgroundColor(Radio, 255);
TextDrawFont(Radio, 1);
TextDrawLetterSize(Radio, 0.500000, 1.399999);
TextDrawColor(Radio, -1);
TextDrawSetOutline(Radio, 0);
TextDrawSetProportional(Radio, 1);
TextDrawSetShadow(Radio, 1);
TextDrawSetSelectable(Radio, true);
TextDrawTextSize(Radio, 115.000000, 405.000000);
//fs exit
TextDrawDestroy(Radio);
//Click textdraw
if(clickedid == Radio)
{
new string[256];
strcat(string, "Rap\nRock\nMetal\nCountry\nPop\nDance\nTrance\nElectronic\nReggae\nRnB");
strcat(string, "\nChillout\nJazz\nDubstep");
ShowPlayerDialog(playerid, P_RADIO, DIALOG_STYLE_LIST,"MP3 Player.",string,"Play","Exit");
return 1;
}
//Public UCP
PlayerTextDrawSetSelectable(playerid, PlayerText:Radio, 1);
TextDrawShowForPlayer(playerid, Radio);
SelectTextDraw(playerid, 0x00FF00FF);
The issue is that when u acess the UCP instead of showing the textdraws, it doesnt show them at all.
Before I added the radio txd it worked perfectly.
Re: Problem with textdraw -
Pawnie - 12.04.2013
Okay I found out one more thing. The textdraws arent being shown but they are there, you can click them.
Re: Problem with textdraw -
Pottus - 12.04.2013
TextDrawTextSize(Radio, 115.000000, 405.000000); this is a problem here, that Y value makes the clickable area almost the entire screen use a smaller value typically 10 to 20 is best you'll need to adjust it a bit until your clickable area is the right size.
Also this doesn't make sense PlayerTextDrawSetSelectable(playerid, PlayerText:Radio, 1); your Radio is a normal textdraw not a playertext draw.
Re: Problem with textdraw -
Pawnie - 12.04.2013
I tried editing the code before this, it didnt help. The issue is that for example Stats textdraw is made in same method, but now they wont show up but you can click them (if you know where they are approx)
I tried with your suggestions, but nope, didnt help me :/
Re: Problem with textdraw -
Pawnie - 13.04.2013
Alright, I've found what's block it. There was a huge black textdraw over it. How to make it so the blackbox will be under it?
Код:
forward UCP(playerid);
public UCP(playerid)
{
PlayerTextDrawSetSelectable(playerid, PlayerText:Stats, 1);
PlayerTextDrawSetSelectable(playerid, PlayerText:LeaveUCP, 1);
PlayerTextDrawSetSelectable(playerid, PlayerText:Radio, 1);
TextDrawShowForPlayer(playerid, LeaveUCP);
TextDrawShowForPlayer(playerid, Stats);
TextDrawShowForPlayer(playerid, Radio);
TextDrawShowForPlayer(playerid, Textdraw0); //Black box textdraw
TextDrawShowForPlayer(playerid, Textdraw1); //Black box textdraw
SelectTextDraw(playerid, 0x00FF00FF);
return 1;
}
Код:
Textdraw0 = TextDrawCreate(680.000000, -52.000000, "BOX");
TextDrawBackgroundColor(Textdraw0, 255);
TextDrawFont(Textdraw0, 1);
TextDrawLetterSize(Textdraw0, 2.799999, 21.100000);
TextDrawColor(Textdraw0, -1);
TextDrawSetOutline(Textdraw0, 0);
TextDrawSetProportional(Textdraw0, 1);
TextDrawSetShadow(Textdraw0, 1);
TextDrawUseBox(Textdraw0, 1);
TextDrawBoxColor(Textdraw0, 255);
TextDrawTextSize(Textdraw0, -320.000000, -300.000000);
Textdraw1 = TextDrawCreate(1493.000000, 366.000000, "BOX");
TextDrawBackgroundColor(Textdraw1, 255);
TextDrawFont(Textdraw1, 1);
TextDrawLetterSize(Textdraw1, 4.209998, 25.100000);
TextDrawColor(Textdraw1, -1);
TextDrawSetOutline(Textdraw1, 0);
TextDrawSetProportional(Textdraw1, 1);
TextDrawSetShadow(Textdraw1, 1);
TextDrawUseBox(Textdraw1, 1);
TextDrawBoxColor(Textdraw1, 255);
TextDrawTextSize(Textdraw1, -90.000000, 0.000000);
Re: Problem with textdraw -
Pottus - 13.04.2013
You need to create your background textdraws first each new textdraw will overlay any previously created textdraw.
Re: Problem with textdraw -
Pawnie - 14.04.2013
Hmmm thanks.