Differential D2412 Diff 10323 binaries/data/mods/public/gui/lobby/LobbyPage/GameListFilters/MapType.js
Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/lobby/LobbyPage/GameListFilters/MapType.js
- This file was added.
Property | Old Value | New Value |
---|---|---|
svn:eol-style | null | native \ No newline at end of property |
GameListFilters.MapType = class | |||||
{ | |||||
constructor(onFilterChange) | |||||
{ | |||||
this.mapTypeFilter = Engine.GetGUIObjectByName("mapTypeFilter"); | |||||
this.mapTypeFilter.list = [translateWithContext("map", "Any")].concat(g_MapTypes.Title); | |||||
this.mapTypeFilter.list_data = [""].concat(g_MapTypes.Name); | |||||
this.mapTypeFilter.selected = g_MapTypes.Default; | |||||
this.mapTypeFilter.onSelectionChange = onFilterChange; | |||||
// Hide element to compensate width | |||||
let hidden = Engine.ConfigDB_GetValue("user", "lobby.columns.gamerating") == "true"; | |||||
this.mapTypeFilter.hidden = hidden; | |||||
//if (hidden) | |||||
// this.mapTypeFilter.size = Engine.GetGUIObjectByName("mapTypeFilter"); | |||||
{ | |||||
// TODO | |||||
/* | |||||
let mapTypeFilterSize = Engine.GetGUIObjectByName("mapTypeFilter"); | |||||
let size = this.playersNumberFilter.size; | |||||
size.rleft = mapTypeFilterSize.rleft; | |||||
size.rright = mapTypeFilterSize.rright: | |||||
this.playersNumberFilter.size = size; | |||||
*/ | |||||
} | |||||
} | |||||
filter(game) | |||||
{ | |||||
return this.mapTypeFilter.selected == 0 || | |||||
game.mapType == this.mapTypeFilter.list_data[this.mapTypeFilter.selected]; | |||||
} | |||||
}; |
Wildfire Games · Phabricator