mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-05 00:49:09 +02:00
UI improvements for lobby:
- Added notifications sounds for invites and chat messages - Added notifications for unread chat messages in inactive channels - Added click sound when switching between channels - Added workaround to prevent clicks due to list recreation - Partial support for receiving invites
This commit is contained in:
@ -66,6 +66,7 @@ size_t CTabbedInt::getActive() const
|
||||
|
||||
void CTabbedInt::reset()
|
||||
{
|
||||
|
||||
deleteItem(activeTab);
|
||||
activeTab = createItem(activeID);
|
||||
activeTab->moveTo(pos.topLeft());
|
||||
@ -127,6 +128,11 @@ void CListBox::updatePositions()
|
||||
|
||||
void CListBox::reset()
|
||||
{
|
||||
// hack to ensure that all items will be recreated with new address
|
||||
// save current item list so all shared_ptr's will be destroyed only on scope exit and not inside loop below
|
||||
// see comment in EventDispatcher::handleLeftButtonClick for details on why this hack is needed
|
||||
auto itemsCopy = items;
|
||||
|
||||
size_t current = first;
|
||||
for (auto & elem : items)
|
||||
{
|
||||
@ -279,4 +285,4 @@ void CListBoxWithCallback::moveToPrev()
|
||||
CListBox::moveToPrev();
|
||||
if(movedPosCallback)
|
||||
movedPosCallback(getPos());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user