xterm256 colors
This commit is contained in:
2
dependencies/tim
vendored
2
dependencies/tim
vendored
Submodule dependencies/tim updated: 58276638a7...6d0190c9c0
@@ -17,3 +17,12 @@ typedef struct ClientCLI {
|
||||
void ClientCLI_construct(ClientCLI* self);
|
||||
void ClientCLI_destroy(ClientCLI* self);
|
||||
Result(void) ClientCLI_run(ClientCLI* self);
|
||||
|
||||
|
||||
enum {
|
||||
Color256_White = 0xe7,
|
||||
Color256_MidGray = 0xf8,
|
||||
Color256_NavyBlue = 0x11,
|
||||
Color256_DeepSkyBlue = 0x18,
|
||||
Color256_DarkRed = 0x58,
|
||||
};
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
#include "network/tcp-chat-protocol/v1.h"
|
||||
#include "tim.h"
|
||||
|
||||
|
||||
typedef struct TextInputState {
|
||||
TimEditState edit;
|
||||
cstr label;
|
||||
@@ -56,9 +55,21 @@ Result(bool) start_screen(Array(char) username_buf, Array(char) password_buf,
|
||||
bool result = false;
|
||||
|
||||
StartScreenContext ctx = {
|
||||
.style_default = { .brd = TimColor16_Gray, .bg = TimColor16_DarkBlue, .fg = TimColor16_Gray },
|
||||
.style_focused = { .brd = TimColor16_White, .bg = TimColor16_DarkCyan, .fg = TimColor16_White },
|
||||
.style_error = { .brd = TimColor16_Gray, .bg = TimColor16_DarkRed, .fg = TimColor16_White },
|
||||
.style_default = {
|
||||
.brd = Color256_MidGray,
|
||||
.bg = Color256_NavyBlue,
|
||||
.fg = Color256_MidGray
|
||||
},
|
||||
.style_focused = {
|
||||
.brd = Color256_White,
|
||||
.bg = Color256_DeepSkyBlue,
|
||||
.fg = Color256_White
|
||||
},
|
||||
.style_error = {
|
||||
.brd = Color256_MidGray,
|
||||
.bg = Color256_DarkRed,
|
||||
.fg = Color256_White
|
||||
},
|
||||
};
|
||||
|
||||
TimEditState_construct(&ctx.input_username.edit, username_buf.data, username_buf.len, NULL);
|
||||
|
||||
Reference in New Issue
Block a user