Define ColorCap instead of hardcoding 100
parent
af87b4e68d
commit
2771863299
1
chat.h
1
chat.h
|
@ -34,6 +34,7 @@ enum Color {
|
||||||
White, Black, Blue, Green, Red, Brown, Magenta, Orange,
|
White, Black, Blue, Green, Red, Brown, Magenta, Orange,
|
||||||
Yellow, LightGreen, Cyan, LightCyan, LightBlue, Pink, Gray, LightGray,
|
Yellow, LightGreen, Cyan, LightCyan, LightBlue, Pink, Gray, LightGray,
|
||||||
Default = 99,
|
Default = 99,
|
||||||
|
ColorCap,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum { None, Debug, Network, IDCap = 256 };
|
enum { None, Debug, Network, IDCap = 256 };
|
||||||
|
|
2
ui.c
2
ui.c
|
@ -314,7 +314,7 @@ struct Style {
|
||||||
};
|
};
|
||||||
static const struct Style Reset = { A_NORMAL, Default, Default };
|
static const struct Style Reset = { A_NORMAL, Default, Default };
|
||||||
|
|
||||||
static const short Colors[100] = {
|
static const short Colors[ColorCap] = {
|
||||||
[Default] = -1,
|
[Default] = -1,
|
||||||
[White] = 8 + COLOR_WHITE,
|
[White] = 8 + COLOR_WHITE,
|
||||||
[Black] = 0 + COLOR_BLACK,
|
[Black] = 0 + COLOR_BLACK,
|
||||||
|
|
Loading…
Reference in New Issue