17 getSignal(Selected).willAlwaysCall(std::bind(&MoveInfoRow::makeActive,
this));
18 getSignal(Deselected).willAlwaysCall(std::bind(&MoveInfoRow::makeInactive,
this));
24 const auto& joinPath = bl::util::FileUtil::joinPath;
27 bgndTxtr = engine.renderer().texturePool().getOrLoadTexture(joinPath(ImgPath,
"move.png"));
29 engine.renderer().texturePool().getOrLoadTexture(joinPath(ImgPath,
"moveActive.png"));
30 background.create(engine, bgndTxtr);
36 bl::sfcol(sf::Color(30, 50, 65)));
37 name.getTransform().setPosition(
getSize() * 0.5f);
38 name.getTransform().setOrigin(name.getLocalBounds().width * 0.5f,
39 name.getLocalBounds().height * 0.5f);
40 name.setParent(background);
44 background.addToScene(overlay, bl::rc::UpdateSpeed::Static);
45 name.addToScene(overlay, bl::rc::UpdateSpeed::Static);
52 void MoveInfoRow::makeActive() { background.setTexture(activeBgndTxtr); }
54 void MoveInfoRow::makeInactive() { background.setTexture(bgndTxtr); }
Parent namespace for all functionality unique to the game.
static const std::string & name(MoveId move)
Returns the name of the given move.
static const sf::VulkanFont & MenuFont()
static const std::string & MenuImagePath()
Menu row item for moves on the peoplemon info screen.
virtual void doSceneRemove() override
Called when the item should be removed from the overlay.
virtual void doSceneAdd(bl::rc::Scene *overlay) override
Called when the item should be added to the overlay.
virtual glm::vec2 getSize() const override
Returns the size of the menu item.
static bl::menu::Item::Ptr create(core::pplmn::MoveId move)
Create a new move row.
virtual void draw(bl::rc::scene::CodeScene::RenderContext &ctx) override
Renders the item.
virtual bl::ecs::Entity getEntity() const override
Returns the entity (or top level entity) of the item.
virtual void doCreate(bl::engine::Engine &engine) override
Called at least once when the item is added to a menu. Should create required graphics primitives and...