mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	show building names with ALT
This commit is contained in:
		| @@ -60,6 +60,11 @@ bool ImageScaled::isTransparent(const Point &coords) const | ||||
| 	return source->isTransparent(coords); | ||||
| } | ||||
|  | ||||
| Rect ImageScaled::contentRect() const | ||||
| { | ||||
| 	return source->contentRect(); | ||||
| } | ||||
|  | ||||
| Point ImageScaled::dimensions() const | ||||
| { | ||||
| 	return source->dimensions(); | ||||
|   | ||||
| @@ -52,6 +52,7 @@ public: | ||||
| 	void scaleTo(const Point & size) override; | ||||
| 	void exportBitmap(const boost::filesystem::path & path) const override; | ||||
| 	bool isTransparent(const Point & coords) const override; | ||||
| 	Rect contentRect() const override; | ||||
| 	Point dimensions() const override; | ||||
| 	void setAlpha(uint8_t value) override; | ||||
| 	void setBlitMode(EImageBlitMode mode) override; | ||||
|   | ||||
| @@ -388,6 +388,13 @@ bool SDLImageShared::isTransparent(const Point & coords) const | ||||
| 		return true; | ||||
| } | ||||
|  | ||||
| Rect SDLImageShared::contentRect() const | ||||
| { | ||||
| 	auto tmpMargins = margins / preScaleFactor; | ||||
| 	auto tmpSize = Point(surf->w, surf->h) / preScaleFactor; | ||||
| 	return Rect(tmpMargins, tmpSize); | ||||
| } | ||||
|  | ||||
| Point SDLImageShared::dimensions() const | ||||
| { | ||||
| 	return fullSize / preScaleFactor; | ||||
| @@ -621,6 +628,11 @@ bool SDLImageBase::isTransparent(const Point & coords) const | ||||
| 	return image->isTransparent(coords); | ||||
| } | ||||
|  | ||||
| Rect SDLImageBase::contentRect() const | ||||
| { | ||||
| 	return image->contentRect(); | ||||
| } | ||||
|  | ||||
| Point SDLImageBase::dimensions() const | ||||
| { | ||||
| 	return image->dimensions(); | ||||
|   | ||||
| @@ -57,6 +57,7 @@ public: | ||||
| 	void exportBitmap(const boost::filesystem::path & path, SDL_Palette * palette) const override; | ||||
| 	Point dimensions() const override; | ||||
| 	bool isTransparent(const Point & coords) const override; | ||||
| 	Rect contentRect() const override; | ||||
| 	[[nodiscard]] std::shared_ptr<IImage> createImageReference(EImageBlitMode mode) const override; | ||||
| 	[[nodiscard]] std::shared_ptr<const ISharedImage> horizontalFlip() const override; | ||||
| 	[[nodiscard]] std::shared_ptr<const ISharedImage> verticalFlip() const override; | ||||
| @@ -78,6 +79,7 @@ public: | ||||
| 	SDLImageBase(const std::shared_ptr<const ISharedImage> & image, EImageBlitMode mode); | ||||
|  | ||||
| 	bool isTransparent(const Point & coords) const override; | ||||
| 	Rect contentRect() const override; | ||||
| 	Point dimensions() const override; | ||||
| 	void setAlpha(uint8_t value) override; | ||||
| 	void setBlitMode(EImageBlitMode mode) override; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user