diff options
author | dec05eba <dec05eba@protonmail.com> | 2019-03-30 19:09:23 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2019-03-30 19:11:49 +0100 |
commit | 4aac8df198e3a5bd9c6efc95cdf4c520c2e05401 (patch) | |
tree | b16b1ca234d957ac94a05a8bd33718e1d7a91bfc /src/ChannelSidePanel.cpp | |
parent | ade9cb1f847e1c0edc22a08ad2950454fe2b566b (diff) |
Move users to left side
Diffstat (limited to 'src/ChannelSidePanel.cpp')
-rw-r--r-- | src/ChannelSidePanel.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/ChannelSidePanel.cpp b/src/ChannelSidePanel.cpp index 524e504..49407cc 100644 --- a/src/ChannelSidePanel.cpp +++ b/src/ChannelSidePanel.cpp @@ -13,7 +13,8 @@ using namespace std; namespace dchat { - vector<Channel*> channels; + static vector<Channel*> channels; + static sf::Vector2f position; const float WIDTH = 300.0f; const unsigned int FONT_SIZE = 20; const float PADDING_BOTTOM = 10.0f; @@ -45,7 +46,7 @@ namespace dchat auto mousePos = sf::Mouse::getPosition(window); - sf::Vector2f position(10.0f, posY); + position.y = posY; for(Channel *channel : channels) { sf::FloatRect box(0.0f, position.y, getWidth(), channelBoxHeight); @@ -84,4 +85,9 @@ namespace dchat { return floor(WIDTH * Settings::getScaling()); } + + float ChannelSidePanel::getHeight() + { + return position.y; + } } |