SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

Reply
 
Thread Tools Display Modes
Old 17/04/2019, 12:35 PM   #1
GuiKommander
Gangsta
 
GuiKommander's Avatar
 
Join Date: Dec 2016
Posts: 697
Reputation: 16
Default Ao passar o mouse encima de Text Draw

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
__________________
Programo sistemas simples até os mais complexos por remuneração.
Todos os códigos dinâmicos.
GuiKommander is online now   Reply With Quote
Old 17/04/2019, 01:05 PM   #2
ipsLuan
High-roller
 
ipsLuan's Avatar
 
Join Date: Feb 2013
Location: Ilhéus, BA
Posts: 4,127
Reputation: 307
Default Re: Ao passar o mouse encima de Text Draw

Só clicando.
__________________
A fé na vitória tem que ser inabalável.


Procurando um programador? Achou! Contato através de MP.
ipsLuan is online now   Reply With Quote
Old 17/04/2019, 04:56 PM   #3
G4M30V3R
Big Clucker
 
G4M30V3R's Avatar
 
Join Date: Jun 2016
Posts: 92
Reputation: 17
Default Re: Ao passar o mouse encima de Text Draw

Não há eventos como "Mouse Over" no samp. Apenas do clique.
G4M30V3R is offline   Reply With Quote
Old 17/04/2019, 06:09 PM   #4
Felipealves
Huge Clucker
 
Felipealves's Avatar
 
Join Date: Mar 2016
Location: Paraná
Posts: 273
Reputation: 5
Default Re: Ao passar o mouse encima de Text Draw

Sim é possível
__________________

Ajudando os que tem vontade, ignorando os que tem preguiça.
Felipealves is offline   Reply With Quote
Old 17/04/2019, 07:18 PM   #5
ForT
Gangsta
 
ForT's Avatar
 
Join Date: Sep 2012
Location: Florianópolis - SC Country: Brazil
Posts: 674
Reputation: 257
Default Re: Ao passar o mouse encima de Text Draw

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 
idid sizeof textdrawTestid++) {
        
TextDrawShowForPlayer(playeridtextdrawTest[id]);
    }

    
SelectTextDraw(playerid0xAAAAAAFF);
    return 
1;
}

CreateTextdrawsTest()
{
    
textdrawTest[0] = TextDrawCreate(30.000000190.000000"Item selecionavel 1");
    
TextDrawBackgroundColor(textdrawTest[0], 0);
    
TextDrawFont(textdrawTest[0], 1);
    
TextDrawLetterSize(textdrawTest[0], 0.2300001.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.00000010.000000);
    
TextDrawSetSelectable(textdrawTest[0], 1);

    
textdrawTest[1] = TextDrawCreate(30.000000210.000000"Item selecionavel 2");
    
TextDrawBackgroundColor(textdrawTest[1], 0);
    
TextDrawFont(textdrawTest[1], 1);
    
TextDrawLetterSize(textdrawTest[1], 0.2300001.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.00000010.000000);
    
TextDrawSetSelectable(textdrawTest[1], 1);

    
textdrawTest[2] = TextDrawCreate(30.000000230.000000"Item selecionavel 3");
    
TextDrawBackgroundColor(textdrawTest[2], 0);
    
TextDrawFont(textdrawTest[2], 1);
    
TextDrawLetterSize(textdrawTest[2], 0.2300001.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.00000010.000000);
    
TextDrawSetSelectable(textdrawTest[2], 1);

    
textdrawTest[3] = TextDrawCreate(30.000000190.000000"                                   Descricao teste do item");
    
TextDrawBackgroundColor(textdrawTest[3], 0);
    
TextDrawFont(textdrawTest[3], 1);
    
TextDrawLetterSize(textdrawTest[3], 0.1700000.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.00000010.000000);
    
TextDrawSetSelectable(textdrawTest[3], 1);

    
textdrawTest[4] = TextDrawCreate(30.000000210.000000"                                   Descricao teste do item");
    
TextDrawBackgroundColor(textdrawTest[4], 0);
    
TextDrawFont(textdrawTest[4], 1);
    
TextDrawLetterSize(textdrawTest[4], 0.1700000.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.00000010.000000);
    
TextDrawSetSelectable(textdrawTest[4], 1);

    
textdrawTest[5] = TextDrawCreate(30.000000230.000000"                                   Descricao teste do item");
    
TextDrawBackgroundColor(textdrawTest[5], 0);
    
TextDrawFont(textdrawTest[5], 1);
    
TextDrawLetterSize(textdrawTest[5], 0.1700000.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.00000010.000000);
    
TextDrawSetSelectable(textdrawTest[5], 1);

__________________


Coming soon

ForT is online now   Reply With Quote
Old 17/04/2019, 09:38 PM   #6
GuiKommander
Gangsta
 
GuiKommander's Avatar
 
Join Date: Dec 2016
Posts: 697
Reputation: 16
Default Re: Ao passar o mouse encima de Text Draw

Quote:
Originally Posted by ForT View Post
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 
idid sizeof textdrawTestid++) {
        
TextDrawShowForPlayer(playeridtextdrawTest[id]);
    }

    
