Added direct theme support and will slowly move more things into this struct for configuring the look.
This commit is contained in:
parent
b9deb3a0de
commit
a18d60dcb0
9 changed files with 48 additions and 67 deletions
|
@ -5,7 +5,7 @@ namespace guecs {
|
|||
using std::make_shared;
|
||||
|
||||
UI::UI() {
|
||||
$font = make_shared<sf::Font>(FONT_FILE_NAME);
|
||||
$font = make_shared<sf::Font>(THEME.FONT_FILE_NAME);
|
||||
}
|
||||
|
||||
void UI::position(int x, int y, int width, int height) {
|
||||
|
@ -180,7 +180,7 @@ namespace guecs {
|
|||
tc->text->setString(content);
|
||||
} else {
|
||||
auto &cell = cell_for(ent);
|
||||
Textual to_set{content, TEXT_SIZE};
|
||||
Textual to_set{content, THEME.TEXT_SIZE};
|
||||
to_set.init(cell, $font);
|
||||
set<Textual>(ent, to_set);
|
||||
}
|
||||
|
@ -214,9 +214,9 @@ namespace guecs {
|
|||
tc->text->setString(content);
|
||||
} else {
|
||||
auto &cell = cell_for(ent);
|
||||
Label to_set{content, LABEL_SIZE};
|
||||
Label to_set{content, THEME.LABEL_SIZE};
|
||||
to_set.init(cell, $font);
|
||||
to_set.text->setFillColor(TEXT_COLOR);
|
||||
to_set.text->setFillColor(THEME.TEXT_COLOR);
|
||||
set<Label>(ent, to_set);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue