Converted almost everything to use wstring so that it works better with SFML and the unicode/utf8 usage in the system.
This commit is contained in:
parent
47c6bfd531
commit
72951f308f
17 changed files with 156 additions and 162 deletions
23
guecs.cpp
23
guecs.cpp
|
@ -40,7 +40,6 @@ namespace guecs {
|
|||
bg.init();
|
||||
}
|
||||
|
||||
|
||||
$world.query<Background>([](auto, auto& bg) {
|
||||
bg.init();
|
||||
});
|
||||
|
@ -65,14 +64,6 @@ namespace guecs {
|
|||
text.init(cell, $font);
|
||||
});
|
||||
|
||||
$world.query<lel::Cell, WideText>([this](auto, auto& cell, auto& text) {
|
||||
text.init(cell, $font);
|
||||
});
|
||||
|
||||
$world.query<lel::Cell, WideLabel>([this](auto, auto& cell, auto& text) {
|
||||
text.init(cell, $font);
|
||||
});
|
||||
|
||||
$world.query<lel::Cell, Sprite>([&](auto, auto &cell, auto &sprite) {
|
||||
sprite.init(cell);
|
||||
});
|
||||
|
@ -114,19 +105,9 @@ namespace guecs {
|
|||
window.draw(*text.text);
|
||||
});
|
||||
|
||||
$world.query<WideLabel>([&](auto, auto& text) {
|
||||
window.draw(*text.text);
|
||||
});
|
||||
|
||||
$world.query<WideText>([&](auto, auto& text) {
|
||||
window.draw(*text.text);
|
||||
});
|
||||
|
||||
$world.query<Textual>([&](auto, auto& text) {
|
||||
window.draw(*text.text);
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
bool UI::mouse(float x, float y) {
|
||||
|
@ -160,7 +141,7 @@ namespace guecs {
|
|||
}
|
||||
}
|
||||
|
||||
void UI::show_text(string region, string content) {
|
||||
void UI::show_text(string region, wstring content) {
|
||||
auto ent = entity(region);
|
||||
|
||||
if(auto text = get_if<Textual>(ent)) {
|
||||
|
@ -174,7 +155,7 @@ namespace guecs {
|
|||
}
|
||||
}
|
||||
|
||||
void UI::show_label(string region, string content) {
|
||||
void UI::show_label(string region, wstring content) {
|
||||
auto ent = entity(region);
|
||||
|
||||
if(auto text = get_if<Label>(ent)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue