I need help with setting text in gui using image buttons and procedures.

Started by CBJaxxx on

Topic category: Help with modding (Java Edition)

Last seen on 18:53, 12. Jan 2024
Joined Mar 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I need help with setting text in gui using image buttons and procedures.

CBJ Economy [C:\Users\codeb\MCreatorWorkspaces\cbj_economy] - If0Pressed (Procedure) - MCreator 2023.1 (gyazo.com)

CBJ Economy [C:\Users\codeb\MCreatorWorkspaces\cbj_economy] - SetPasswordButton (Procedure) - MCreator 2023.1 (gyazo.com)

CBJ Economy [C:\Users\codeb\MCreatorWorkspaces\cbj_economy] - SetPasswordScreen (GUI) - MCreator 2023.1 (gyazo.com)

the first picture shows how my button is setup 

and the second shows how the password is set

the third picture shows what my vault gui looks like

the issue is that I have 4 different textfields called password1, password2, password3, and password4

I am trying to check if the previous textfield has any text values in it and if it does it will only set the value of the button you clicked in the next empty textfield 

so if you click button 1 then the value in textfield password1 would be set to 1 and if you press button 6 then the next textfield that is empty which would be password2 would be set to one. BUT for some reason it doesn't get the values in the textfields properly so if i click for example 9359 the ill get some thing like 9955, it is so confusing I don't know what I am doing wrong. each gui button number is mapped to its own procedure and the procedures are supposed to check the value of the textfields before it sets them.

PLEASE HELP ME, I have spent 3 days trying to fix this.

 

Last seen on 18:53, 12. Jan 2024
Joined Mar 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I figured out that the…
Sun, 03/12/2023 - 18:08

I figured out that the button procedure sets the text input for the next textfield as well for some reason, so if i press button 2 three times and button 3 once i get a value of 2222 instead of 2223 and if i press buttons 2 and buttons three in this order 2323 then i get this value 2233 when i should get this value 2323 you see, hopefully someone answers this topic