06.03.2016, 12:59
Код:
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid) { new string[128]; if(playertextid == DSInfo) { CancelSelectTextDraw(playerid); new title[128], content[512]; format(content, sizeof(content), ds_info_en,VehicleNames[DSModels[DealerID[playerid]][dModel]-400],DSModels[DealerID[playerid]][dModel],FormatNumber(DSModels[DealerID[playerid]][dPrice]),DSModels[DealerID[playerid]][dStock], DSModels[DealerID[playerid]][dDoors],DSModels[DealerID[playerid]][dType],DSModels[DealerID[playerid]][dMaxSpeed]); format(title, sizeof(title), infoabout_text_en, VehicleNames[DSModels[DealerID[playerid]][dModel]-400]); ShowPlayerDialog(playerid, DIALOG_DSINFO, DIALOG_STYLE_MSGBOX, title, content, close_text_en, ""); // } return 1; }
Код:
if(dialogid == DIALOG_DSINFO) { if(response) { SelectTextDraw(playerid, 0xFF0000FF); } else { SelectTextDraw(playerid, 0xFF0000FF); } }
Код:
DSInfo = CreatePlayerTextDraw(playerid, 524.428344, 370.906524, "More info"); PlayerTextDrawLetterSize(playerid, DSInfo, 0.323523, 0.911306); PlayerTextDrawTextSize(playerid, DSInfo, 579.808349, 37.546718); PlayerTextDrawAlignment(playerid, DSInfo, 1); PlayerTextDrawColor(playerid, DSInfo, -1); PlayerTextDrawSetShadow(playerid, DSInfo, 0); PlayerTextDrawSetOutline(playerid, DSInfo, 1); PlayerTextDrawBackgroundColor(playerid, DSInfo, 51); PlayerTextDrawFont(playerid, DSInfo, 1); PlayerTextDrawSetProportional(playerid, DSInfo, 1); PlayerTextDrawSetSelectable(playerid, DSInfo, 1);
Mouse curos appeared first time, but if i select "More Information" then close dialog, mouse cursor disappeared (text draw is not selectable).
Problem #1 was sloved. Thanks.