| 166 | } |
| 167 | |
| 168 | void wxGameList::LoadConfig() |
| 169 | { |
| 170 | const auto& config = GetConfig(); |
| 171 | SetStyle((Style)config.game_list_style, false); |
| 172 | |
| 173 | if (!config.game_list_column_order.empty()) |
| 174 | { |
| 175 | wxArrayInt order; |
| 176 | order.reserve(ColumnCounts); |
| 177 | |
| 178 | const auto order_string = std::string_view(config.game_list_column_order).substr(1); |
| 179 | |
| 180 | const boost::char_separator<char> sep(","); |
| 181 | boost::tokenizer tokens(order_string.begin(), order_string.end(), sep); |
| 182 | for(const auto& token : tokens) |
| 183 | { |
| 184 | order.push_back(ConvertString<int>(token, 10)); |
| 185 | } |
| 186 | |
| 187 | #ifdef wxHAS_LISTCTRL_COLUMN_ORDER |
| 188 | if(order.GetCount() == ColumnCounts) |
| 189 | SetColumnsOrder(order); |
| 190 | #endif |
| 191 | } |
| 192 | } |
| 193 | |
| 194 | void wxGameList::OnGameListSize(wxSizeEvent &event) |
| 195 | { |