diff options
author | David Athay <ko2fan@gmail.com> | 2024-06-25 23:05:31 +0000 |
---|---|---|
committer | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-06-25 23:05:31 +0000 |
commit | 452ebe4c4a0199fd07848a27f176723d3acf5704 (patch) | |
tree | 438fba5b1fa68b79b76cd7dc6a6b3036a22add13 /src/gui/socialwindow.h | |
parent | cd6a29b5e50e26d03436e18e52fd0bb7a7f60bb9 (diff) | |
download | mana-452ebe4c4a0199fd07848a27f176723d3acf5704.tar.gz mana-452ebe4c4a0199fd07848a27f176723d3acf5704.tar.bz2 mana-452ebe4c4a0199fd07848a27f176723d3acf5704.tar.xz mana-452ebe4c4a0199fd07848a27f176723d3acf5704.zip |
Added online player list to Social window
The online list refreshes every 18 seconds, which matches ManaVerse
behavior. It's not ideal, but to improve this would mean diving into
TMWA.
The client version was bumped to 8 to get a SMSG_ONLINE_LIST reply.
Further changes needed related to the client version are tracked by #71.
This also changes the TabbedArea to take into account the frame size for
its tab widgets, to make sure those frames are not clipped by the
TabbedArea widget (as happened in the Social window).
The horizontal scroll bar is now disabled in all social tabs, with the
vertical one appearing only when necessary.
Closes #61
Diffstat (limited to 'src/gui/socialwindow.h')
-rw-r--r-- | src/gui/socialwindow.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/socialwindow.h b/src/gui/socialwindow.h index 8575f3b2..b6865fb2 100644 --- a/src/gui/socialwindow.h +++ b/src/gui/socialwindow.h @@ -28,12 +28,15 @@ #include <string> #include <map> +#include <vector> +class Avatar; class Button; class ConfirmDialog; class CreatePopup; class Guild; class Party; +class PlayerListTab; class SocialTab; class Tab; class TabbedArea; @@ -74,12 +77,17 @@ public: void showPartyCreate(); + void setPlayersOnline(const std::vector<Avatar*> &players); + + void logic() override; + protected: friend class SocialTab; void updateButtons(); int mGuildInvited = 0; + int mLastOnlineListUpdate = 0; ConfirmDialog *mGuildAcceptDialog = nullptr; TextDialog *mGuildCreateDialog = nullptr; @@ -92,6 +100,8 @@ protected: CreatePopup *mCreatePopup; + PlayerListTab *mPlayerListTab; + Button *mCreateButton; Button *mInviteButton; Button *mLeaveButton; |