24 lines
711 B
C
24 lines
711 B
C
#pragma once
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
|
|
void ui_init();
|
|
|
|
void ui_chat_init();
|
|
|
|
/*
|
|
* Add one message to the ui.
|
|
* nick senders nickname ("" for system messages)
|
|
* text message body (system messages include their own prefix, e.g. "* alice joined")
|
|
* is_own true: nick rendered in color_nick_own
|
|
* is_system true: entire line rendered in color_system, nick ignored
|
|
*/
|
|
void ui_push_message(const char* nick, const char* text, bool is_own, bool is_system);
|
|
void ui_set_input(const char* text);
|
|
void ui_set_header(int peer_count, const char* my_nick);
|
|
void ui_set_header_mode(const char* text);
|
|
void ui_clear_messages();
|
|
|
|
// Must be called every iteration of loop().
|
|
void ui_tick();
|