mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 21:27:01 -04:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user