1
0
mirror of synced 2025-02-02 12:27:20 +01:00

Add useful comments

This commit is contained in:
Stepland 2020-03-07 01:05:36 +01:00
parent 9ce7b8014f
commit dfdd2390e8

View File

@ -10,12 +10,16 @@
namespace MusicSelect {
class Panel;
// PanelLayout restricts the ways you can create a scrollable grid of panels
// PanelLayout restricts the ways you can create a scrollable grid of panels usable in a Ribbon
class PanelLayout : public std::vector<std::array<std::shared_ptr<Panel>,3>> {
public:
// Takes of map of category name and associated Panels, useful for all the sorted layouts
explicit PanelLayout(const std::map<std::string,std::vector<std::shared_ptr<Panel>>>& categories, SharedResources& resources);
// Arranges all the panels in the vector in columns of three
explicit PanelLayout(const std::vector<std::shared_ptr<Panel>>& panels, SharedResources& resources);
// Stepmania-like empty layout with big red panels that say EMPTY
static PanelLayout red_empty_layout(SharedResources& resources);
// Standard title sort with categories for each letter
static PanelLayout title_sort(const Data::SongList& song_list, SharedResources& resources);
private:
void fill_layout(SharedResources& resources);