mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
game menu
This commit is contained in:
parent
77015c9ebf
commit
122f8ea916
15 changed files with 75 additions and 35 deletions
|
|
@ -11,6 +11,7 @@ TabSupervisor:: TabSupervisor(QWidget *parent)
|
|||
: QTabWidget(parent), client(0), tabServer(0), tabDeckStorage(0)
|
||||
{
|
||||
setIconSize(QSize(15, 15));
|
||||
connect(this, SIGNAL(currentChanged(int)), this, SLOT(updateMenu(int)));
|
||||
}
|
||||
|
||||
void TabSupervisor::retranslateUi()
|
||||
|
|
@ -131,3 +132,11 @@ void TabSupervisor::processGameEvent(GameEvent *event)
|
|||
} else
|
||||
qDebug() << "gameEvent: invalid gameId";
|
||||
}
|
||||
|
||||
void TabSupervisor::updateMenu(int index)
|
||||
{
|
||||
if (index != -1)
|
||||
emit setMenu(static_cast<Tab *>(widget(index))->getTabMenu());
|
||||
else
|
||||
emit setMenu(0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue