100 void setRooms(
const std::vector<rnp::LobbyInfo> &rooms);
This file contains the network protocol.
Abstract class for scene.
Scene for browsing and joining available multiplayer lobbies.
std::vector< ecs::Entity > m_roomEntities
Entities for lobby list items.
std::vector< rnp::LobbyInfo > m_rooms
List of available lobbies from server.
ecs::Entity m_noRoomsEntity
Entity displaying "No rooms available" message.
void handleLobbyListResponse(const utl::Event &event)
Handle lobby list response from server.
JoinRoomScene(JoinRoomScene &&other)=delete
Deleted move constructor (non-movable)
float m_animationTime
Animation timer for visual effects.
void clearRoomEntities()
Clear all lobby display entities.
~JoinRoomScene() override=default
Destructor.
std::function< void(int roomId, const rnp::LobbyInfo *lobbyInfo)> onJoin
Callback invoked when player joins a lobby.
void event(const eng::Event &event) override
Handle input events.
void setRooms(const std::vector< rnp::LobbyInfo > &rooms)
Update the displayed list of available lobbies.
JoinRoomScene(const JoinRoomScene &other)=delete
Deleted copy constructor (non-copyable)
void update(float dt, const eng::WindowSize &size) override
Update the join room scene (called each frame)
bool & playMusic()
Get reference to music playback flag.
size_t m_selectedIndex
Currently selected lobby index.
void refreshRoomList() const
Request updated lobby list from server.
std::function< void()> onBackToMulti
Callback invoked when returning to multiplayer menu.
JoinRoomScene & operator=(const JoinRoomScene &other)=delete
Deleted copy assignment operator (non-copyable)
JoinRoomScene(eng::id assignedId, const std::shared_ptr< eng::IRenderer > &renderer)
Constructor.
std::function< void()> onRefreshRequest
Callback invoked when refresh is requested.
void setupEventSubscriptions() const
Subscribe to event bus events.
void processEventBus()
Process events from event bus.
void updateRoomDisplay()
Update the visual display of the lobby list.
bool m_playMusic
Music playback state flag.
JoinRoomScene & operator=(JoinRoomScene &&other)=delete
Deleted move assignment operator (non-movable)
void handleLobbyJoinResponse(const utl::Event &event) const
Handle lobby join response from server.
Event structure for inter-component communication.
This file contains the IScene class.
Lobby information structure.