Commit 378b11be authored by yybbwc's avatar yybbwc Committed by GitHub

set tooltip on long card name (#2773)

parent 471c2134
...@@ -1557,6 +1557,10 @@ void Game::ShowCardInfo(int code, bool resize) { ...@@ -1557,6 +1557,10 @@ void Game::ShowCardInfo(int code, bool resize) {
myswprintf(formatBuffer, L"%ls[%08d]", dataManager.GetName(code), code); myswprintf(formatBuffer, L"%ls[%08d]", dataManager.GetName(code), code);
} }
stName->setText(formatBuffer); stName->setText(formatBuffer);
if(guiFont->getDimension(formatBuffer).Width > stName->getRelativePosition().getWidth() - gameConf.textfontsize)
stName->setToolTipText(formatBuffer);
else
stName->setToolTipText(nullptr);
int offset = 0; int offset = 0;
if (is_valid && !gameConf.hide_setname) { if (is_valid && !gameConf.hide_setname) {
auto& cd = cit->second; auto& cd = cit->second;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment