pa3ck Posted March 28, 2014 Share Posted March 28, 2014 Hi there. I can't switch between guiEdits when they are attached to the same parent. Is this an MTA bug? Link to comment
Jusonex Posted March 28, 2014 Share Posted March 28, 2014 No, otherwise everyone would have the same issue. Does it happen on every server or only on your own? In case of the second case: Could you provide us a piece of your GUI code? Link to comment
pa3ck Posted March 28, 2014 Author Share Posted March 28, 2014 It works if they're not attached to a parent. I used dxDraw to draw the background, but changed to guiStaticImage and set the edits as children. The code is just simple guiCreateStaticImage and 2 edits and 2 buttons, but sure, here's my code: local sizeX, sizeY = 0.64, 0.9 local tPic = math.random(1, #pics) img = guiCreateStaticImage (0.5 - sizeX / 2, 0, sizeX, sizeY, unpack(pics[tPic]), true) user = guiCreateEdit ( 0.376, 0.417, 0.218, 0.042, "", true, img ) pass = guiCreateEdit ( 0.376, 0.507, 0.218, 0.042, "", true, img ) reg = guiCreateButton ( 0.385, 0.563, 0.094, 0.042, "", true, img ) login = guiCreateButton ( 0.5265, 0.563, 0.067, 0.044, "", true, img ) guiSetAlpha(login,0) guiSetAlpha(reg, 0) guiEditSetMaxLength(user, 50) guiEditSetMaxLength(pass, 50) guiEditSetMasked ( pass, true ) Link to comment
Castillo Posted March 28, 2014 Share Posted March 28, 2014 This is a common problem, it also happens with scroll panes ( check map editor ). Link to comment
pa3ck Posted March 28, 2014 Author Share Posted March 28, 2014 That's what I thought. Thank you. Any ideas on work around? Link to comment
Jusonex Posted March 28, 2014 Share Posted March 28, 2014 Oh, are you talking about the tab key? Link to comment
pa3ck Posted March 28, 2014 Author Share Posted March 28, 2014 Oh, are you talking about the tab key? Yea, sorry if I haven't explained it clearly. EDIT: It only happens when they're attached to an element as a child ( even though they're attached to 2 different ones ). Link to comment
Jusonex Posted March 28, 2014 Share Posted March 28, 2014 Fixed: http://code.google.com/p/mtasa-blue/sou ... ail?r=6266 Link to comment
Castillo Posted March 28, 2014 Share Posted March 28, 2014 This can be closed I guess: http://bugs.mtasa.com/view.php?id=6036 Link to comment
pa3ck Posted March 28, 2014 Author Share Posted March 28, 2014 Fixed: http://code.google.com/p/mtasa-blue/sou ... ail?r=6266 Very well done! Is it going to be in the next MTA update? Link to comment
Jusonex Posted March 28, 2014 Share Posted March 28, 2014 Yes. It'll be merged in - I guess - 2-3 weeks. Link to comment
pa3ck Posted March 28, 2014 Author Share Posted March 28, 2014 Okay, that's perfect, thank you. Link to comment
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