Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small thing in the base creator addon #68

Open
Wisam97 opened this issue Jun 26, 2016 · 4 comments
Open

Small thing in the base creator addon #68

Wisam97 opened this issue Jun 26, 2016 · 4 comments

Comments

@Wisam97
Copy link

Wisam97 commented Jun 26, 2016

So today i made a usefull thing for the base creator addon.. i made it that the players can show/hide cursor while placing the object so they can look at the object from different angles, it worked but i need to fix the gui part where the alpha is changed, when the player presses M again i need the guiAlpha to be back to its former value.

addCommandHandler( "togglecursor", function( ) showCursor( not isCursorShowing( ) ) guiSetAlpha(baseCPanel.window[1],0.20) end ) bindKey( "m", "down", "togglecursor" )

Thanks :D

@ghost
Copy link

ghost commented Jun 27, 2016

What do you need exactly? :-)

@Wisam97
Copy link
Author

Wisam97 commented Jul 7, 2016

the cursor can be toggled on/off with the key M, so i want the GUI's alpha to be the same.. the problem now that when the player uses the bind the gui's alpha is lowered and is kept the same... i want it toggled to value 1 again.

@neves768
Copy link
Contributor

that is an enhancement?

@1B0Y
Copy link
Collaborator

1B0Y commented Feb 21, 2017

state = isCursorShowing()
if state then
alpha = .20
else
alpha = 1
end

guiSetAlpha(...,alpha)
showCursor(not state)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants