mirror of
https://github.com/redstrate/Novus.git
synced 2025-04-24 04:57:45 +00:00
Rename mdlviewer to Armoury Editor
This commit is contained in:
parent
085f26a719
commit
589598b34c
23 changed files with 19 additions and 33 deletions
|
@ -38,7 +38,7 @@ endif()
|
|||
|
||||
add_subdirectory(renderer)
|
||||
add_subdirectory(exdviewer)
|
||||
add_subdirectory(mdlviewer)
|
||||
add_subdirectory(armoury)
|
||||
add_subdirectory(argcracker)
|
||||
add_subdirectory(explorer)
|
||||
add_subdirectory(bonedecomp)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
find_package(assimp REQUIRED)
|
||||
set_target_properties(assimp::assimp PROPERTIES MAP_IMPORTED_CONFIG_DEBUG Release)
|
||||
|
||||
add_executable(mdlviewer
|
||||
add_executable(armoury
|
||||
src/main.cpp
|
||||
src/mainwindow.cpp
|
||||
src/vec3edit.cpp
|
||||
|
@ -14,12 +14,12 @@ add_executable(mdlviewer
|
|||
src/cmpeditor.cpp
|
||||
src/gearlistwidget.cpp
|
||||
src/gearlistmodel.cpp)
|
||||
target_include_directories(mdlviewer
|
||||
target_include_directories(armoury
|
||||
PUBLIC
|
||||
include
|
||||
PRIVATE
|
||||
${CMAKE_BINARY_DIR})
|
||||
target_link_libraries(mdlviewer PUBLIC
|
||||
target_link_libraries(armoury PUBLIC
|
||||
${LIBRARIES}
|
||||
Qt5::Core
|
||||
Qt5::Widgets
|
||||
|
@ -31,7 +31,7 @@ target_link_libraries(mdlviewer PUBLIC
|
|||
mdlpart
|
||||
NovusCommon)
|
||||
|
||||
install(TARGETS mdlviewer
|
||||
install(TARGETS armoury
|
||||
DESTINATION "${INSTALL_BIN_PATH}")
|
||||
|
||||
if(WIN32)
|
||||
|
@ -42,8 +42,8 @@ if(WIN32)
|
|||
find_program(WINDEPLOYQT_EXECUTABLE windeployqt HINTS "${QT_BIN_DIR}")
|
||||
|
||||
# Run windeployqt immediately after build
|
||||
add_custom_command(TARGET mdlviewer
|
||||
add_custom_command(TARGET armoury
|
||||
POST_BUILD
|
||||
COMMAND "${WINDEPLOYQT_ENV_SETUP}" && "${WINDEPLOYQT_EXECUTABLE}" \"$<TARGET_FILE:mdlviewer>\"
|
||||
COMMAND "${WINDEPLOYQT_ENV_SETUP}" && "${WINDEPLOYQT_EXECUTABLE}" \"$<TARGET_FILE:armoury>\"
|
||||
)
|
||||
endif()
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include <QWidget>
|
||||
#include <QMainWindow>
|
||||
#include <QGroupBox>
|
||||
|
||||
#include "gearview.h"
|
||||
|
@ -8,7 +8,7 @@
|
|||
struct GameData;
|
||||
class FileCache;
|
||||
|
||||
class FullModelViewer : public QWidget {
|
||||
class FullModelViewer : public QMainWindow {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit FullModelViewer(GameData* data, FileCache& cache);
|
|
@ -36,6 +36,7 @@ BoneEditor::BoneEditor(GearView* gearView, QWidget* parent) : gearView(gearView)
|
|||
setLayout(layout);
|
||||
|
||||
auto boneListWidget = new QTreeWidget();
|
||||
boneListWidget->setHeaderLabel("Name");
|
||||
|
||||
connect(gearView, &GearView::modelReloaded, this, [this, boneListWidget, gearView] {
|
||||
boneListWidget->clear();
|
|
@ -24,6 +24,8 @@ std::vector<RaceTree> raceTree = {
|
|||
{Race::Viera, {Subrace::Rava, Subrace::Veena}}};
|
||||
|
||||
CmpEditor::CmpEditor(GameData* data) : data(data) {
|
||||
setWindowTitle("CMP Editor");
|
||||
|
||||
auto layout = new QHBoxLayout();
|
||||
setLayout(layout);
|
||||
|
|
@ -14,13 +14,13 @@ FullModelViewer::FullModelViewer(GameData* data, FileCache& cache) : data(data)
|
|||
setMinimumWidth(1280);
|
||||
setMinimumHeight(720);
|
||||
|
||||
auto dummyWidget = new QWidget();
|
||||
setCentralWidget(dummyWidget);
|
||||
|
||||
auto layout = new QVBoxLayout();
|
||||
setLayout(layout);
|
||||
dummyWidget->setLayout(layout);
|
||||
|
||||
auto menuBar = new QMenuBar();
|
||||
layout->addWidget(menuBar);
|
||||
|
||||
auto fileMenu = menuBar->addMenu("File");
|
||||
auto fileMenu = menuBar()->addMenu("File");
|
||||
|
||||
auto datOpenAction = fileMenu->addAction("Load character DAT...");
|
||||
connect(datOpenAction, &QAction::triggered, [=] {
|
|
@ -23,26 +23,9 @@
|
|||
#include "filecache.h"
|
||||
|
||||
MainWindow::MainWindow(GameData* in_data) : data(*in_data), cache(FileCache{*in_data}) {
|
||||
setWindowTitle("mdlviewer");
|
||||
setWindowTitle("Armoury Editor");
|
||||
setMinimumSize(QSize(800, 600));
|
||||
|
||||
auto fileMenu = menuBar()->addMenu("File");
|
||||
|
||||
// TODO: move to a dedicated mdlview?
|
||||
/*auto openMDLFile = fileMenu->addAction("Open MDL...");
|
||||
connect(openMDLFile, &QAction::triggered, [=] {
|
||||
auto fileName = QFileDialog::getOpenFileName(nullptr,
|
||||
"Open MDL File",
|
||||
"~",
|
||||
"FFXIV Model File (*.mdl)");
|
||||
|
||||
auto buffer = physis_read_file(fileName.toStdString().c_str());
|
||||
|
||||
loadedGear.model = physis_mdl_parse(buffer.size, buffer.data);
|
||||
|
||||
reloadGearAppearance();
|
||||
});*/
|
||||
|
||||
auto toolsMenu = menuBar()->addMenu("Tools");
|
||||
|
||||
auto cmpEditorMenu = toolsMenu->addAction("CMP Editor");
|
||||
|
@ -61,7 +44,7 @@ MainWindow::MainWindow(GameData* in_data) : data(*in_data), cache(FileCache{*in_
|
|||
|
||||
helpMenu->addSeparator();
|
||||
|
||||
auto aboutNovusAction = helpMenu->addAction("About mdlviewer");
|
||||
auto aboutNovusAction = helpMenu->addAction("About Armoury Editor");
|
||||
aboutNovusAction->setIcon(QIcon::fromTheme("help-about"));
|
||||
connect(aboutNovusAction, &QAction::triggered, this, [this] {
|
||||
auto window = new AboutWindow(this);
|
Loading…
Add table
Reference in a new issue