Selaa lähdekoodia

Merge pull request #6182 from Laserlicht/color_list

fixing trimming color in object list
Ivan Savenko 3 viikkoa sitten
vanhempi
sitoutus
076f7ba5b5
1 muutettua tiedostoa jossa 2 lisäystä ja 0 poistoa
  1. 2 0
      client/windows/GUIClasses.cpp

+ 2 - 0
client/windows/GUIClasses.cpp

@@ -1668,6 +1668,8 @@ void CObjectListWindow::trimTextIfTooWide(std::string & text, int id) const
 {
 	int maxWidth = pos.w - 60;	// 60 px for scrollbar and borders
 	std::string idStr = '(' + std::to_string(id) + ')';
+	if(text[0] == '{')
+		idStr = '}' + idStr;
 	const auto & font = ENGINE->renderHandler().loadFont(FONT_SMALL);
 	std::string suffix = " ... " + idStr;