diff options
author | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-04-09 18:20:34 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-04-09 18:20:34 +0200 |
commit | 4e227366facd1c05abf51d552372e4721a31ff46 (patch) | |
tree | 6cf42d87063ecd8b442362a3beff13df2de111fa | |
parent | 51020c05584c26c9a824df33115c72dcf51bcd74 (diff) | |
download | mana-4e227366facd1c05abf51d552372e4721a31ff46.tar.gz mana-4e227366facd1c05abf51d552372e4721a31ff46.tar.bz2 mana-4e227366facd1c05abf51d552372e4721a31ff46.tar.xz mana-4e227366facd1c05abf51d552372e4721a31ff46.zip |
Online list: Added Refresh button and bumped client version to 8
Bumping client version to 8 is needed to get a SMSG_ONLINE_LIST
reply at all, though it needs to be investigated what other changes
are needed.
-rw-r--r-- | src/gui/socialwindow.cpp | 6 | ||||
-rw-r--r-- | src/gui/socialwindow.h | 1 | ||||
-rw-r--r-- | src/net/tmwa/loginhandler.cpp | 2 |
3 files changed, 8 insertions, 1 deletions
diff --git a/src/gui/socialwindow.cpp b/src/gui/socialwindow.cpp index a81117a6..953d347a 100644 --- a/src/gui/socialwindow.cpp +++ b/src/gui/socialwindow.cpp @@ -357,11 +357,13 @@ SocialWindow::SocialWindow() : mCreateButton = new Button(_("Create"), "create", this); mInviteButton = new Button(_("Invite"), "invite", this); mLeaveButton = new Button(_("Leave"), "leave", this); + mRefreshButton = new Button(_("Refresh"), "refresh", this); mTabs = new TabbedArea; place(0, 0, mCreateButton); place(1, 0, mInviteButton); place(2, 0, mLeaveButton); + place(3, 0, mRefreshButton); place(0, 1, mTabs, 4, 4); widgetResized(nullptr); @@ -518,6 +520,10 @@ void SocialWindow::action(const gcn::ActionEvent &event) { static_cast<SocialTab*>(mTabs->getSelectedTab())->leave(); } + else if (event.getId() == "refresh") + { + Net::getPlayerListHandler()->refreshList(); + } else if (event.getId() == "create guild") { std::string name = mGuildCreateDialog->getText(); diff --git a/src/gui/socialwindow.h b/src/gui/socialwindow.h index 29c21f98..9db8f020 100644 --- a/src/gui/socialwindow.h +++ b/src/gui/socialwindow.h @@ -98,6 +98,7 @@ protected: Button *mCreateButton; Button *mInviteButton; Button *mLeaveButton; + Button *mRefreshButton; TabbedArea *mTabs; }; diff --git a/src/net/tmwa/loginhandler.cpp b/src/net/tmwa/loginhandler.cpp index 8ee5e102..24bc9ab2 100644 --- a/src/net/tmwa/loginhandler.cpp +++ b/src/net/tmwa/loginhandler.cpp @@ -321,7 +321,7 @@ void LoginHandler::sendLoginRegister(const std::string &username, const std::string &password) { MessageOut outMsg(CMSG_LOGIN_REGISTER); - outMsg.writeInt32(6); // client version + outMsg.writeInt32(8); // client version outMsg.writeString(username, 24); outMsg.writeString(password, 24); |