mirror of
https://github.com/UltimMC/Launcher.git
synced 2025-10-04 09:08:42 +00:00
Added instance context menu and status tips.
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
|
||||
#include <QMenu>
|
||||
|
||||
#include <QDesktopServices>
|
||||
#include <QUrl>
|
||||
|
||||
@@ -104,3 +106,13 @@ void MainWindow::closeEvent(QCloseEvent *event)
|
||||
settings->getConfig().setValue("MainWindowState", saveState());
|
||||
QMainWindow::closeEvent(event);
|
||||
}
|
||||
|
||||
void MainWindow::on_instanceView_customContextMenuRequested(const QPoint &pos)
|
||||
{
|
||||
QMenu *instContextMenu = new QMenu("Instance", this);
|
||||
|
||||
// Add the actions from the toolbar to the context menu.
|
||||
instContextMenu->addActions(ui->instanceToolBar->actions());
|
||||
|
||||
instContextMenu->exec(ui->instanceView->mapToGlobal(pos));
|
||||
}
|
||||
|
Reference in New Issue
Block a user