Added icon for MSE in packages window;

Added resample(image,width,height), instead of always passing in images

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@806 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-12-30 23:48:26 +00:00
parent 17965eea73
commit 5fc06663b1
14 changed files with 145 additions and 83 deletions
+3 -3
View File
@@ -77,9 +77,9 @@ void StatCategoryList::drawItem(DC& dc, int x, int y, size_t item, bool selected
if (!cat.icon_filename.empty() && !cat.icon.Ok()) {
InputStreamP file = game->openIn(cat.icon_filename);
Image img(*file);
Image resampled(21, 21);
resample_preserve_aspect(img, resampled);
if (img.Ok()) cat.icon = Bitmap(resampled);
if (img.Ok()) {
cat.icon = Bitmap(resample_preserve_aspect(img, 21, 21));
}
}
if (cat.icon.Ok()) {
dc.DrawBitmap(cat.icon, x+1, y+1);