Skip to content

Commit

Permalink
Wx: Implement new, themed stars
Browse files Browse the repository at this point in the history
  • Loading branch information
spycrab committed May 31, 2017
1 parent 25f24d3 commit 6e4c342
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions Source/Core/DolphinWX/GameListCtrl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,11 +297,15 @@ CGameListCtrl::~CGameListCtrl()

template <typename T>
static void InitBitmap(wxImageList* img_list, std::vector<int>* vector, wxWindow* context,
const wxSize& usable_size, T index, const std::string& name)
const wxSize& usable_size, T index, const std::string& name,
bool themed = false)
{
wxSize size = img_list->GetSize();
(*vector)[static_cast<size_t>(index)] = img_list->Add(WxUtils::LoadScaledResourceBitmap(
name, context, size, usable_size, WxUtils::LSI_SCALE | WxUtils::LSI_ALIGN_VCENTER));
(*vector)[static_cast<size_t>(index)] = img_list->Add(
themed ? WxUtils::LoadScaledThemeBitmap(name, context, size, usable_size,
WxUtils::LSI_SCALE | WxUtils::LSI_ALIGN_VCENTER) :
WxUtils::LoadScaledResourceBitmap(name, context, size, usable_size,
WxUtils::LSI_SCALE | WxUtils::LSI_ALIGN_VCENTER));
}

void CGameListCtrl::InitBitmaps()
Expand Down Expand Up @@ -354,12 +358,12 @@ void CGameListCtrl::InitBitmaps()
"Platform_File");

m_EmuStateImageIndex.resize(6);
InitBitmap(img_list, &m_EmuStateImageIndex, this, rating_bmp_size, 0, "rating0");
InitBitmap(img_list, &m_EmuStateImageIndex, this, rating_bmp_size, 1, "rating1");
InitBitmap(img_list, &m_EmuStateImageIndex, this, rating_bmp_size, 2, "rating2");
InitBitmap(img_list, &m_EmuStateImageIndex, this, rating_bmp_size, 3, "rating3");
InitBitmap(img_list, &m_EmuStateImageIndex, this, rating_bmp_size, 4, "rating4");
InitBitmap(img_list, &m_EmuStateImageIndex, this, rating_bmp_size, 5, "rating5");
InitBitmap(img_list, &m_EmuStateImageIndex, this, rating_bmp_size, 0, "rating0", true);
InitBitmap(img_list, &m_EmuStateImageIndex, this, rating_bmp_size, 1, "rating1", true);
InitBitmap(img_list, &m_EmuStateImageIndex, this, rating_bmp_size, 2, "rating2", true);
InitBitmap(img_list, &m_EmuStateImageIndex, this, rating_bmp_size, 3, "rating3", true);
InitBitmap(img_list, &m_EmuStateImageIndex, this, rating_bmp_size, 4, "rating4", true);
InitBitmap(img_list, &m_EmuStateImageIndex, this, rating_bmp_size, 5, "rating5", true);

m_utility_game_banners.resize(1);
InitBitmap(img_list, &m_utility_game_banners, this, size, 0, "nobanner");
Expand Down

0 comments on commit 6e4c342

Please sign in to comment.