mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-17 01:32:21 +02:00
minors:
- fixes missing line of pixels with Chinese fonts - disabling a mod won't disable all its requirements as well
This commit is contained in:
@ -1284,7 +1284,7 @@ void CTextContainer::blitLine(SDL_Surface *to, Rect destRect, std::string what)
|
|||||||
f->renderTextLeft(to, toPrint, color, where);
|
f->renderTextLeft(to, toPrint, color, where);
|
||||||
begin = end;
|
begin = end;
|
||||||
|
|
||||||
destRect.x += f->getStringWidth(toPrint);
|
where.x += f->getStringWidth(toPrint);
|
||||||
}
|
}
|
||||||
currDelimeter++;
|
currDelimeter++;
|
||||||
}
|
}
|
||||||
|
@ -313,11 +313,11 @@ void CBitmapHanFont::renderCharacter(SDL_Surface * surface, int characterIndex,
|
|||||||
|
|
||||||
// start of line, may differ from 0 due to end of surface or clipped surface
|
// start of line, may differ from 0 due to end of surface or clipped surface
|
||||||
int lineBegin = std::max<int>(0, clipRect.y - posY);
|
int lineBegin = std::max<int>(0, clipRect.y - posY);
|
||||||
int lineEnd = std::min<int>(size, clipRect.y + clipRect.h - posY - 1);
|
int lineEnd = std::min<int>(size, clipRect.y + clipRect.h - posY);
|
||||||
|
|
||||||
// start end end of each row, may differ from 0
|
// start end end of each row, may differ from 0
|
||||||
int rowBegin = std::max<int>(0, clipRect.x - posX);
|
int rowBegin = std::max<int>(0, clipRect.x - posX);
|
||||||
int rowEnd = std::min<int>(size, clipRect.x + clipRect.w - posX - 1);
|
int rowEnd = std::min<int>(size, clipRect.x + clipRect.w - posX);
|
||||||
|
|
||||||
//for each line in symbol
|
//for each line in symbol
|
||||||
for(int dy = lineBegin; dy <lineEnd; dy++)
|
for(int dy = lineBegin; dy <lineEnd; dy++)
|
||||||
|
@ -351,10 +351,10 @@ void CModListView::on_disableButton_clicked()
|
|||||||
{
|
{
|
||||||
QString modName = modModel->modIndexToName(filterModel->mapToSource(ui->allModsView->currentIndex()).row());
|
QString modName = modModel->modIndexToName(filterModel->mapToSource(ui->allModsView->currentIndex()).row());
|
||||||
|
|
||||||
for (auto & name : modModel->getRequirements(modName))
|
if (modModel->hasMod(modName) &&
|
||||||
if (modModel->hasMod(name) &&
|
modModel->getMod(modName).isEnabled())
|
||||||
modModel->getMod(name).isEnabled())
|
manager->disableMod(modName);
|
||||||
manager->disableMod(name);
|
|
||||||
checkManagerErrors();
|
checkManagerErrors();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user