mirror of https://github.com/adamdruppe/arsd.git
why did i ever use the ascii function?
This commit is contained in:
parent
189ef8f047
commit
1d5a3d4811
|
@ -363,9 +363,11 @@ an|ansi|ansi-bbs|ANSI terminals (emulators):\
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// A modifier for [Color]
|
||||||
enum Bright = 0x08;
|
enum Bright = 0x08;
|
||||||
|
|
||||||
/// Defines the list of standard colors understood by Terminal.
|
/// Defines the list of standard colors understood by Terminal.
|
||||||
|
/// See also: [Bright]
|
||||||
enum Color : ushort {
|
enum Color : ushort {
|
||||||
black = 0, /// .
|
black = 0, /// .
|
||||||
red = RED_BIT, /// .
|
red = RED_BIT, /// .
|
||||||
|
@ -903,6 +905,11 @@ http://msdn.microsoft.com/en-us/library/windows/desktop/ms683193%28v=vs.85%29.as
|
||||||
colorToXTermPaletteIndex(background)
|
colorToXTermPaletteIndex(background)
|
||||||
));
|
));
|
||||||
|
|
||||||
|
/+ // this is the full 24 bit color sequence
|
||||||
|
writeStringRaw(format("\033[38;2;%d;%d;%dm", foreground.r, foreground.g, foreground.b));
|
||||||
|
writeStringRaw(format("\033[48;2;%d;%d;%dm", background.r, background.g, background.b));
|
||||||
|
+/
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1839,7 +1846,7 @@ struct RealTimeConsoleInput {
|
||||||
INPUT_RECORD[32] buffer;
|
INPUT_RECORD[32] buffer;
|
||||||
DWORD actuallyRead;
|
DWORD actuallyRead;
|
||||||
// FIXME: ReadConsoleInputW
|
// FIXME: ReadConsoleInputW
|
||||||
auto success = ReadConsoleInputA(inputHandle, buffer.ptr, buffer.length, &actuallyRead);
|
auto success = ReadConsoleInputW(inputHandle, buffer.ptr, buffer.length, &actuallyRead);
|
||||||
if(success == 0)
|
if(success == 0)
|
||||||
throw new Exception("ReadConsoleInput");
|
throw new Exception("ReadConsoleInput");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue