Skip to content

Commit

Permalink
Fix TextSetting not working when values are pasted in
Browse files Browse the repository at this point in the history
  • Loading branch information
buthed010203 committed Nov 25, 2024
1 parent 77a6cc1 commit 0252299
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/mindustry/ui/dialogs/SettingsMenuDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -1172,7 +1172,7 @@ public TextSetting(String name, String def, Cons<String> changed){
public void add(SettingsTable table){
TextField field = new TextField(settings.getString(name));
field.setMessageText(def);
field.typed(c -> {
field.changed(() -> {
settings.put(name, field.getText());
if(changed != null){
changed.get(field.getText());
Expand All @@ -1197,7 +1197,7 @@ public void add(SettingsTable table){
TextArea area = new TextArea(settings.getString(name));
area.setPrefRows(5);

area.typed(c -> {
area.changed(() -> {
settings.put(name, area.getText());
if(changed != null){
changed.get(area.getText());
Expand Down

0 comments on commit 0252299

Please sign in to comment.