MCPcopy Create free account
hub / github.com/Aloshi/EmulationStation / makeCells

Method makeCells

src/components/ComponentListComponent.cpp:13–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11}
12
13void ComponentListComponent::makeCells(Eigen::Vector2i size)
14{
15 if(mGrid)
16 delete[] mGrid;
17 if(mColumnWidths)
18 delete[] mColumnWidths;
19 if(mRowHeights)
20 delete[] mRowHeights;
21
22 mGridSize = size;
23 mGrid = new ComponentEntry*[size.x() * size.y()];
24 std::fill(mGrid, mGrid + (size.x() * size.y()), (ComponentEntry*)NULL);
25
26 mColumnWidths = new unsigned int[size.x()];
27 std::fill(mColumnWidths, mColumnWidths + size.x(), INITIAL_CELL_SIZE);
28
29 mRowHeights = new unsigned int[size.y()];
30 std::fill(mRowHeights, mRowHeights + size.y(), INITIAL_CELL_SIZE);
31
32 updateSize();
33 resetCursor();
34}
35
36void ComponentListComponent::setEntry(Eigen::Vector2i pos, Eigen::Vector2i size, GuiComponent* component, bool canFocus, AlignmentType align,
37 Eigen::Matrix<bool, 1, 2> autoFit, UpdateBehavior updateType)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected