Jump to content

guiSetInputEnabled


Wei

Recommended Posts

Posted

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 !

Posted

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 !

Posted

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?

Posted

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

Posted (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 by Guest

My ingame nick is ~HyPeX~

BF3 Gamemode Progress: ~30% - Currently working on AI & MapManager

gKhdyRJ.png

Posted
    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

gKhdyRJ.png

Posted

Alpha, thank you! I used guiSetInputMode() here and works well.

Software Engineer & Entrepreneur Running Lustrel and VilarikA • Highly engaged on open source community

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