Debug GameListManager

This commit is contained in:
Loic Guegan 2022-12-26 06:48:11 +01:00
parent 723f7cc91b
commit 54cb4dc6c6
2 changed files with 12 additions and 0 deletions

View file

@ -29,10 +29,17 @@ void GameListManager::DisplayRow(long id){
game_list->SetItem(index, 4, row.Round);
game_list->SetItem(index, 5, row.Result);
game_list->SetItem(index, 6, row.Eco);
if(std::find(opened_items.begin(), opened_items.end(), index) != opened_items.end())
MarkItemAsOpen(index);
if(std::find(deleted_items.begin(), deleted_items.end(), index) != deleted_items.end())
MarkItemAsDeleted(index);
}
void GameListManager::Clear(){
game_list->DeleteAllItems();
deleted_items.clear();
opened_items.clear();
rows.clear();
}
@ -41,10 +48,12 @@ void GameListManager::ClearDisplayedRow(){
}
void GameListManager::MarkItemAsOpen(long item){
opened_items.push_back(item);
game_list->SetItemBackgroundColour(item, *wxGREEN);
}
void GameListManager::MarkItemAsDeleted(long item){
deleted_items.push_back(item);
game_list->SetItemBackgroundColour(item, *wxRED);
}