diff --git a/Source/UI/UIBarGraph.cpp b/Source/UI/UIBarGraph.cpp index 316cd8e2c..42ea94eb6 100644 --- a/Source/UI/UIBarGraph.cpp +++ b/Source/UI/UIBarGraph.cpp @@ -110,7 +110,12 @@ void UIBarGraph::Paint() { return; } - const std::string color = this->m_value >= 25.0f ? "blue" : "red"; + std::string color; + if (this->m_value < 25.0f) { + color = "red"; + } else { + color = "blue"; + } const int fill = (this->geometry.width - 8) * static_cast(this->m_value) / 100; auto* left = static_cast(ResourceMgr::Instance().Load(Resolve(("유저인터페이스\\basic_interface\\gze" + color + "_left.bmp").c_str()))); @@ -159,7 +164,10 @@ void UIBarGraphHomun::Paint() { return; } - const std::string color = ratio < 0.25 ? "red" : "blue"; + std::string color = "blue"; + if (ratio < 0.25) { + color = "red"; + } const int fill = static_cast(static_cast(this->geometry.width - 8) * ratio); auto* left = static_cast(ResourceMgr::Instance().Load(Resolve(("유저인터페이스\\basic_interface\\gze" + color + "_left.bmp").c_str()))); @@ -195,7 +203,10 @@ void UIBarGraphPlayer::Paint() { } const double ratio = static_cast(current) / static_cast(maximum); - const std::string color = ratio < 0.25 ? "red" : "blue"; + std::string color = "blue"; + if (ratio < 0.25) { + color = "red"; + } const int fill = static_cast(static_cast(this->geometry.width - 8) * ratio); auto* left = static_cast(ResourceMgr::Instance().Load(Resolve(("유저인터페이스\\basic_interface\\gze" + color + "_left.bmp").c_str())));