mirror of
https://gitlab.com/manzerbredes/ochess.git
synced 2025-05-06 11:43:56 +00:00
Improve game filtering
This commit is contained in:
parent
8cc460fd20
commit
5df6e9395c
7 changed files with 47 additions and 7 deletions
|
@ -68,3 +68,25 @@ long GameListManager::GetItemGameId(long item){
|
|||
return std::stol(listItem.GetText().ToStdString());
|
||||
}
|
||||
|
||||
void GameListManager::Filter(std::string terms){
|
||||
ClearDisplayedRow();
|
||||
for(int i=0;i<rows.size();i++){
|
||||
RType row=rows[i];
|
||||
if(TERMS_IN(White) ||
|
||||
TERMS_IN(Black) ||
|
||||
TERMS_IN(Event) ||
|
||||
TERMS_IN(Round) ||
|
||||
TERMS_IN(Result) ||
|
||||
TERMS_IN(Eco)){
|
||||
DisplayRow(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GameListManager::ClearFilter() {
|
||||
ClearDisplayedRow();
|
||||
for(int i=0;i<rows.size();i++){
|
||||
DisplayRow(i);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue