forked from jaildesigner-jailgames/jaildoctors_dilemma
linter
This commit is contained in:
@@ -90,7 +90,7 @@ void Notifier::update(float delta_time) {
|
||||
if (notification.rect.y >= notification.y) {
|
||||
notification.rect.y = notification.y;
|
||||
notification.state = Status::STAY;
|
||||
notification.elapsed_time = 0.0f;
|
||||
notification.elapsed_time = 0.0F;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -163,7 +163,7 @@ void Notifier::show(std::vector<std::string> texts, const Style& style, int icon
|
||||
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;
|
||||
const TextAlign text_is = ICON_SPACE > 0 ? TextAlign::LEFT : style.text_align;
|
||||
const TextAlign TEXT_IS = ICON_SPACE > 0 ? TextAlign::LEFT : style.text_align;
|
||||
const float WIDTH = Options::game.width - (PADDING_OUT * 2);
|
||||
const float HEIGHT = (TEXT_SIZE * texts.size()) + (PADDING_IN_V * 2);
|
||||
const auto SHAPE = style.shape;
|
||||
@@ -235,7 +235,7 @@ void Notifier::show(std::vector<std::string> texts, const Style& style, int icon
|
||||
const auto COLOR = style.text_color;
|
||||
int iterator = 0;
|
||||
for (const auto& text : texts) {
|
||||
switch (text_is) {
|
||||
switch (TEXT_IS) {
|
||||
case TextAlign::LEFT:
|
||||
text_->writeColored(PADDING_IN_H + ICON_SPACE, PADDING_IN_V + (iterator * (TEXT_SIZE + 1)), text, COLOR);
|
||||
break;
|
||||
|
||||
@@ -71,17 +71,17 @@ class Notifier {
|
||||
struct Notification {
|
||||
std::shared_ptr<Surface> surface{nullptr};
|
||||
std::shared_ptr<SurfaceSprite> sprite{nullptr};
|
||||
std::vector<std::string> texts{};
|
||||
std::vector<std::string> texts;
|
||||
Status state{Status::RISING};
|
||||
Shape shape{Shape::SQUARED};
|
||||
SDL_FRect rect{0.0F, 0.0F, 0.0F, 0.0F};
|
||||
int y{0};
|
||||
int travel_dist{0};
|
||||
std::string code{};
|
||||
std::string code;
|
||||
bool can_be_removed{true};
|
||||
int height{0};
|
||||
float elapsed_time{0.0f};
|
||||
float display_duration{0.0f};
|
||||
float elapsed_time{0.0F};
|
||||
float display_duration{0.0F};
|
||||
};
|
||||
|
||||
// Constantes
|
||||
|
||||
Reference in New Issue
Block a user