Jump to content

How can I make a button like this


Recommended Posts

Posted

Hello, when I was using GUIEDITOR script I noticed that there's another buttons into the gui

Take a look

mta-screen_2017-06-26_09-20-04.png

How can I make like that?

Please answer as fast as you can guys.

Posted (edited)

U can create ur own GUI panel buy that program u can make login panel for example or any jobs stuff panel those buttons are just for helps which give u info how to make a GUI ... And close means close that specific window they are label they work on click method !!

Edited by Khadeer143
Posted

It's not label bro... I tried to make it like that. 

I need to use this events to make it changes color

onClientMouseEnter

onClientMouseLeave

guiLabelSetColor(lbl ,r , g, b)

also I can't set it in that place that I'm telling u guys.. just I need someone who understands me

Posted (edited)
label = guiCreateLabel(x, y, x, y, "label", flase/true, parentElement)

addEventHandler("onClientGUIClick", getRootElement(), function() if (source == label) then

-- Do something

end

end

)

 

Edited by StormFighter
Code mode
Posted (edited)
11 hours ago, StormFighter said:

label = guiCreateLabel(x, y, x, y, "label", flase/true, parentElement)

addEventHandler("onClientGUIClick", getRootElement(), function() if (source == label) then

-- Do something

end

end

)

 

Code is correct  !! Give some rights for example help on click help it shows all help information u created for help every GUI button will have some rights !for best way to learn visit mtasa wiki or YouTube if u need any thing to script u can pm me I vll make for u 

Edited by Khadeer143
Posted (edited)

if it's a label it cannot be added here.. Just take a look in the picture once again

 

LOOK AT ITS POSITION, NORMAL LABEL CANNOT BE ADDED IN THIS POSITION.

mta-screen_2017-06-26_09-20-04.png

 

@Walid you know?

Edited by majdxd
  • 3 weeks later...
Posted (edited)
On 6/28/2017 at 11:44, majdxd said:

so guys, you can't?

People tried to help you, and you were a douchbad to them and started yelling. It is a label, when it's hovered you change its color.

When you hover away you reset its color.

When it's clicked you invoke whatever function you want to be called.

You set its position relatively, because you want to ensure it sticks to the edges of the main window.

You set its ClippedByParent property to False so that the title bar doesn't hide it.

Show more respect to those who try to help you, otherwise nobody will give a :o about you.

 

EDIT: And that function signature you posted is just a ready-to-use one, but I bet its internals have all what we've been telling you.

Edited by BabY

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...