Skip to content

Commit

Permalink
[HUD] Chat position updated on screen resize. Fixed #112.
Browse files Browse the repository at this point in the history
  • Loading branch information
Unarelith committed Jun 17, 2020
1 parent 589118e commit 0542b8d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 0 additions & 2 deletions source/client/hud/Chat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
#include "Config.hpp"

Chat::Chat(Client &client) {
setPosition(2, Config::screenHeight / Config::guiScale - 50);

client.setCommandCallback(Network::Command::ChatMessage, [this](sf::Packet &packet) {
u16 clientID;
std::string message;
Expand Down
2 changes: 2 additions & 0 deletions source/client/hud/HUD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ void HUD::setup() {
m_fpsText.setPosition(Config::screenWidth / getScale().x - 36, 2);

m_crosshair.setup();

m_chat.setPosition(2, Config::screenHeight / Config::guiScale - 50);
}

void HUD::onEvent(const sf::Event &event) {
Expand Down

0 comments on commit 0542b8d

Please sign in to comment.