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.. Diet with russian vodka, lose 3 days in one week !
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 ) Diet with russian vodka, lose 3 days in one week !
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. Software Engineer & Entrepreneur • Running Lustrel and VilarikA • Highly engaged on open source community
Alpha Posted May 30, 2012 Posted May 30, 2012 Just use: guiSetInputMode My Resources: [REL] Support System v1.0.2
.: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 My ingame nick is ~HyPeX~ BF3 Gamemode Progress: ~30% - Currently working on AI & MapManager
.: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. My ingame nick is ~HyPeX~ BF3 Gamemode Progress: ~30% - Currently working on AI & MapManager
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. My Resources: [REL] Support System v1.0.2
Stanley Sathler Posted May 31, 2012 Posted May 31, 2012 Alpha, thank you! I used guiSetInputMode() here and works well. Software Engineer & Entrepreneur • Running Lustrel and VilarikA • Highly engaged on open source community
Alpha Posted May 31, 2012 Posted May 31, 2012 You're welcome. My Resources: [REL] Support System v1.0.2
Wei Posted May 31, 2012 Author Posted May 31, 2012 Thanks Diet with russian vodka, lose 3 days in one week !
Alpha Posted May 31, 2012 Posted May 31, 2012 You're welcome. My Resources: [REL] Support System v1.0.2
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