diff options
author | dec05eba <dec05eba@protonmail.com> | 2018-05-09 03:30:41 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2018-05-09 03:30:44 +0200 |
commit | cd686f3f6099457a3115e758bf3da7e148ba432d (patch) | |
tree | 0f8212ef3d705bfc223990425389f8ad6a4ad733 /src/ContextMenu.cpp | |
parent | 161b5dbbf43d505b727e0ed3cae15458a72147f9 (diff) |
Add avatar to users side panel
Diffstat (limited to 'src/ContextMenu.cpp')
-rw-r--r-- | src/ContextMenu.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ContextMenu.cpp b/src/ContextMenu.cpp index 317d34a..da4b8dd 100644 --- a/src/ContextMenu.cpp +++ b/src/ContextMenu.cpp @@ -51,7 +51,7 @@ namespace dchat void ContextMenu::processEvent(const sf::Event &event) { - if(!visible) return; + if(!visible || menuItems.empty()) return; if(event.type == sf::Event::MouseButtonPressed) { @@ -83,7 +83,7 @@ namespace dchat void ContextMenu::draw(sf::RenderWindow &window) { - if(!visible) return; + if(!visible || menuItems.empty()) return; const sf::Font *menuItemFont = ResourceCache::getFont(MENU_FONT_PATH); float boxHeight = menuItemFont->getLineSpacing(MENU_ITEM_FONT_SIZE) * 1.5f; |