dugasz1 Posted May 23, 2013 Posted May 23, 2013 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 ) 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.
iPrestege Posted May 23, 2013 Posted May 23, 2013 Gui alpha should be from 0-1 , You have to change it to { 0.5 } And try .
dugasz1 Posted May 23, 2013 Author Posted May 23, 2013 Sorry, it's just a mistake:/ Don't working i see only the ... i don't know how i can call it
iPrestege Posted May 23, 2013 Posted May 23, 2013 Do you mean that it is not clear? I Can't get it | = .
dugasz1 Posted May 23, 2013 Author Posted May 23, 2013 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 )
iPrestege Posted May 23, 2013 Posted May 23, 2013 You mean you want to show the box ? If yes then set the alpha to ( 1 ) And try .
AlexWo Posted May 23, 2013 Posted May 23, 2013 Sorry, it's just a mistake:/ Don't working i see only the ... i don't know how i can call it Do you mean the cursor?
dugasz1 Posted May 23, 2013 Author Posted May 23, 2013 no,no Sorry i don't explain it clearly. I want to show only the writed words in it.
iPrestege Posted May 23, 2013 Posted May 23, 2013 Try to add the alpha more set it to 0.7 and try or change the edit text color .
dugasz1 Posted May 23, 2013 Author Posted May 23, 2013 guiSetProperty(felhasznalo_edit, "NormalTextColour", "FFFF0000") guiSetAlpha ( felhasznalo_edit, 0.7 ) Tryed but still i don't see the words
dugasz1 Posted May 23, 2013 Author Posted May 23, 2013 hmm.. on 0.7 it's pale but the words change whit the editbox
iPrestege Posted May 23, 2013 Posted May 23, 2013 OK Change the alpha to "1" And check if you can see the text or no .
Castillo Posted May 24, 2013 Posted May 24, 2013 You can create a GUI label to show the text written.
dugasz1 Posted May 24, 2013 Author Posted May 24, 2013 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 )
PaiN^ Posted May 25, 2013 Posted May 25, 2013 Use onClientGUIChanged event to set the label's text to what have been typed in the edit.
50p Posted May 25, 2013 Posted May 25, 2013 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.
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