SelectTextDraw(playerid0xAAAAAAFF);
    return 
1;
}

CreateTextdrawsTest()
{
    
textdrawTest[0] = TextDrawCreate(30.000000190.000000"Item selecionavel 1");
    
TextDrawBackgroundColor(textdrawTest[0], 0);
    
TextDrawFont(textdrawTest[0], 1);
    
TextDrawLetterSize(textdrawTest[0], 0.2300001.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.00000010.000000);
    
TextDrawSetSelectable(textdrawTest[0], 1);

    
textdrawTest[1] = TextDrawCreate(30.000000210.000000"Item selecionavel 2");
    
TextDrawBackgroundColor(textdrawTest[1], 0);
    
TextDrawFont(textdrawTest[1], 1);
    
TextDrawLetterSize(textdrawTest[1], 0.2300001.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.00000010.000000);
    
TextDrawSetSelectable(textdrawTest[1], 1);

    
textdrawTest[2] = TextDrawCreate(30.000000230.000000"Item selecionavel 3");
    
TextDrawBackgroundColor(textdrawTest[2], 0);
    
TextDrawFont(textdrawTest[2], 1);
    
TextDrawLetterSize(textdrawTest[2], 0.2300001.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.00000010.000000);
    
TextDrawSetSelectable(textdrawTest[2], 1);

    
textdrawTest[3] = TextDrawCreate(30.000000190.000000"                                   Descricao teste do item");
    
TextDrawBackgroundColor(textdrawTest[3], 0);
    
TextDrawFont(textdrawTest[3], 1);
    
TextDrawLetterSize(textdrawTest[3], 0.1700000.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.00000010.000000);
    
TextDrawSetSelectable(textdrawTest[3], 1);

    
textdrawTest[4] = TextDrawCreate(30.000000210.000000"                                   Descricao teste do item");
    
TextDrawBackgroundColor(textdrawTest[4], 0);
    
TextDrawFont(textdrawTest[4], 1);
    
TextDrawLetterSize(textdrawTest[4], 0.1700000.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.00000010.000000);
    
TextDrawSetSelectable(textdrawTest[4], 1);

    
textdrawTest[5] = TextDrawCreate(30.000000230.000000"                                   Descricao teste do item");
    
TextDrawBackgroundColor(textdrawTest[5], 0);
    
TextDrawFont(textdrawTest[5], 1);
    
TextDrawLetterSize(textdrawTest[5], 0.1700000.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.00000010.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" ?
__________________
Programo sistemas simples até os mais complexos por remuneração.
Todos os códigos dinâmicos.
GuiKommander is online now   Reply With Quote
Old 17/04/2019, 09:52 PM   #7
ForT
Gangsta
 
ForT's Avatar
 
Join Date: Sep 2012
Location: Florianópolis - SC Country: Brazil
Posts: 674
Reputation: 257
Default Re: Ao passar o mouse encima de Text Draw

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.
__________________


Coming soon

ForT is online now   Reply With Quote
Old 17/04/2019, 11:31 PM   #8
willttoonn
Gangsta
 
willttoonn's Avatar
 
Join Date: Nov 2011
Location: Brazil
Posts: 781
Reputation: 49
Default Re: Ao passar o mouse encima de Text Draw

O espaço de seleção é definido neste campo TextDrawTextSize, vá alterando até ficar exatamente no tamanho ideal do seu texto.
__________________
Wil
Sometimes a captain has to make the unpopular call because that's his responsibility

/WiltonFreitas willttoonn Wil#3638

Advanced Roleplay
Staff — Management
Development Team — Head Developer
willttoonn is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Ajuda] Aparecer box quando passar mouse por cima de textdraw GasparzinhoXD Português/Portuguese 4 14/02/2018 04:53 PM
[Pedido] Alterar TextDraw ao passar a seta do mouse por cima RafaelOsio Português/Portuguese 4 07/02/2015 03:13 PM
[Ajuda] como passar essa dialog para text ? gabrielloko157 Português/Portuguese 4 27/11/2012 12:04 AM
need text draw please help Yair_Mode Help Archive 0 06/07/2011 01:31 PM


All times are GMT. The time now is 12:18 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.