Differential D2412 Diff 10357 binaries/data/mods/public/gui/lobby/LobbyPage/GameListFilters/OpenGame.js
Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/lobby/LobbyPage/GameListFilters/OpenGame.js
- This file was added.
Property | Old Value | New Value |
---|---|---|
svn:eol-style | null | native \ No newline at end of property |
GameListFilters.OpenGame = class | |||||
{ | |||||
constructor(onFilterChange) | |||||
{ | |||||
this.checked = false; | |||||
this.onFilterChange = onFilterChange; | |||||
this.filterOpenGames = Engine.GetGUIObjectByName("filterOpenGames"); | |||||
this.filterOpenGames.checked = false; | |||||
this.filterOpenGames.onPress = this.onPress.bind(this); | |||||
} | |||||
onPress() | |||||
{ | |||||
this.checked = this.filterOpenGames.checked; | |||||
this.onFilterChange(); | |||||
} | |||||
filter(game) | |||||
{ | |||||
let stanza = game.stanza; | |||||
return !this.checked || stanza.state == "init" && stanza.nbp < stanza.maxnbp; | |||||
} | |||||
}; |
Wildfire Games · Phabricator