Add material editor to tools menu
This commit is contained in:
parent
bcd5609b9b
commit
b78b66f2ee
3 changed files with 18 additions and 1 deletions
|
@ -127,6 +127,7 @@ add_data(Graph
|
|||
data/player.obj
|
||||
data/sphere.obj
|
||||
data/matpreview.world
|
||||
data/basic.material)
|
||||
data/basic.material
|
||||
data/maticon.png)
|
||||
|
||||
add_subdirectory(tools)
|
||||
|
|
BIN
data/maticon.png
Normal file
BIN
data/maticon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.7 KiB |
|
@ -5,6 +5,7 @@
|
|||
#include <QMenu>
|
||||
#include <QAction>
|
||||
#include <QVulkanWindow>
|
||||
#include <QProcess>
|
||||
#include <ToolWindowManager.h>
|
||||
|
||||
#include "renderwindow.h"
|
||||
|
@ -79,6 +80,21 @@ MainWindow::MainWindow(Context& context) : context(context) {
|
|||
editMenu->addAction(userPreferenes);
|
||||
}
|
||||
|
||||
QMenu* toolsMenu = new QMenu("Tools");
|
||||
mainMenuBar->addMenu(toolsMenu);
|
||||
|
||||
// tools
|
||||
{
|
||||
QAction* materialEditorAction = new QAction("Material Editor");
|
||||
connect(materialEditorAction, &QAction::triggered, [] {
|
||||
QProcess *process = new QProcess();
|
||||
QString file = "tools/materialeditor/MaterialEditor";
|
||||
process->start(file);
|
||||
});
|
||||
materialEditorAction->setIcon(QIcon("data/maticon.png"));
|
||||
toolsMenu->addAction(materialEditorAction);
|
||||
}
|
||||
|
||||
QMenu* windowMenu = new QMenu("Window");
|
||||
mainMenuBar->addMenu(windowMenu);
|
||||
|
||||
|
|
Reference in a new issue