mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	vcmi: name infobar height and width
This commit is contained in:
		| @@ -86,7 +86,7 @@ CAdvMapInt::CAdvMapInt(): | ||||
| 	statusbar(CGStatusBar::create(ADVOPT.statusbarX,ADVOPT.statusbarY,ADVOPT.statusbarG)), | ||||
| 	heroList(new CHeroList(ADVOPT.hlistSize, Point(ADVOPT.hlistX, ADVOPT.hlistY), ADVOPT.hlistAU, ADVOPT.hlistAD)), | ||||
| 	townList(new CTownList(ADVOPT.tlistSize, Point(ADVOPT.tlistX, ADVOPT.tlistY), ADVOPT.tlistAU, ADVOPT.tlistAD)), | ||||
| 	infoBar(new CInfoBar(Rect(ADVOPT.infoboxX, ADVOPT.infoboxY, 192, 192))), | ||||
| 	infoBar(new CInfoBar(Point(ADVOPT.infoboxX, ADVOPT.infoboxY))), | ||||
| 	resdatabar(new CResDataBar), | ||||
| 	mapAudio(new MapAudioPlayer()), | ||||
| 	terrain(new MapView(Point(ADVOPT.advmapX, ADVOPT.advmapY), Point(ADVOPT.advmapW, ADVOPT.advmapH))), | ||||
|   | ||||
| @@ -279,6 +279,10 @@ CInfoBar::CInfoBar(const Rect & position) | ||||
| 	reset(); | ||||
| } | ||||
|  | ||||
| CInfoBar::CInfoBar(const Point & position): CInfoBar(Rect(position.x, position.y, width, height)) | ||||
| { | ||||
| } | ||||
|  | ||||
| void CInfoBar::showDate() | ||||
| { | ||||
| 	OBJECT_CONSTRUCTION_CUSTOM_CAPTURING(255-DISPOSE); | ||||
|   | ||||
| @@ -32,6 +32,13 @@ class CTextBox; | ||||
| /// Info box which shows next week/day information, hold the current date | ||||
| class CInfoBar : public CIntObject | ||||
| { | ||||
| private: | ||||
| 	/// Infobar actually have a fixed size | ||||
| 	/// Declare before to compute correct size of widgets | ||||
| 	static constexpr int width = 192; | ||||
| 	static constexpr int height = 192; | ||||
| 	static constexpr int component_offset = 8; | ||||
|  | ||||
| 	//all visible information located in one object - for ease of replacing | ||||
| 	class CVisibleInfo : public CIntObject | ||||
| 	{ | ||||
| @@ -124,6 +131,7 @@ class CInfoBar : public CIntObject | ||||
| 	void playNewDaySound(); | ||||
| public: | ||||
| 	CInfoBar(const Rect & pos); | ||||
| 	CInfoBar(const Point & pos); | ||||
|  | ||||
| 	/// show new day/week animation | ||||
| 	void showDate(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user