소스 검색

InfoBar: fix tiny selection with data

Konstantin 2 년 전
부모
커밋
50c9a57133
1개의 변경된 파일1개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 3
      client/adventureMap/CInfoBar.cpp

+ 1 - 3
client/adventureMap/CInfoBar.cpp

@@ -173,7 +173,7 @@ CInfoBar::VisibleComponentInfo::VisibleComponentInfo(const std::vector<Component
 	auto fullRect = Rect(CInfoBar::offset, CInfoBar::offset, data_width - 2 * CInfoBar::offset, data_height - 2 * CInfoBar::offset);
 	auto textRect = fullRect;
 	auto imageRect = fullRect;
-	auto font = FONT_SMALL;
+	auto font = tiny ? FONT_TINY : FONT_SMALL;
 	auto maxComponents = 2; 
 
 	if(!compsToDisplay.empty())
@@ -210,8 +210,6 @@ CInfoBar::VisibleComponentInfo::VisibleComponentInfo(const std::vector<Component
 
 		comps = std::make_shared<CComponentBox>(vect, imageRect, 4, 4, 1, maxComponents);
 	}
-	else
-		font = tiny ? FONT_TINY : font;
 
 	if(!message.empty())
 		text = std::make_shared<CMultiLineLabel>(textRect, font, ETextAlignment::CENTER, Colors::WHITE, message);