update
This commit is contained in:
@@ -4,11 +4,14 @@
|
||||
#include "props/PropertySectionWidget.h"
|
||||
|
||||
#include <QPointF>
|
||||
#include <QImage>
|
||||
#include <QString>
|
||||
#include <QtGlobal>
|
||||
|
||||
class QLabel;
|
||||
class QLineEdit;
|
||||
class QDoubleSpinBox;
|
||||
class QSpinBox;
|
||||
class QCheckBox;
|
||||
class QTextEdit;
|
||||
class QListWidget;
|
||||
@@ -18,7 +21,7 @@ class QTimer;
|
||||
class QWidget;
|
||||
|
||||
namespace gui {
|
||||
class Vec2ParamControl;
|
||||
class Vec2DoubleParamControl;
|
||||
}
|
||||
|
||||
namespace gui {
|
||||
@@ -27,12 +30,16 @@ struct EntityPropertyUiState {
|
||||
QString displayName;
|
||||
int depthZ = 0;
|
||||
QString distanceScaleText;
|
||||
QPointF pivot;
|
||||
QPointF centroid;
|
||||
/// 中心:无父级时为形心世界坐标(与画布十字一致,用于距离/位置缩放);有父级时为形心相对父级形心的偏移。
|
||||
QPointF centerPosition;
|
||||
/// 相对位置:变换原点相对自身形心(世界坐标差)。
|
||||
QPointF relativeToOwnCenter;
|
||||
bool hasParent = false;
|
||||
int priority = 1;
|
||||
double userScale = 1.0;
|
||||
bool ignoreDistanceScale = false;
|
||||
bool visible = true;
|
||||
bool parentRelativeMode = false;
|
||||
QImage spritePreview;
|
||||
core::EntityIntroContent intro;
|
||||
};
|
||||
|
||||
@@ -50,8 +57,11 @@ public:
|
||||
|
||||
signals:
|
||||
void displayNameCommitted(const QString& text);
|
||||
void pivotEdited(double x, double y);
|
||||
void centroidEdited(double x, double y);
|
||||
/// 编辑中心:无父为形心世界坐标;有父为形心相对父形心的偏移(整体平移实体)
|
||||
void centerPositionEdited(double x, double y);
|
||||
/// 编辑相对自身形心的原点偏移(改枢轴、外形世界位置不变)
|
||||
void relativeToOwnCenterEdited(double x, double y);
|
||||
void priorityEdited(int value);
|
||||
void userScaleEdited(double value);
|
||||
void ignoreDistanceScaleToggled(bool on);
|
||||
// 可见性(动画通道):在当前帧写关键帧
|
||||
@@ -59,6 +69,7 @@ signals:
|
||||
/// 介绍字段变更后防抖触发,由主窗口写入工程
|
||||
void introContentEdited();
|
||||
void introAddImageRequested();
|
||||
void spriteEditRequested();
|
||||
|
||||
private:
|
||||
void scheduleIntroPersist();
|
||||
@@ -67,13 +78,18 @@ private:
|
||||
QLineEdit* m_name = nullptr;
|
||||
QLabel* m_depth = nullptr;
|
||||
QLabel* m_distScale = nullptr;
|
||||
QLabel* m_pivotLabel = nullptr;
|
||||
QLabel* m_centroidLabel = nullptr;
|
||||
Vec2ParamControl* m_pivot = nullptr;
|
||||
Vec2ParamControl* m_centroid = nullptr;
|
||||
QLabel* m_centerLabel = nullptr;
|
||||
QLabel* m_relativeLabel = nullptr;
|
||||
QSpinBox* m_priority = nullptr;
|
||||
Vec2DoubleParamControl* m_centerPosition = nullptr;
|
||||
Vec2DoubleParamControl* m_relativeToOwnCenter = nullptr;
|
||||
QDoubleSpinBox* m_userScale = nullptr;
|
||||
QCheckBox* m_ignoreDistanceScale = nullptr;
|
||||
QCheckBox* m_visible = nullptr;
|
||||
QLabel* m_spritePreview = nullptr;
|
||||
QPushButton* m_btnEditSprite = nullptr;
|
||||
quint64 m_spritePreviewCacheKey = 0;
|
||||
QSize m_spritePreviewLastTargetSize;
|
||||
|
||||
QLineEdit* m_introTitle = nullptr;
|
||||
QTextEdit* m_introBody = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user