UI tweaks for more layers and debug
This commit is contained in:
@ -31,7 +31,7 @@ UIText::~UIText()
|
||||
{
|
||||
}
|
||||
|
||||
void UIText::ParseString(std::string inputText, int x, int y, int letterScale, std::string tag)
|
||||
void UIText::ParseString(std::string inputText, int x, int y, int letterScale, std::string tag, Game::groupLabels group)
|
||||
{
|
||||
//Parse input text into an array of char
|
||||
int posX = x;
|
||||
@ -51,17 +51,17 @@ void UIText::ParseString(std::string inputText, int x, int y, int letterScale, s
|
||||
posX = x;
|
||||
posY += letterHeight;
|
||||
}
|
||||
UIText::AddLetter(posX, posY, current, tag, letterScale);
|
||||
UIText::AddLetter(posX, posY, current, tag, letterScale, group);
|
||||
current = inputText[i];
|
||||
} while ((strcmp(¤t,"\0"))!=0);
|
||||
}
|
||||
|
||||
|
||||
void UIText::AddLetter(int xpos, int ypos, char crnt, std::string tag, int lttrScale)
|
||||
void UIText::AddLetter(int xpos, int ypos, char crnt, std::string tag, int lttrScale, Game::groupLabels groupLabel)
|
||||
{
|
||||
auto& letter(manager.addEntity());
|
||||
letter.addComponent<TransformComponent>(xpos*lttrScale, ypos*lttrScale, letterWidth, letterHeight, 1);
|
||||
letter.addComponent<SpriteComponent>("font", SpriteComponent::spriteText, crnt, letterWidth, letterHeight, lttrScale);
|
||||
letter.setTag(tag);
|
||||
letter.addGroup(Game::groupUI_Layer1);
|
||||
letter.addGroup(groupLabel);
|
||||
}
|
||||
|
Reference in New Issue
Block a user