SelectTextDraw
Description:
Function SelectTextDraw display the cursor and allow the player to select a textdraw.
Function SelectTextDraw was added in 0.3e and will not work in earlier versions! |
It is the TEXT which will be highlighted when hovered over, NOT the box (if one is shown). |
TextDrawSetSelectable or PlayerTextDrawSetSelectable MUST be used first, to allow a textdraw to be selectable. |
Parameters:
(playerid, hovercolor)
int | playerid | The ID of the player that should be able to select a textdraw. |
int | hovercolor | The color of the textdraw when hovering over with mouse (RGBA). |
Return Values:
This function does not return any specific values.
Examples:
public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp(cmdtext, "/tdselect", true)) { SelectTextDraw(playerid, 0x00FF00FF); // Highlight green when hovering over SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Please select a textdraw!"); return 1; } return 0; }
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
- CancelSelectTextDraw: Cancel textdraw selection with the mouse.
- TextDrawSetSelectable: Sets whether a textdraw is selectable through SelectTextDraw.
- PlayerTextDrawSetSelectable: Sets whether a player-textdraw is selectable through SelectTextDraw.
Related Callbacks
The following callbacks might be useful as well, as they are related to this callback in one way or another.
- OnPlayerClickTextDraw: Called when a player clicks on a textdraw.
- OnPlayerClickPlayerTextDraw: Called when a player clicks on a player-textdraw.