Jump to content

onClientClick + guiEditBox


sanyisasha

Recommended Posts

Hello guys.

I have a problem with gui and click event.

So: I want to make a chat system, and it's have a "tab" section, where the players can switch the rooms.

My problem is, if i push "t" button, the chat opening, but if i click anywhere, no action.

But if i before "t" push, push "m" (showCursor function) all works fine.

How can i fix it?

addEventHandler("onClientClick",root,changeSelected) 
  
local chatInputBox = guiCreateEdit(x,y,w,h,"",false) 
  
function changeSelected(button,state) --Where i add onClientClick, i have a "isInBox" function. 
    if button == "left" and state == "down" then 
        Chat.selected = 2 
    end 
end 
  

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