mirror of
https://oauth2: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@github.com/m1ngsama/TNT.git
synced 2026-06-26 08:14:37 +08:00
Replace the four lines of `==` rules + bilingual title with a centred
rounded box so the eye lands on a single visual element instead of two.
The new tui_render_welcome():
- centres horizontally and vertically (about a third of the way down)
- shows TNT + version, then 中文 subtitle, then English caption with
decreasing visual weight (bold cyan / default / dim grey)
- falls back to a plain "TNT $version — anonymous chat over SSH" line
when the terminal is too narrow for the frame
- declared in tui.h, called from input.c read_username()
read_username()'s prompt becomes a single short bilingual hint
("请输入用户名 (留空 anonymous): ") that lives below the box.
33 lines
872 B
C
33 lines
872 B
C
#ifndef TUI_H
|
|
#define TUI_H
|
|
|
|
#include "common.h"
|
|
#include "message.h"
|
|
|
|
/* Client structure (forward declaration) */
|
|
struct client;
|
|
|
|
/* Render the main screen */
|
|
void tui_render_screen(struct client *client);
|
|
|
|
/* Render the help screen */
|
|
void tui_render_help(struct client *client);
|
|
|
|
/* Render the command output screen */
|
|
void tui_render_command_output(struct client *client);
|
|
|
|
/* Render the input line */
|
|
void tui_render_input(struct client *client, const char *input);
|
|
|
|
/* Clear the screen */
|
|
void tui_clear_screen(struct client *client);
|
|
|
|
/* Render the pre-login welcome banner. Centered, framed, shown once before
|
|
* the username prompt. Caller is responsible for printing the prompt
|
|
* itself afterwards. */
|
|
void tui_render_welcome(struct client *client);
|
|
|
|
/* Get help text based on language */
|
|
const char* tui_get_help_text(help_lang_t lang);
|
|
|
|
#endif /* TUI_H */
|