Wei Posted May 30, 2012 Posted May 30, 2012 Why when I open the window it makes guiSetInputEnabled but the bind to close it doesn't work..
Wei Posted May 30, 2012 Author Posted May 30, 2012 You could understant it... function showSupport () guiSetVisible( supportWindow, not guiGetVisible( supportWindow ) ) showCursor( guiGetVisible( supportWindow ) ) guiSetInputEnabled( guiGetVisible( supportWindow) ) end bindKey("f3", "down", showSupport )
Flaker Posted May 30, 2012 Posted May 30, 2012 Weird ... I do not think that it would help, but try: (Just for test) function showSupport () if guiGetVisible ( supportWindow ) == true then guiSetVisible( supportWindow, false ) showCursor( false ) guiSetInputEnabled( false ) else guiSetVisible( supportWindow, true ) showCursor( true ) guiSetInputEnabled( true ) end end bindKey("f3", "down", showSupport ) p.s. Perhaps the problem in some other script?
Stanley Sathler Posted May 30, 2012 Posted May 30, 2012 I have this problem in one of my scripts too. I don't know how to solve it (I never search), but if you solve, post here, please. (: - Flaker, I don't think it will work. I think when we use guiSetInputEnabled(), the F3 pressed is not recognized.
.:HyPeX:. Posted May 30, 2012 Posted May 30, 2012 (edited) function showSupport () if guiGetVisible ( supportWindow ) == true then guiSetVisible( supportWindow, false ) showCursor( false ) guiSetInputMode( false ) else guiSetVisible( supportWindow, true ) showCursor( true ) guiSetInputMode( true ) end end bindKey("f3", "down", showSupport ) if ( supportWindow ) == true and showCursor ( ture ) then guiSetVisible (supportWindow, false) showCursor ( false ) guiSetInputMode ( false ) guiSetVisible ( false ) end This might work.. im not sure Edited May 30, 2012 by Guest
.:HyPeX:. Posted May 30, 2012 Posted May 30, 2012 function showSupport () if guiGetVisible ( supportWindow ) == true then guiSetVisible( supportWindow, false ) showCursor( false ) guiSetInputMode( false ) else guiSetVisible( supportWindow, true ) showCursor( true ) guiSetInputMode( true ) end end bindKey("f3", "down", showSupport ) if ( supportWindow ) == true and showCursor ( ture ) then guiSetVisible (supportWindow, false) showCursor ( false ) guiSetInputMode ( false ) guiSetVisible ( false ) end This might work.. im not sure got kinda exited and added an extra check: OnPlayerHitKey "f3" Check = showSupport if showSupport ( true ) then check = guisetinputMode if guiSetinputMode ( false ) and showSupport ( true ) then showSupport ( false ) showCursor ( false ) guiSetInputMode ( false ) guiSetVisible ( false ) end end PD: im "new" at gui scripting so idk if this works.
Alpha Posted May 30, 2012 Posted May 30, 2012 When I told you to use that function, I meant you should check the wiki first. Check it because you're having wrong arguments in it.
Stanley Sathler Posted May 31, 2012 Posted May 31, 2012 Alpha, thank you! I used guiSetInputMode() here and works well.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now