[Scummvm-git-logs] scummvm master -> ae75c6c7b7254906eddba210d566dd74c5c67617
Scorpeg
noreply at scummvm.org
Tue Nov 3 16:19:04 UTC 2026
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
ae75c6c7b7 GRAPHICS: Expose hotspot label truncation to subclasses
Commit: ae75c6c7b7254906eddba210d566dd74c5c67617
https://github.com/scummvm/scummvm/commit/ae75c6c7b7254906eddba210d566dd74c5c67617
Author: Scorp (scorp at mrs.mn)
Date: 2026-11-03T19:18:54+03:00
Commit Message:
GRAPHICS: Expose hotspot label truncation to subclasses
Changed paths:
graphics/hotspot_renderer.cpp
graphics/hotspot_renderer.h
diff --git a/graphics/hotspot_renderer.cpp b/graphics/hotspot_renderer.cpp
index 9dccb68f82c..d60a9ed7c2e 100644
--- a/graphics/hotspot_renderer.cpp
+++ b/graphics/hotspot_renderer.cpp
@@ -432,7 +432,7 @@ Common::Rect HotspotRenderer::findLabelPlacement(int width, int height, Common::
return boxRect;
}
-static Common::U32String truncateToWidth(const Common::U32String &text, const Font *font, int maxWidth) {
+Common::U32String HotspotRenderer::truncateToWidth(const Common::U32String &text, const Font *font, int maxWidth) {
if (maxWidth <= 0 || font->getStringWidth(text) <= maxWidth)
return text;
diff --git a/graphics/hotspot_renderer.h b/graphics/hotspot_renderer.h
index ddc79ea64f7..02d15d1d512 100644
--- a/graphics/hotspot_renderer.h
+++ b/graphics/hotspot_renderer.h
@@ -136,6 +136,7 @@ protected:
};
virtual LabelLayout layoutHotspotLabel(const HotspotInfo &hotspot, Common::Point position,
int overlayWidth, int overlayHeight, const Font *font);
+ static Common::U32String truncateToWidth(const Common::U32String &text, const Font *font, int maxWidth);
Common::Rect findLabelPlacement(int width, int height, Common::Point markerPos,
int overlayWidth, int overlayHeight, int gap);
Common::Rect findInlineLabelSlot(Common::Point markerPos, int width, int height,
More information about the Scummvm-git-logs
mailing list