mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
show/showAll methods now use Canvas instead of SDL_Surface
- added compatibility method to Canvas to allow SDL_Surface access - added drawBorder method to Canvas to replace CSDL_Ext method - added drawColor method to Canvas to replace CSDL_Ext method - minor changes to Tavern and Trade windows to adapt to new API
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
#include "../CPlayerInterface.h"
|
||||
#include "../PlayerLocalState.h"
|
||||
#include "../gui/CGuiHandler.h"
|
||||
#include "../renderSDL/SDL_Extensions.h"
|
||||
#include "../render/Canvas.h"
|
||||
|
||||
#include "../../lib/CGeneralTextHandler.h"
|
||||
#include "../../lib/CHeroHandler.h"
|
||||
@@ -92,9 +92,9 @@ CList::CList(int Size, Rect widgetDimensions)
|
||||
pos.h = widgetDimensions.h;
|
||||
}
|
||||
|
||||
void CList::showAll(SDL_Surface * to)
|
||||
void CList::showAll(Canvas & to)
|
||||
{
|
||||
CSDL_Ext::fillRect(to, pos, Colors::BLACK);
|
||||
to.drawColor(pos, Colors::BLACK);
|
||||
CIntObject::showAll(to);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user