1
Fork 0
mirror of https://github.com/redstrate/Novus.git synced 2025-04-23 20:47:45 +00:00

sagasu: Add support for the new SHPKPart for viewing shader packages

This commit is contained in:
Joshua Goins 2023-10-13 15:01:08 -04:00
parent 795bb30935
commit f8d7d04e78
2 changed files with 6 additions and 1 deletions

View file

@ -22,6 +22,6 @@ target_sources(novus-sagasu PRIVATE
src/filepropertieswindow.cpp src/filepropertieswindow.cpp
src/filetreemodel.cpp) src/filetreemodel.cpp)
target_include_directories(novus-sagasu PRIVATE include) target_include_directories(novus-sagasu PRIVATE include)
target_link_libraries(novus-sagasu PRIVATE Qt6::Concurrent hexpart exlpart mdlpart exdpart texpart novus-sagasu-static) target_link_libraries(novus-sagasu PRIVATE Qt6::Concurrent shpkpart hexpart exlpart mdlpart exdpart texpart novus-sagasu-static)
install(TARGETS novus-sagasu ${KF${QT_MAJOR_VERSION}_INSTALL_TARGETS_DEFAULT_ARGS}) install(TARGETS novus-sagasu ${KF${QT_MAJOR_VERSION}_INSTALL_TARGETS_DEFAULT_ARGS})

View file

@ -16,6 +16,7 @@
#include "filetreewindow.h" #include "filetreewindow.h"
#include "hexpart.h" #include "hexpart.h"
#include "mdlpart.h" #include "mdlpart.h"
#include "shpkpart.h"
#include "texpart.h" #include "texpart.h"
MainWindow::MainWindow(QString gamePath, GameData *data) MainWindow::MainWindow(QString gamePath, GameData *data)
@ -92,6 +93,10 @@ void MainWindow::refreshParts(QString path)
auto texWidget = new TexPart(data); auto texWidget = new TexPart(data);
texWidget->load(file); texWidget->load(file);
partHolder->addTab(texWidget, QStringLiteral("Texture")); partHolder->addTab(texWidget, QStringLiteral("Texture"));
} else if (info.completeSuffix() == QStringLiteral("shpk")) {
auto shpkWidget = new SHPKPart(data);
shpkWidget->load(file);
partHolder->addTab(shpkWidget, QStringLiteral("Shader Package"));
} }
auto hexWidget = new HexPart(); auto hexWidget = new HexPart();