Ao passar o mouse encima de Text Draw -
GuiKommander - 17.04.2019
Queria saber se hб como, tipo, um exemplo que vou dar:
Eu vou passar o mouse encima da TextDraw ''Registrar", dai aparece OUTRA textdraw, e quando eu tirar o mouse de cima da TextDraw "Registrar" a OUTRA Textdraw some.
Se quiserem que eu forneзa mais detalhes, eu detalho mais
Re: Ao passar o mouse encima de Text Draw -
ipsLuan - 17.04.2019
Sу clicando.
Re: Ao passar o mouse encima de Text Draw -
G4M30V3R - 17.04.2019
Nгo hб eventos como "Mouse Over" no samp. Apenas do clique.
Re: Ao passar o mouse encima de Text Draw -
Felipealves - 17.04.2019
Sim й possнvel
Re: Ao passar o mouse encima de Text Draw -
ForT - 17.04.2019
Basta deixar uma textdraw transparente com a mesma бrea clicбvel do botгo "registrar", use como base o exemplo que eu fiz:
PHP Code:
new Text:textdrawTest[6];
CMD:tdtest(playerid)
{
CreateTextdrawsTest();
for (new id; id < sizeof textdrawTest; id++) {
TextDrawShowForPlayer(playerid, textdrawTest[id]);
}
SelectTextDraw(playerid, 0xAAAAAAFF);
return 1;
}
CreateTextdrawsTest()
{
textdrawTest[0] = TextDrawCreate(30.000000, 190.000000, "Item selecionavel 1");
TextDrawBackgroundColor(textdrawTest[0], 0);
TextDrawFont(textdrawTest[0], 1);
TextDrawLetterSize(textdrawTest[0], 0.230000, 1.000000);
TextDrawColor(textdrawTest[0], -1);
TextDrawSetOutline(textdrawTest[0], 0);
TextDrawSetProportional(textdrawTest[0], 1);
TextDrawSetShadow(textdrawTest[0], 1);
TextDrawUseBox(textdrawTest[0], 1);
TextDrawBoxColor(textdrawTest[0], 100);
TextDrawTextSize(textdrawTest[0], 103.000000, 10.000000);
TextDrawSetSelectable(textdrawTest[0], 1);
textdrawTest[1] = TextDrawCreate(30.000000, 210.000000, "Item selecionavel 2");
TextDrawBackgroundColor(textdrawTest[1], 0);
TextDrawFont(textdrawTest[1], 1);
TextDrawLetterSize(textdrawTest[1], 0.230000, 1.000000);
TextDrawColor(textdrawTest[1], -1);
TextDrawSetOutline(textdrawTest[1], 0);
TextDrawSetProportional(textdrawTest[1], 1);
TextDrawSetShadow(textdrawTest[1], 1);
TextDrawUseBox(textdrawTest[1], 1);
TextDrawBoxColor(textdrawTest[1], 100);
TextDrawTextSize(textdrawTest[1], 103.000000, 10.000000);
TextDrawSetSelectable(textdrawTest[1], 1);
textdrawTest[2] = TextDrawCreate(30.000000, 230.000000, "Item selecionavel 3");
TextDrawBackgroundColor(textdrawTest[2], 0);
TextDrawFont(textdrawTest[2], 1);
TextDrawLetterSize(textdrawTest[2], 0.230000, 1.000000);
TextDrawColor(textdrawTest[2], -1);
TextDrawSetOutline(textdrawTest[2], 0);
TextDrawSetProportional(textdrawTest[2], 1);
TextDrawSetShadow(textdrawTest[2], 1);
TextDrawUseBox(textdrawTest[2], 1);
TextDrawBoxColor(textdrawTest[2], 100);
TextDrawTextSize(textdrawTest[2], 103.000000, 10.000000);
TextDrawSetSelectable(textdrawTest[2], 1);
textdrawTest[3] = TextDrawCreate(30.000000, 190.000000, " Descricao teste do item");
TextDrawBackgroundColor(textdrawTest[3], 0);
TextDrawFont(textdrawTest[3], 1);
TextDrawLetterSize(textdrawTest[3], 0.170000, 0.899999);
TextDrawColor(textdrawTest[3], 0);
TextDrawSetOutline(textdrawTest[3], 0);
TextDrawSetProportional(textdrawTest[3], 1);
TextDrawSetShadow(textdrawTest[3], 1);
TextDrawUseBox(textdrawTest[3], 1);
TextDrawBoxColor(textdrawTest[3], 0);
TextDrawTextSize(textdrawTest[3], 193.000000, 10.000000);
TextDrawSetSelectable(textdrawTest[3], 1);
textdrawTest[4] = TextDrawCreate(30.000000, 210.000000, " Descricao teste do item");
TextDrawBackgroundColor(textdrawTest[4], 0);
TextDrawFont(textdrawTest[4], 1);
TextDrawLetterSize(textdrawTest[4], 0.170000, 0.899999);
TextDrawColor(textdrawTest[4], 0);
TextDrawSetOutline(textdrawTest[4], 0);
TextDrawSetProportional(textdrawTest[4], 1);
TextDrawSetShadow(textdrawTest[4], 1);
TextDrawUseBox(textdrawTest[4], 1);
TextDrawBoxColor(textdrawTest[4], 0);
TextDrawTextSize(textdrawTest[4], 193.000000, 10.000000);
TextDrawSetSelectable(textdrawTest[4], 1);
textdrawTest[5] = TextDrawCreate(30.000000, 230.000000, " Descricao teste do item");
TextDrawBackgroundColor(textdrawTest[5], 0);
TextDrawFont(textdrawTest[5], 1);
TextDrawLetterSize(textdrawTest[5], 0.170000, 0.899999);
TextDrawColor(textdrawTest[5], 0);
TextDrawSetOutline(textdrawTest[5], 0);
TextDrawSetProportional(textdrawTest[5], 1);
TextDrawSetShadow(textdrawTest[5], 1);
TextDrawUseBox(textdrawTest[5], 1);
TextDrawBoxColor(textdrawTest[5], 0);
TextDrawTextSize(textdrawTest[5], 193.000000, 10.000000);
TextDrawSetSelectable(textdrawTest[5], 1);
}
Re: Ao passar o mouse encima de Text Draw -
GuiKommander - 17.04.2019
Quote:
Originally Posted by ForT
Basta deixar uma textdraw transparente com a mesma бrea clicбvel do botгo "registrar", use como base o exemplo que eu fiz:
PHP Code:
new Text:textdrawTest[6];
CMD:tdtest(playerid)
{
CreateTextdrawsTest();
for (new id; id < sizeof textdrawTest; id++) {
TextDrawShowForPlayer(playerid, textdrawTest[id]);
}
SelectTextDraw(playerid, 0xAAAAAAFF);
return 1;
}
CreateTextdrawsTest()
{
textdrawTest[0] = TextDrawCreate(30.000000, 190.000000, "Item selecionavel 1");
TextDrawBackgroundColor(textdrawTest[0], 0);
TextDrawFont(textdrawTest[0], 1);
TextDrawLetterSize(textdrawTest[0], 0.230000, 1.000000);
TextDrawColor(textdrawTest[0], -1);
TextDrawSetOutline(textdrawTest[0], 0);
TextDrawSetProportional(textdrawTest[0], 1);
TextDrawSetShadow(textdrawTest[0], 1);
TextDrawUseBox(textdrawTest[0], 1);
TextDrawBoxColor(textdrawTest[0], 100);
TextDrawTextSize(textdrawTest[0], 103.000000, 10.000000);
TextDrawSetSelectable(textdrawTest[0], 1);
textdrawTest[1] = TextDrawCreate(30.000000, 210.000000, "Item selecionavel 2");
TextDrawBackgroundColor(textdrawTest[1], 0);
TextDrawFont(textdrawTest[1], 1);
TextDrawLetterSize(textdrawTest[1], 0.230000, 1.000000);
TextDrawColor(textdrawTest[1], -1);
TextDrawSetOutline(textdrawTest[1], 0);
TextDrawSetProportional(textdrawTest[1], 1);
TextDrawSetShadow(textdrawTest[1], 1);
TextDrawUseBox(textdrawTest[1], 1);
TextDrawBoxColor(textdrawTest[1], 100);
TextDrawTextSize(textdrawTest[1], 103.000000, 10.000000);
TextDrawSetSelectable(textdrawTest[1], 1);
textdrawTest[2] = TextDrawCreate(30.000000, 230.000000, "Item selecionavel 3");
TextDrawBackgroundColor(textdrawTest[2], 0);
TextDrawFont(textdrawTest[2], 1);
TextDrawLetterSize(textdrawTest[2], 0.230000, 1.000000);
TextDrawColor(textdrawTest[2], -1);
TextDrawSetOutline(textdrawTest[2], 0);
TextDrawSetProportional(textdrawTest[2], 1);
TextDrawSetShadow(textdrawTest[2], 1);
TextDrawUseBox(textdrawTest[2], 1);
TextDrawBoxColor(textdrawTest[2], 100);
TextDrawTextSize(textdrawTest[2], 103.000000, 10.000000);
TextDrawSetSelectable(textdrawTest[2], 1);
textdrawTest[3] = TextDrawCreate(30.000000, 190.000000, " Descricao teste do item");
TextDrawBackgroundColor(textdrawTest[3], 0);
TextDrawFont(textdrawTest[3], 1);
TextDrawLetterSize(textdrawTest[3], 0.170000, 0.899999);
TextDrawColor(textdrawTest[3], 0);
TextDrawSetOutline(textdrawTest[3], 0);
TextDrawSetProportional(textdrawTest[3], 1);
TextDrawSetShadow(textdrawTest[3], 1);
TextDrawUseBox(textdrawTest[3], 1);
TextDrawBoxColor(textdrawTest[3], 0);
TextDrawTextSize(textdrawTest[3], 193.000000, 10.000000);
TextDrawSetSelectable(textdrawTest[3], 1);
textdrawTest[4] = TextDrawCreate(30.000000, 210.000000, " Descricao teste do item");
TextDrawBackgroundColor(textdrawTest[4], 0);
TextDrawFont(textdrawTest[4], 1);
TextDrawLetterSize(textdrawTest[4], 0.170000, 0.899999);
TextDrawColor(textdrawTest[4], 0);
TextDrawSetOutline(textdrawTest[4], 0);
TextDrawSetProportional(textdrawTest[4], 1);
TextDrawSetShadow(textdrawTest[4], 1);
TextDrawUseBox(textdrawTest[4], 1);
TextDrawBoxColor(textdrawTest[4], 0);
TextDrawTextSize(textdrawTest[4], 193.000000, 10.000000);
TextDrawSetSelectable(textdrawTest[4], 1);
textdrawTest[5] = TextDrawCreate(30.000000, 230.000000, " Descricao teste do item");
TextDrawBackgroundColor(textdrawTest[5], 0);
TextDrawFont(textdrawTest[5], 1);
TextDrawLetterSize(textdrawTest[5], 0.170000, 0.899999);
TextDrawColor(textdrawTest[5], 0);
TextDrawSetOutline(textdrawTest[5], 0);
TextDrawSetProportional(textdrawTest[5], 1);
TextDrawSetShadow(textdrawTest[5], 1);
TextDrawUseBox(textdrawTest[5], 1);
TextDrawBoxColor(textdrawTest[5], 0);
TextDrawTextSize(textdrawTest[5], 193.000000, 10.000000);
TextDrawSetSelectable(textdrawTest[5], 1);
}
|
Nгo consegui compreender Fort.
Eu passo o mouse encima da TextDraw "Registrar" e vai aparecer como a TextDraw que vocк diz ser ''Transparente" ?
Re: Ao passar o mouse encima de Text Draw -
ForT - 17.04.2019
Na verdade sгo duas textdraws iguais na mesma posiзгo, mбs uma deve ser transparente pra aparecer apenas quando passar o mouse por cima.
Re: Ao passar o mouse encima de Text Draw -
willttoonn - 17.04.2019
O espaзo de seleзгo й definido neste campo
TextDrawTextSize, vб alterando atй ficar exatamente no tamanho ideal do seu texto.