29 void draw(
int scaledFontSize)
const override;
Widget displaying players and allowing selection.
std::optional< SelectionFinder::Selection > _pendingSelection
void setTeamColorFunc(std::function< Color(const std::string &)> func)
Sets the team color resolution function.
bool isOpen() const
Checks if panel is currently open.
void draw(int scaledFontSize) const override
Draws the panel and player list.
const WorldState * _world
bool handleInput() override
Processes mouse clicks on player rows.
static constexpr int ROW_HEIGHT
std::function< Color(const std::string &)> _colorFunc
~PlayerPanel() override=default
void setWorld(const WorldState *world)
Sets the world state pointer.
std::optional< SelectionFinder::Selection > getPendingSelection()
Gets and clears any pending selection made by the user.
static constexpr int PANEL_WIDTH
TooltipWidget _background
std::vector< ButtonWidget > _playerButtons
Represents the state of the world in the game, including the map size, tile contents,...