mojira.dev
MCPE-163092

NPC Dialogue Screen shows 2 close buttons

If you open a dialogue on the newest preview, you can see 2 close buttons in dialogue UI. Additionally the extra close button does not trigger commands on close.

*Steps to reproduce*

  1. Open any dialogue UI as player in survival mode

[media]

*Where the bug is located*

The bug seems to be in `ui/ui_template_dialogs.json` file in vanilla resource pack. `common_close_button_holder` has a binding, that overrides `$show_close_button` with `(not #is_using_gamepad)`.

I confirmed, that by commeting out the binding, dialogue UI has again only one working close button.

Linked issues

Attachments

Comments 8

Additionally, it seems that the menu is expanded as if it had 4+ buttons. This is incorrect; when there's 3 or less buttons there should be half as much space below the dialogue box.

Affects 1.19.40

Oddly, it seems this isnt present if you use a controller. But using mouse, it activates the double box.

@qmagnet yes, because #is_using_gamepad overrides the binding to hide the default close button.

And Hello This Bug Is Not Only On Windows And IOS

Still Affects 1.19.51

Confirmed in Android devices 

Here's a cheeky fix if anyone else is desperate for one

ui_template_dialogs.json

{
  "common_close_button_holder": {
    "modifications": [
      {
        "array_name": "bindings",
        "operation": "replace",
        "where": {
          "binding_name": "(not #is_using_gamepad)"
        },
        "value": {
          "binding_name": "((not #is_using_gamepad) AND ($show_close_button))"
        }
      }
    ]
  }
}

stirante

(Unassigned)

903666

Confirmed

Windows

1.19.40.24 Preview, 1.19.50, 1.19.51

1.20.30

Retrieved