1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Refactoring of SDL API usage:

- Rect no longer inherits from SDL_Rect
- renamed vcmi functions that used SDL naming format
- moved all functions in SDL_Extensions file into CSDL_Ext namespace
- SDL_Rect is now used only by SDL_Extensions, all other code uses Rect
This commit is contained in:
Ivan Savenko
2023-01-17 22:01:35 +02:00
parent 9a30484183
commit ee7a573cb8
56 changed files with 770 additions and 448 deletions

View File

@@ -208,10 +208,10 @@ void CQuestLog::showAll(SDL_Surface * to)
if(questIndex >= 0 && questIndex < labels.size())
{
//TODO: use child object to selection rect
Rect rect = Rect::around(labels[questIndex]->pos);
Rect rect = Rect::createAround(labels[questIndex]->pos, 1);
rect.x -= 2; // Adjustment needed as we want selection box on top of border in graphics
rect.w += 2;
CSDL_Ext::drawBorder(to, rect, int3(Colors::METALLIC_GOLD.r, Colors::METALLIC_GOLD.g, Colors::METALLIC_GOLD.b));
CSDL_Ext::drawBorder(to, rect, Colors::METALLIC_GOLD);
}
}