Jump to content

HELP label font


Avagard

Recommended Posts

hello! i want when the cursor is on the label the font get bigger, and if the cursor is not on the labbel it goes back to normal

i made the script but it doesn't work.. anybody help?

function enter()
    local bigfont = guiCreateFont("files/mtago.ttf", 20)
           if guiGetText(label) == "PLAY" then
            guiSetFont(label, bigfont)
        end
    end
addEventHandler( "onClientMouseEnter", root, enter)]]

function leave()
    local smallfont = guiCreateFont("files/mtago.ttf", 15)
           if not guiGetText(label) == "PLAY" then
            guiSetFont(label, smallfont)
        end
    end
addEventHandler( "onClientMouseLeave", root, leave)

 

Edited by Avagard
Link to comment
10 hours ago, Avagard said:

hello! i want when the cursor is on the label the font get bigger, and if the cursor is not on the labbel it goes back to normal

i made the script but it doesn't work.. anybody help?


function enter()
    local bigfont = guiCreateFont("files/mtago.ttf", 20)
           if guiGetText(label) == "PLAY" then
            guiSetFont(label, bigfont)
        end
    end
addEventHandler( "onClientMouseEnter", root, enter)]]

function leave()
    local smallfont = guiCreateFont("files/mtago.ttf", 15)
           if not guiGetText(label) == "PLAY" then
            guiSetFont(label, smallfont)
        end
    end
addEventHandler( "onClientMouseLeave", root, leave)

 



 

function enter()

local Font1 = guiCreateFont("files/mtago.ttf", 20)
Text = guiGetText(label)

if source == label then
if Text == "PLAY" then
guiSetFont(label, Font1 )
end
end

end

addEventHandler( "onClientMouseEnter", root, enter)

function leave()

local Font2 = guiCreateFont("files/mtago.ttf", 15)
Text = guiGetText(label)

if source == label then
if not Text == "PLAY" then
guiSetFont(label, Font2 )
end
end

end
addEventHandler( "onClientMouseLeave", root, leave)

 

9 hours ago, Avagard said:

nvm found the problem.

sorry about that ... i did not see your message

Edited by Killer Project
Link to comment

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