13 background.create(engine);
14 background.getOverlayScaler().setFixedScissor(
22 for (
auto& ppl : peoplemon) { ppl.removeFromScene(); }
33 for (
const auto& ppl : box) {
34 auto& rp = peoplemon.emplace_back();
36 engine.renderer().texturePool().getOrLoadTexture(
39 rp.getTransform().setPosition(glm::vec2(ppl.position.x, ppl.position.y) *
41 rp.setParent(background);
42 rp.addToScene(engine.renderer().getObserver().getCurrentOverlay(),
43 bl::rc::UpdateSpeed::Static);
Parent namespace for all functionality unique to the game.
static std::string thumbnailImage(Id id)
Returns the path of the image to render as the peoplemon thumbnail.
static float TileSize()
Returns the size of a square on the grid.
void notifyOffset(float offset)
Applies the given offset to the grid position. Used for sliding in and out.
void deactivate()
Removes the content from the scene and releases entities.
void activate(bl::ecs::Entity background)
Sets the parent of the grid rectangle to the background.
void update(const std::vector< core::pplmn::StoredPeoplemon > &box)
Updates the set of peoplemon to render.
static constexpr glm::vec2 BoxPosition
static constexpr glm::vec2 BoxSize
StorageGrid(bl::engine::Engine &engine)
Initializes the grid to be empty.