2
0
Эх сурвалжийг харах

CComponent: add option to choose image size

This option is used to choose small resource icons in Quest Log when there more than 4 of them.
ArseniyShestakov 10 жил өмнө
parent
commit
ded4c18df9

+ 2 - 2
client/widgets/CComponent.cpp

@@ -34,7 +34,7 @@ CComponent::CComponent(Etype Type, int Subtype, int Val, ESize imageSize):
 	init(Type, Subtype, Val, imageSize);
 }
 
-CComponent::CComponent(const Component &c):
+CComponent::CComponent(const Component &c, ESize imageSize):
 	image(nullptr),
 	perDay(false)
 {
@@ -43,7 +43,7 @@ CComponent::CComponent(const Component &c):
 	if(c.id == Component::RESOURCE && c.when==-1)
 		perDay = true;
 
-	init((Etype)c.id,c.subtype,c.val, large);
+	init((Etype)c.id,c.subtype,c.val, imageSize);
 }
 
 void CComponent::init(Etype Type, int Subtype, int Val, ESize imageSize)

+ 1 - 1
client/widgets/CComponent.h

@@ -55,7 +55,7 @@ public:
 	std::string getSubtitle();
 
 	CComponent(Etype Type, int Subtype, int Val = 0, ESize imageSize=large);//c-tor
-	CComponent(const Component &c); //c-tor
+	CComponent(const Component &c, ESize imageSize=large); //c-tor
 
 	void clickRight(tribool down, bool previousState); //call-in
 };