浏览代码

improve readability

Michael 2 年之前
父节点
当前提交
3593911dde
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      client/adventureMap/AdventureMapInterface.cpp

+ 3 - 1
client/adventureMap/AdventureMapInterface.cpp

@@ -171,7 +171,9 @@ void AdventureMapInterface::dim(Canvas & to)
 		std::shared_ptr<AdventureMapInterface> casted = std::dynamic_pointer_cast<AdventureMapInterface>(window);
 		if (!casted && !window->isPopupWindow())
 		{
-			to.drawColor(Rect(0, 0, GH.screenDimensions().x, GH.screenDimensions().y), ColorRGBA(0, 0, 0, std::clamp<int>(settings["adventure"]["backgroundDimLevel"].Integer(), 0, 255)));
+			Rect targetRect(0, 0, GH.screenDimensions().x, GH.screenDimensions().y);
+			ColorRGBA colorToFill(0, 0, 0, std::clamp<int>(settings["adventure"]["backgroundDimLevel"].Integer(), 0, 255));
+			to.drawColor(targetRect, colorToFill);
 			return;
 		}
 	}