fix console theme

This commit is contained in:
Vadim Lopatin 2016-09-08 21:20:32 +03:00
parent 014935fd96
commit 7df1155322
2 changed files with 40 additions and 10 deletions

View File

@ -298,6 +298,26 @@ class Console {
}
//printf( "GetConsoleScreenBufferInfo failed: %lu\n", GetLastError());
}
// update console modes
immutable DWORD ENABLE_QUICK_EDIT_MODE = 0x0040;
immutable DWORD ENABLE_VIRTUAL_TERMINAL_PROCESSING = 0x0004;
immutable DWORD ENABLE_LVB_GRID_WORLDWIDE = 0x0010;
DWORD mode = 0;
GetConsoleMode(_hstdin, &mode);
mode = mode & ~ENABLE_ECHO_INPUT;
mode = mode & ~ENABLE_LINE_INPUT;
mode = mode & ~ENABLE_QUICK_EDIT_MODE;
mode |= ENABLE_PROCESSED_INPUT;
mode |= ENABLE_MOUSE_INPUT;
mode |= ENABLE_WINDOW_INPUT;
SetConsoleMode(_hstdin, mode);
GetConsoleMode(_hstdout, &mode);
mode = mode & ~ENABLE_PROCESSED_OUTPUT;
mode = mode & ~ENABLE_WRAP_AT_EOL_OUTPUT;
mode = mode & ~ENABLE_VIRTUAL_TERMINAL_PROCESSING;
mode |= ENABLE_LVB_GRID_WORLDWIDE;
SetConsoleMode(_hstdout, mode);
_cursorX = csbi.dwCursorPosition.X;
_cursorY = csbi.dwCursorPosition.Y;
_width = csbi.srWindow.Right - csbi.srWindow.Left + 1; // csbi.dwSize.X;

View File

@ -3,7 +3,7 @@
fontSize="1"
fontFace="Arial"
fontFamily="SansSerif"
textColor="#808080"
textColor="#C0C0C0"
>
<color id="window_background" value="#000000"/>
<color id="dialog_background" value="#EEEEEE"/>
@ -34,13 +34,14 @@
backgroundImageId="{' ' bc 0x808080 stretch}"
align="Center"
textFlags="UnderlineHotKeys"
textColor="#000000"
textColor="#FFFFFF"
margins="0,0,1,0"
padding="1,0,1,0"
>
<state state_pressed="true" textColor="#FFFFFF" backgroundImageId="{' ' bc 0xC0C0C0 stretch}"/>
<state state_enabled="true" state_focused="true" backgroundImageId="{' ' bc 0xFFFF00 stretch}"/>
<state state_enabled="true" state_hovered="true" textColor="#006080"/>
<state state_enabled="false" textColor="#80000000"/>
<state state_enabled="false" textColor="#C0C0C0" backgroundImageId="{' ' bc 0x808080 stretch}"/>
<state state_pressed="true" textColor="#000000" backgroundImageId="{' ' bc 0xC0C0C0 stretch}"/>
<state state_focused="true" textColor="#FFFF00" backgroundImageId="{' ' bc 0x808080 stretch}"/>
<state state_enabled="true" state_hovered="true" textColor="#FF0000"/>
</style>
<style id="BUTTON_TRANSPARENT"
align="Center"
@ -54,9 +55,12 @@
layoutWidth="FILL_PARENT"
align="Left|VCenter"
textFlags="UnderlineHotKeys"
textColor="#FFFFFF"
>
<state state_enabled="false" textColor="#C0C0C0"/>
<state state_enabled="true" state_hovered="true" textColor="#006080"/>
<state state_pressed="true" textColor="#000000"/>
<state state_focused="true" textColor="#FFFF00"/>
<state state_enabled="true" state_hovered="true" textColor="#FF0000"/>
</style>
<style id="BUTTON_LABEL_LINK" parent="BUTTON_LABEL"
textColor="#0000C0"
@ -80,11 +84,14 @@
align="Center"
margins="0,0,0,0"
/>
<style id="CHECKBOX_LABEL" parent="BUTTON_LABEL"
<style id="CHECKBOX_LABEL"
align="Left|VCenter"
margins="1,0,0,0"
textColor="#C0C0C0"
>
<state state_enabled="true" state_hovered="true" textColor="#006080"/>
<state state_enabled="false" textColor="#808080"/>
<state state_focused="true" textColor="#FFFF00"/>
<state state_enabled="true" state_hovered="true" textColor="#FF0000"/>
</style>
<style id="RADIOBUTTON" parent="CHECKBOX"
margins="0,0,0,0"
@ -97,8 +104,11 @@
<style id="RADIOBUTTON_LABEL" parent="CHECKBOX_LABEL"
align="Left|VCenter"
margins="1,0,0,0"
textColor="#C0C0C0"
>
<state state_enabled="true" state_hovered="true" textColor="#006080"/>
<state state_enabled="false" textColor="#808080"/>
<state state_focused="true" textColor="#FFFF00"/>
<state state_enabled="true" state_hovered="true" textColor="#FF0000"/>
</style>
<style id="TEXT"
margins="0,0,1,0"