From 9ebc3e3f5cf4847239d04cf5b3b01d0b1855a039 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 7 May 2018 06:34:22 +0200 Subject: Continue text edit, add avatar (image, but not way to change avatar) --- src/UsersSidePanel.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/UsersSidePanel.cpp') 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 -- cgit v1.2.3