mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-04-27 04:41:39 +00:00
use correct size calculation
This commit is contained in:
parent
e3e9d1f343
commit
b796b59a64
1 changed files with 8 additions and 1 deletions
|
|
@ -1388,7 +1388,6 @@ static void DrawInfoPanel(ImVec2 infoMin, ImVec2 infoMax)
|
||||||
|
|
||||||
auto textX = clipRectMin.x - Scale(0.5f);
|
auto textX = clipRectMin.x - Scale(0.5f);
|
||||||
auto textY = thumbnailMax.y + offsetY;
|
auto textY = thumbnailMax.y + offsetY;
|
||||||
auto textSize = MeasureCentredParagraph(g_seuratFont, fontSize, clipRectMax.x - clipRectMin.x, 5.0f, desc.c_str());
|
|
||||||
|
|
||||||
if (Config::Language == ELanguage::Japanese)
|
if (Config::Language == ELanguage::Japanese)
|
||||||
{
|
{
|
||||||
|
|
@ -1405,6 +1404,14 @@ static void DrawInfoPanel(ImVec2 infoMin, ImVec2 infoMax)
|
||||||
textY += annotationFontSize;
|
textY += annotationFontSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const auto input = RemoveRubyAnnotations(desc.c_str());
|
||||||
|
auto lines = Split(input.first.c_str(), g_seuratFont, fontSize, clipRectMax.x - clipRectMin.x);
|
||||||
|
|
||||||
|
for (auto& line : lines)
|
||||||
|
line = ReAddRubyAnnotations(line, input.second);
|
||||||
|
|
||||||
|
auto textSize = MeasureCentredParagraph(g_seuratFont, fontSize, 5.0f, lines);
|
||||||
|
|
||||||
drawList->PushClipRect(clipRectMin, clipRectMax, false);
|
drawList->PushClipRect(clipRectMin, clipRectMax, false);
|
||||||
|
|
||||||
static auto isScrolling = false;
|
static auto isScrolling = false;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue