Skip to content

feat: Implement the Dialog System (1.21.6+)#3143

Merged
milutinke merged 5 commits into
MCCTeam:masterfrom
milutinke:feat/dialogs
Jun 14, 2026
Merged

feat: Implement the Dialog System (1.21.6+)#3143
milutinke merged 5 commits into
MCCTeam:masterfrom
milutinke:feat/dialogs

Conversation

@milutinke

@milutinke milutinke commented Jun 13, 2026

Copy link
Copy Markdown
Member

Addresses the #3141.

Implements support for the dialogs screen introduced in 1.20.6. MCC can now receive, display, and interact with server-sent dialogs through both CLI and TUI.

5 dialog types supported: Notice, Confirmation, Multi Action, Dialog List, Server Links

Dialog commands:

  • /dialog show
  • /dialog click <n>
  • /dialog click-label <text>
  • /dialog set <input> <value>
  • /dialog input <input> <value>
  • /dialog cancel
  • /dialog dismiss

CLI rendering example

--------------------------------------------------
     Dialog #1 [Play]: Multi Action
--------------------------------------------------
<body text>

Inputs:
  pass (Text) ... = ... [max 100 chars]
  service (Check Box) ... = false [Yes=true, No=false]
Actions:
  [1] ... (custom)
--------------------------------------------------

TUI overlay

  • Scrollable dialog view with styled input controls, buttons, and color rendering
  • First input auto-focused on open; Enter triggers the first action
  • Cancel button visually distinct from action buttons

TODO:

  • Improve the classic CLI Actions list with generated commands that people can copy and execute.

@milutinke
milutinke marked this pull request as ready for review June 14, 2026 00:13
@milutinke milutinke changed the title [WIP] feat: Implement the Dialog System feat: Implement the Dialog System Jun 14, 2026
@milutinke milutinke changed the title feat: Implement the Dialog System feat: Implement the Dialog System (1.21.6+) Jun 14, 2026
@milutinke
milutinke merged commit aaa4908 into MCCTeam:master Jun 14, 2026
@milutinke
milutinke deleted the feat/dialogs branch June 14, 2026 00:31
milutinke added a commit that referenced this pull request Jun 17, 2026
After the dialog system PR (#3143), ResolveHexColors in ClassicConsoleBackend
mapped every §#RRGGBB hex color to the nearest of 16 standard Minecraft colors
via NearestMcColor. This meant all server-sent hex colors were downgraded to
4-bit ANSI regardless of the user's ConsoleColorMode setting.

Replaced the nearest-color lookup with ColorHelper.GetColorEscapeCode, which
generates the right output for each mode: 24-bit ANSI in vt100_24bit mode, 8-bit
in vt100_8bit, 4-bit in vt100_4bit, ConsoleColor in legacy_4bit.

Fixes #3146.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant