mirror of
https://github.com/Tha14/toxic.git
synced 2025-07-05 08:46:47 +02:00
improve /help system and add startup welcome message
This commit is contained in:
@ -72,6 +72,7 @@ typedef struct ToxWindow ToxWindow;
|
||||
typedef struct StatusBar StatusBar;
|
||||
typedef struct PromptBuf PromptBuf;
|
||||
typedef struct ChatContext ChatContext;
|
||||
typedef struct Help Help;
|
||||
|
||||
struct ToxWindow {
|
||||
void(*onKey)(ToxWindow *, Tox *, wint_t, bool);
|
||||
@ -119,7 +120,6 @@ struct ToxWindow {
|
||||
bool active;
|
||||
int x;
|
||||
|
||||
/* window type identifiers */
|
||||
bool is_chat;
|
||||
bool is_groupchat;
|
||||
bool is_prompt;
|
||||
@ -131,6 +131,7 @@ struct ToxWindow {
|
||||
|
||||
ChatContext *chatwin;
|
||||
StatusBar *stb;
|
||||
Help *help;
|
||||
|
||||
WINDOW *window;
|
||||
};
|
||||
@ -194,6 +195,12 @@ struct ChatContext {
|
||||
WINDOW *sidebar;
|
||||
};
|
||||
|
||||
struct Help {
|
||||
WINDOW *win;
|
||||
int type;
|
||||
bool active;
|
||||
};
|
||||
|
||||
ToxWindow *init_windows(Tox *m);
|
||||
void draw_active_window(Tox *m);
|
||||
int add_window(Tox *m, ToxWindow w);
|
||||
|
Reference in New Issue
Block a user