mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-11-03 04:39:59 +00:00
citra-qt/VertexShader: Minor UI improvements.
Renamed "Iteration index" to the (hopefully) more intuitive "Cycle Index". Added flexible space at the bottom of the widget.
This commit is contained in:
parent
493c432d1e
commit
32592364b8
2 changed files with 11 additions and 10 deletions
|
@ -308,14 +308,14 @@ GraphicsVertexShaderWidget::GraphicsVertexShaderWidget(std::shared_ptr< Pica::De
|
||||||
|
|
||||||
instruction_description = new QLabel;
|
instruction_description = new QLabel;
|
||||||
|
|
||||||
iteration_index = new QSpinBox;
|
cycle_index = new QSpinBox;
|
||||||
|
|
||||||
connect(this, SIGNAL(SelectCommand(const QModelIndex&, QItemSelectionModel::SelectionFlags)),
|
connect(this, SIGNAL(SelectCommand(const QModelIndex&, QItemSelectionModel::SelectionFlags)),
|
||||||
binary_list->selectionModel(), SLOT(select(const QModelIndex&, QItemSelectionModel::SelectionFlags)));
|
binary_list->selectionModel(), SLOT(select(const QModelIndex&, QItemSelectionModel::SelectionFlags)));
|
||||||
|
|
||||||
connect(dump_shader, SIGNAL(clicked()), this, SLOT(DumpShader()));
|
connect(dump_shader, SIGNAL(clicked()), this, SLOT(DumpShader()));
|
||||||
|
|
||||||
connect(iteration_index, SIGNAL(valueChanged(int)), this, SLOT(OnIterationIndexChanged(int)));
|
connect(cycle_index, SIGNAL(valueChanged(int)), this, SLOT(OnCycleIndexChanged(int)));
|
||||||
|
|
||||||
for (unsigned i = 0; i < ARRAY_SIZE(input_data); ++i) {
|
for (unsigned i = 0; i < ARRAY_SIZE(input_data); ++i) {
|
||||||
connect(input_data[i], SIGNAL(textEdited(const QString&)), input_data_mapper, SLOT(map()));
|
connect(input_data[i], SIGNAL(textEdited(const QString&)), input_data_mapper, SLOT(map()));
|
||||||
|
@ -364,11 +364,12 @@ GraphicsVertexShaderWidget::GraphicsVertexShaderWidget(std::shared_ptr< Pica::De
|
||||||
main_layout->addWidget(dump_shader);
|
main_layout->addWidget(dump_shader);
|
||||||
{
|
{
|
||||||
auto sub_layout = new QHBoxLayout;
|
auto sub_layout = new QHBoxLayout;
|
||||||
sub_layout->addWidget(new QLabel(tr("Iteration Index:")));
|
sub_layout->addWidget(new QLabel(tr("Cycle Index:")));
|
||||||
sub_layout->addWidget(iteration_index);
|
sub_layout->addWidget(cycle_index);
|
||||||
main_layout->addLayout(sub_layout);
|
main_layout->addLayout(sub_layout);
|
||||||
}
|
}
|
||||||
main_layout->addWidget(instruction_description);
|
main_layout->addWidget(instruction_description);
|
||||||
|
main_layout->addStretch();
|
||||||
main_widget->setLayout(main_layout);
|
main_widget->setLayout(main_layout);
|
||||||
setWidget(main_widget);
|
setWidget(main_widget);
|
||||||
|
|
||||||
|
@ -437,9 +438,9 @@ void GraphicsVertexShaderWidget::Reload(bool replace_vertex_data, void* vertex_d
|
||||||
input_data_container[source_attr]->setVisible(true);
|
input_data_container[source_attr]->setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize debug info text for current iteration count
|
// Initialize debug info text for current cycle count
|
||||||
iteration_index->setMaximum(debug_data.records.size() - 1);
|
cycle_index->setMaximum(debug_data.records.size() - 1);
|
||||||
OnIterationIndexChanged(iteration_index->value());
|
OnCycleIndexChanged(cycle_index->value());
|
||||||
|
|
||||||
model->endResetModel();
|
model->endResetModel();
|
||||||
}
|
}
|
||||||
|
@ -453,7 +454,7 @@ void GraphicsVertexShaderWidget::OnInputAttributeChanged(int index) {
|
||||||
Reload();
|
Reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GraphicsVertexShaderWidget::OnIterationIndexChanged(int index) {
|
void GraphicsVertexShaderWidget::OnCycleIndexChanged(int index) {
|
||||||
QString text;
|
QString text;
|
||||||
|
|
||||||
auto& record = debug_data.records[index];
|
auto& record = debug_data.records[index];
|
||||||
|
|
|
@ -51,7 +51,7 @@ private slots:
|
||||||
|
|
||||||
void OnInputAttributeChanged(int index);
|
void OnInputAttributeChanged(int index);
|
||||||
|
|
||||||
void OnIterationIndexChanged(int index);
|
void OnCycleIndexChanged(int index);
|
||||||
|
|
||||||
void DumpShader();
|
void DumpShader();
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ private:
|
||||||
// Text to be shown when input vertex data is not retrievable
|
// Text to be shown when input vertex data is not retrievable
|
||||||
QLabel* breakpoint_warning;
|
QLabel* breakpoint_warning;
|
||||||
|
|
||||||
QSpinBox* iteration_index;
|
QSpinBox* cycle_index;
|
||||||
|
|
||||||
nihstro::ShaderInfo info;
|
nihstro::ShaderInfo info;
|
||||||
Pica::Shader::DebugData<true> debug_data;
|
Pica::Shader::DebugData<true> debug_data;
|
||||||
|
|
Loading…
Reference in a new issue