mirror of
https://github.com/isledecomp/SIEdit.git
synced 2024-11-27 01:25:45 -05:00
app: add editing for "up" field
This commit is contained in:
parent
5a84afe4b5
commit
8b09d5dba2
2 changed files with 18 additions and 0 deletions
|
@ -74,6 +74,14 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||||
|
|
||||||
prow++;
|
prow++;
|
||||||
|
|
||||||
|
properties_layout->addWidget(new QLabel(tr("Up")), prow, 0);
|
||||||
|
|
||||||
|
m_UpEdit = new Vector3Edit();
|
||||||
|
connect(m_UpEdit, &Vector3Edit::changed, this, &MainWindow::UpChanged);
|
||||||
|
properties_layout->addWidget(m_UpEdit, prow, 1);
|
||||||
|
|
||||||
|
prow++;
|
||||||
|
|
||||||
properties_layout->addWidget(new QLabel(tr("Start Time")), prow, 0);
|
properties_layout->addWidget(new QLabel(tr("Start Time")), prow, 0);
|
||||||
|
|
||||||
start_time_edit_ = new QSpinBox();
|
start_time_edit_ = new QSpinBox();
|
||||||
|
@ -142,6 +150,7 @@ void MainWindow::SetPanel(Panel *panel, si::Object *chunk)
|
||||||
|
|
||||||
if (chunk) {
|
if (chunk) {
|
||||||
m_LocationEdit->SetValue(chunk->location_);
|
m_LocationEdit->SetValue(chunk->location_);
|
||||||
|
m_UpEdit->SetValue(chunk->up_);
|
||||||
start_time_edit_->setValue(chunk->time_offset_);
|
start_time_edit_->setValue(chunk->time_offset_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -332,6 +341,13 @@ void MainWindow::LocationChanged(const Vector3 &v)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::UpChanged(const si::Vector3 &v)
|
||||||
|
{
|
||||||
|
if (last_set_data_) {
|
||||||
|
last_set_data_->up_ = v;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::StartTimeChanged(int t)
|
void MainWindow::StartTimeChanged(int t)
|
||||||
{
|
{
|
||||||
if (last_set_data_) {
|
if (last_set_data_) {
|
||||||
|
|
|
@ -56,6 +56,7 @@ private:
|
||||||
QGroupBox *properties_group_;
|
QGroupBox *properties_group_;
|
||||||
|
|
||||||
Vector3Edit *m_LocationEdit;
|
Vector3Edit *m_LocationEdit;
|
||||||
|
Vector3Edit *m_UpEdit;
|
||||||
|
|
||||||
QSpinBox *start_time_edit_;
|
QSpinBox *start_time_edit_;
|
||||||
|
|
||||||
|
@ -77,6 +78,7 @@ private slots:
|
||||||
void ViewSIFile();
|
void ViewSIFile();
|
||||||
|
|
||||||
void LocationChanged(const si::Vector3 &v);
|
void LocationChanged(const si::Vector3 &v);
|
||||||
|
void UpChanged(const si::Vector3 &v);
|
||||||
void StartTimeChanged(int t);
|
void StartTimeChanged(int t);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue