style: deixant guapetes les capçaleres de les classes
This commit is contained in:
@@ -42,7 +42,6 @@ Notifier::Notifier(const std::string& icon_file, const std::string& text)
|
||||
text_(Resource::get()->getText(text)),
|
||||
delta_timer_(std::make_unique<DeltaTimer>()),
|
||||
bg_color_(Options::notifications.color),
|
||||
stack_(false),
|
||||
has_icons_(!icon_file.empty()) {}
|
||||
|
||||
// Dibuja las notificaciones por pantalla
|
||||
@@ -116,7 +115,7 @@ void Notifier::clearFinishedNotifications() {
|
||||
notifications_.erase(result.begin(), result.end());
|
||||
}
|
||||
|
||||
void Notifier::show(std::vector<std::string> texts, NotificationText text_is, Uint32 display_duration, int icon, bool can_be_removed, const std::string& code) {
|
||||
void Notifier::show(std::vector<std::string> texts, TextAlign text_is, Uint32 display_duration, int icon, bool can_be_removed, const std::string& code) {
|
||||
// Si no hay texto, acaba
|
||||
if (texts.empty()) {
|
||||
return;
|
||||
@@ -144,7 +143,7 @@ void Notifier::show(std::vector<std::string> texts, NotificationText text_is, Ui
|
||||
const auto PADDING_IN_H = TEXT_SIZE;
|
||||
const auto PADDING_IN_V = TEXT_SIZE / 2;
|
||||
const int ICON_SPACE = icon >= 0 ? ICON_SIZE + PADDING_IN_H : 0;
|
||||
text_is = ICON_SPACE > 0 ? NotificationText::LEFT : text_is;
|
||||
text_is = ICON_SPACE > 0 ? TextAlign::LEFT : text_is;
|
||||
const float WIDTH = Options::game.width - (PADDING_OUT * 2);
|
||||
const float HEIGHT = (TEXT_SIZE * texts.size()) + (PADDING_IN_V * 2);
|
||||
const auto SHAPE = Shape::SQUARED;
|
||||
@@ -217,10 +216,10 @@ void Notifier::show(std::vector<std::string> texts, NotificationText text_is, Ui
|
||||
int iterator = 0;
|
||||
for (const auto& text : texts) {
|
||||
switch (text_is) {
|
||||
case NotificationText::LEFT:
|
||||
case TextAlign::LEFT:
|
||||
text_->writeColored(PADDING_IN_H + ICON_SPACE, PADDING_IN_V + (iterator * (TEXT_SIZE + 1)), text, COLOR);
|
||||
break;
|
||||
case NotificationText::CENTER:
|
||||
case TextAlign::CENTER:
|
||||
text_->writeDX(TEXT_CENTER | TEXT_COLOR, WIDTH / 2, PADDING_IN_V + (iterator * (TEXT_SIZE + 1)), text, 1, COLOR);
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user