Fix default char for checkbox and radiobox on Windows.

This addresses:
https://github.com/ArthurSonzogni/FTXUI/issues/27
This commit is contained in:
ArthurSonzogni 2020-07-16 21:39:05 +02:00 committed by Arthur Sonzogni
parent 22afacc28b
commit 61ca97840b
2 changed files with 10 additions and 2 deletions

View File

@ -20,10 +20,13 @@ class CheckBox : public Component {
bool state = false; bool state = false;
std::wstring label = L"label"; std::wstring label = L"label";
// std::wstring checked = L"[X] "; #if defined(_WIN32)
// std::wstring unchecked = L"[ ] "; std::wstring checked = L"[X] ";
std::wstring unchecked = L"[ ] ";
#else
std::wstring checked = L""; std::wstring checked = L"";
std::wstring unchecked = L""; std::wstring unchecked = L"";
#endif
Decorator focused_style = inverted; Decorator focused_style = inverted;
Decorator unfocused_style = nothing; Decorator unfocused_style = nothing;

View File

@ -21,8 +21,13 @@ class RadioBox : public Component {
int focused = 0; int focused = 0;
std::vector<std::wstring> entries; std::vector<std::wstring> entries;
#if defined(_WIN32)
std::wstring checked = L"(*) ";
std::wstring unchecked = L"( ) ";
#else
std::wstring checked = L""; std::wstring checked = L"";
std::wstring unchecked = L""; std::wstring unchecked = L"";
#endif
Decorator focused_style = inverted; Decorator focused_style = inverted;
Decorator unfocused_style = nothing; Decorator unfocused_style = nothing;