aboutsummaryrefslogtreecommitdiff
path: root/src/UsersSidePanel.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-05-07 06:34:22 +0200
committerdec05eba <dec05eba@protonmail.com>2018-05-07 06:34:24 +0200
commit9ebc3e3f5cf4847239d04cf5b3b01d0b1855a039 (patch)
tree7a421d42e8945a1718b9c54f474acbb2d2478c28 /src/UsersSidePanel.cpp
parent7a2cb2c4b81a8a0696d3a11ce8781542f181bb12 (diff)
Continue text edit, add avatar (image, but not way to change avatar)
Diffstat (limited to 'src/UsersSidePanel.cpp')
-rw-r--r--src/UsersSidePanel.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/UsersSidePanel.cpp b/src/UsersSidePanel.cpp
index 9c04062..672dffa 100644
--- a/src/UsersSidePanel.cpp
+++ b/src/UsersSidePanel.cpp
@@ -23,14 +23,23 @@ namespace dchat
sf::RectangleShape rect(sf::Vector2f(getWidth(), windowSize.y - ChannelTopPanel::getHeight()));
rect.setFillColor(ColorScheme::getPanelColor());
rect.setPosition(windowSize.x - getWidth(), posY);
- window.draw(rect);
- posY += 10.0f;
+ //window.draw(rect);
Channel *currentChannel = Channel::getCurrent();
if(!currentChannel) return;
const sf::Font *font = ResourceCache::getFont("fonts/Roboto-Regular.ttf");
sf::Vector2f position(rect.getPosition().x + 10.0f, posY);
+
+ // TODO: Remove this shit
+ sf::String str = "Online - ";
+ str += to_string(currentChannel->getUsers().size());
+ sf::Text text(str, *font, FONT_SIZE * Settings::getScaling() * 1.25f);
+ text.setPosition(position);
+ text.setFillColor(ColorScheme::getTextRegularColor());
+ window.draw(text);
+ position.y += floor(font->getLineSpacing(text.getCharacterSize()));
+
for(User *user : currentChannel->getUsers())
{
// TODO: Remove this shit