Changed the argument order for the TextComponent constructor.

This commit is contained in:
Leon Styhre 2022-09-24 21:37:00 +02:00
parent a3db744700
commit 9d0b3b911f
6 changed files with 12 additions and 12 deletions

View file

@ -88,7 +88,7 @@ GuiScraperSearch::GuiScraperSearch(SearchType type, unsigned int scrapeCount)
mMD_ReleaseDate->setUppercase(true);
mMD_Developer = std::make_shared<TextComponent>("", font, mdColor, ALIGN_LEFT);
mMD_Publisher = std::make_shared<TextComponent>("", font, mdColor, ALIGN_LEFT);
mMD_Genre = std::make_shared<TextComponent>("", font, mdColor, ALIGN_LEFT, glm::vec3 {});
mMD_Genre = std::make_shared<TextComponent>("", font, mdColor, ALIGN_LEFT);
mMD_Players = std::make_shared<TextComponent>("", font, mdColor, ALIGN_LEFT);
mMD_Filler = std::make_shared<TextComponent>("", font, mdColor);

View file

@ -24,11 +24,11 @@ DateTimeComponent::DateTimeComponent()
DateTimeComponent::DateTimeComponent(const std::string& text,
const std::shared_ptr<Font>& font,
unsigned int color,
Alignment align,
Alignment horizontalAlignment,
glm::vec3 pos,
glm::vec2 size,
unsigned int bgcolor)
: TextComponent {text, font, color, align, pos, size, bgcolor}
: TextComponent {text, font, color, horizontalAlignment, ALIGN_CENTER, pos, size, bgcolor}
, mDisplayRelative {false}
{
// ISO 8601 date format.

View file

@ -24,9 +24,9 @@ public:
DateTimeComponent(const std::string& text,
const std::shared_ptr<Font>& font,
unsigned int color = 0x000000FF,
Alignment align = ALIGN_LEFT,
glm::vec3 pos = {},
glm::vec2 size = {},
Alignment horizontalAlignment = ALIGN_LEFT,
glm::vec3 pos = {0.0f, 0.0f, 0.0f},
glm::vec2 size = {0.0f, 0.0f},
unsigned int bgcolor = 0x00000000);
void render(const glm::mat4& parentTrans) override;

View file

@ -37,10 +37,10 @@ TextComponent::TextComponent(const std::string& text,
const std::shared_ptr<Font>& font,
unsigned int color,
Alignment horizontalAlignment,
Alignment verticalAlignment,
glm::vec3 pos,
glm::vec2 size,
unsigned int bgcolor,
Alignment verticalAlignment)
unsigned int bgcolor)
: mFont {nullptr}
, mRenderer {Renderer::getInstance()}
, mColor {0x000000FF}

View file

@ -29,10 +29,10 @@ public:
const std::shared_ptr<Font>& font,
unsigned int color = 0x000000FF,
Alignment horizontalAlignment = ALIGN_LEFT,
Alignment verticalAlignment = ALIGN_CENTER,
glm::vec3 pos = {0.0f, 0.0f, 0.0f},
glm::vec2 size = {0.0f, 0.0f},
unsigned int bgcolor = 0x00000000,
Alignment verticalAlignment = ALIGN_CENTER);
unsigned int bgcolor = 0x00000000);
void setFont(const std::shared_ptr<Font>& font);
void setUppercase(bool uppercase);

View file

@ -271,8 +271,8 @@ void CarouselComponent<T>::addEntry(Entry& entry, const std::shared_ptr<ThemeDat
nameEntry = entry.name;
auto text = std::make_shared<TextComponent>(
nameEntry, mFont, 0x000000FF, mItemHorizontalAlignment, glm::vec3 {0.0f, 0.0f, 0.0f},
mItemSize * mItemScale, 0x00000000, mItemVerticalAlignment);
nameEntry, mFont, 0x000000FF, mItemHorizontalAlignment, mItemVerticalAlignment,
glm::vec3 {0.0f, 0.0f, 0.0f}, mItemSize * mItemScale, 0x00000000);
if (legacyMode) {
text->applyTheme(theme, "system", "text_logoText",
ThemeFlags::FONT_PATH | ThemeFlags::FONT_SIZE | ThemeFlags::COLOR |