1
0
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:
Jfreegman
2014-07-04 03:24:29 -04:00
parent 10d0e99d72
commit 6754741f37
15 changed files with 413 additions and 183 deletions

View File

@ -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);