1
Fork 0
mirror of https://github.com/redstrate/Novus.git synced 2025-04-25 05:17:44 +00:00
novus/mateditor/include/materialpropertyedit.h
Joshua Goins 80e3cbde18 Expand the property editor to list known keys and values
There's no "selection" of possible material properties yet, but shows
keys/values set for the material and falls back to the shader defaults
when needed.
2024-04-26 23:11:40 -04:00

34 lines
736 B
C++

// SPDX-FileCopyrightText: 2024 Joshua Goins <josh@redstrate.com>
// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
#include <QHBoxLayout>
#include <QLabel>
#include <QLineEdit>
#include <QWidget>
#include <physis.hpp>
class MaterialPropertyEdit : public QWidget
{
Q_OBJECT
public:
explicit MaterialPropertyEdit(GameData *data, QWidget *parent = nullptr);
void setMaterial(physis_Material material);
private:
void rebuild();
QVBoxLayout *m_itemsLayout = nullptr;
QLineEdit *m_shaderPackageName = nullptr;
QFrame *m_propertiesFrame = nullptr;
QVBoxLayout *m_propertiesLayout = nullptr;
physis_Material m_material = {};
physis_SHPK m_shpk = {};
GameData *m_data = nullptr;
};