Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LineEdit secret character hard to change/enter #81681

Closed
kit-solent opened this issue Sep 15, 2023 · 6 comments · Fixed by #81724
Closed

LineEdit secret character hard to change/enter #81681

kit-solent opened this issue Sep 15, 2023 · 6 comments · Fixed by #81724

Comments

@kit-solent
Copy link

Godot version

v4.1.1.stable.official [bd6af8e]

System information

Godot v4.1.1.stable - Windows 10.0.22621 - Vulkan (Forward+) - integrated Intel(R) Iris(R) Plus Graphics (Intel Corporation; 27.20.100.9621) - Intel(R) Core(TM) i5-1035G7 CPU @ 1.20GHz (8 Threads)

Issue description

LineEdits secret character property is hard to edit in the inspector. It won't let me input more or less than one character so when I try and delete the default . to input my own character it gives me an error in the Output panel and does not change the .. You can change it by highlighting the . and typing the new character but that feels unintuitive to me so it took me a while to work out how to change it.

Steps to reproduce

  1. Create a LineEdit node
  2. Try and edit its Secret Character property in the Inspector without highlighting the ..

Minimal reproduction project

Not really required but I'll add one if anyone asks.

@timothyqiu
Copy link
Member

FYI. 3.x prints an error but keeps the invalid text. I'm not sure if we need a regression label for this.

@jsjtxietian
Copy link
Contributor

jsjtxietian commented Sep 15, 2023

Personally, I think if the user is deleting the secret char then give an error in console is fine.

If the user is typing the new character maybe it should automatically replace the current one, it will feel more smooth this way.

@kit-solent
Copy link
Author

Sorry I forgot to say. I can't delete the secret char. It gives the error and keeps the ..

@Calinou
Copy link
Member

Calinou commented Sep 15, 2023

There are 2 things we can do:

  • Allow values longer than 1 character in the property, but trim characters after the first one. Mention this behavior in the documentation.
  • Allow empty strings (this will act like if a space was used as a secret character), so that an error isn't printed when you erase all characters in the property.

@Deozaan
Copy link

Deozaan commented Sep 17, 2023

Would it be possible to automatically force the character to be selected so that typing anything overwrites it?

@Calinou
Copy link
Member

Calinou commented Sep 17, 2023

Would it be possible to automatically force the character to be selected so that typing anything overwrites it?

This would mean adding dedicated inspector functionality just for a single property, which I think is overkill.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants