Jump to content

guiSetAlpha problem


dugasz1

Recommended Posts

Posted

Hello! Heres my login script detail:

beleppanel = guiCreateStaticImage( (screenX-349)/2, 260, 349, 229, "kepek/belepespanel.png", false ) 
felhasznalo_edit = guiCreateEdit(179 ,52 , 150, 18, "", false, beleppanel) 
guiSetAlpha ( felhasznalo_edit, 50 ) 

paenl_www.kepfeltoltes.hu_.png

Its look like this. I want to put a edit box in the picture's "input box" and set the edit box's alpha 0 but when somebody write something the text invisible too:/ Any idea how i can display onli the text.

Sorry for lot of questions and thanks for the answers! :)

Posted

Sorry, it's just a mistake:/ Don't working i see only the ... i don't know how i can call it :D

eadg_www.kepfeltoltes.hu_.png

Sorry for lot of questions and thanks for the answers! :)

Posted

Yes now i typed in something and i see only this:/ (On the first picture i don't set deliberately the alpha to 0 because everybody see the edit box )

Sorry for lot of questions and thanks for the answers! :)

Posted

no,no Sorry i don't explain it clearly. I want to show only the writed words in it.

Sorry for lot of questions and thanks for the answers! :)

Posted
guiSetProperty(felhasznalo_edit, "NormalTextColour", "FFFF0000")  
guiSetAlpha ( felhasznalo_edit, 0.7 )   

Tryed but still i don't see the words :(

Sorry for lot of questions and thanks for the answers! :)

Posted

You can create a GUI label to show the text written.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

I tryed it, but don't work:

beleppanel = guiCreateStaticImage( (screenX-349)/2, 260, 349, 229, "kepek/belepespanel.png", false ) 
felhasznalo_edit = guiCreateEdit(177 ,52 , 150, 18, "", false, beleppanel) 
guiSetProperty( felhasznalo_edit, "AlwaysOnTop", "True" ) 
guiSetAlpha ( felhasznalo_edit, 0 ) 
jelszo_edit = guiCreateEdit(177 ,52 ,150 ,18 ,"", false, beleppanel) 
guiSetAlpha ( jelszo_edit, 0 ) 
guiSetProperty( jelszo_edit, "AlwaysOnTop", "True" ) 
  
function textMezo () 
    textFelh = guiCreateLabel(187, 52, 150, 18,"proba",false,beleppanel) 
    guiSetFont (textFelh, "clear-normal") 
    editFelhText = guiGetText(felhasznalo_edit) 
    guiSetText (textFelh, editFelhText) 
    outputDebugString("timerok") 
end 
setTimer ( textMezo, 5000, 1 ) 
  
guiSetVisible( login_register_window, true ) 

Sorry for lot of questions and thanks for the answers! :)

Posted

Use onClientGUIChanged event to set the label's text to what have been typed in the edit.

" Keep Thinking Different . " - Steve Jops

--------------------

Don't send me PMs asking for help, I Won't reply !

Posted
tempLabels = { }; -- create table of lables that correspond to edit boxes 
  
function updateLabels( ) -- create function which will be called when edit box will be change (text input) 
    guiSetText( tempLabels[ source ], guiGetText( source ) ); -- set the label text to the same text as the edit box 
end 
  
beleppanel = guiCreateStaticImage( (screenX-349)/2, 260, 349, 229, "kepek/belepespanel.png", false ) 
  
felhasznalo_edit = guiCreateEdit(177 ,52 , 150, 18, "", false, beleppanel) 
guiSetAlpha ( felhasznalo_edit, 0 ) 
tempLabels[ felhasznalo_edit  ] = guiCreateLabel( 177 ,52 , 150, 18, "", false, beleppanel); -- create first label for edit box 
guiMoveToBack( tempLabels[ felhasznalo_edit ] ); -- move the label below the editbox 
  
jelszo_edit = guiCreateEdit(177 ,72 ,150 ,18 ,"", false, beleppanel) 
guiSetAlpha ( jelszo_edit, 0 ) 
tempLabels[ jelszo_edit ] = guiCreateLabel( 177, 72, 150, 18, "", false, beleppanel); -- create another label for the next edit box 
guiMoveToBack( tempLabels[ jelszo_edit ] ); -- move the label below the editbox 
  
addEventHandler( "onClientGUIChanged", jelszo_edit, updateLabels, false ); -- whenever jelszo_edit text is changed then call updateLabels function 
addEventHandler( "onClientGUIChanged", felhasznalo_edit, updateLabels, false ); -- same here 
  

You may have to play with the location of the labels to make sure they align with the caret (the line you showed on the screenshot) and the edit boxes themselves.

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