Jump to content

guiSetAlpha problem


dugasz1

Recommended Posts

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.

Link to comment

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 ) 

Link to comment
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.

Link to comment

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