--User changes

-Entering xaos cells will always select the entire cell to make editing easier.
 -Add radio buttons on the xaos tab to specify how pasting or duplicating xforms should preserve xaos.

--Bug fixes
 -The left header column in the xaos visualization table had somehow disappeared.

--Code changes
 -DoubleSpinBox now has a boolean which specifies whether it clears its selection on enter. Default true.
 -Make AddXformsWithXaos() be a static member of FractoriumEmberController for quicker build times.
 -Add new exmaple flames to package_linux.sh
This commit is contained in:
Person
2020-03-11 06:49:29 -07:00
parent 61dd5e6eeb
commit 18809e65aa
10 changed files with 221 additions and 83 deletions

View File

@ -11,7 +11,7 @@ void Fractorium::InitXaosUI()
int spinHeight = 20;
ui.XaosTableView->verticalHeader()->setSectionsClickable(true);
ui.XaosTableView->horizontalHeader()->setSectionsClickable(true);
m_XaosSpinBox = new DoubleSpinBox(nullptr, spinHeight, 0.1);
m_XaosSpinBox = new DoubleSpinBox(nullptr, spinHeight, 0.1, false);
m_XaosSpinBox->DoubleClick(true);
m_XaosSpinBox->DoubleClickZero(1);
m_XaosSpinBox->DoubleClickNonZero(0);
@ -265,7 +265,7 @@ void FractoriumEmberController<T>::AddLayer(int xforms)
Update([&]
{
std::vector<std::pair<Xform<T>, size_t>> vec(xforms);
AddXformsWithXaos(m_Ember, vec, false);
AddXformsWithXaos(m_Ember, vec, false, eXaosPasteStyle::ZERO_TO_ONE);
});
FillXforms();
@ -371,6 +371,26 @@ void Fractorium::OnXaosVScrollValueChanged(int value)
ui.XaosAppliedTableView->verticalScrollBar()->setValue(value);
}
/// <summary>
/// Get an enum value corresponding to the currently selected xaos pasting mode.
/// </summary>
/// <returns>The xaos pasting mode enum</returns>
eXaosPasteStyle Fractorium::GetXaosPasteStyleType()
{
if (ui.XaosPasteNoneRadio->isChecked())
return eXaosPasteStyle::NONE;
else if (ui.XaosPaste0to1Radio->isChecked())
return eXaosPasteStyle::ZERO_TO_ONE;
else if (ui.XaosPaste0toValsRadio->isChecked())
return eXaosPasteStyle::ZERO_TO_VALS;
else if (ui.XaosPaste1toValsRadio->isChecked())
return eXaosPasteStyle::ONE_TO_VALS;
else if (ui.XaosPasteValsTo1Radio->isChecked())
return eXaosPasteStyle::VALS_TO_ONE;
else
return eXaosPasteStyle::NONE;
}
template class FractoriumEmberController<float>;
#ifdef DO_DOUBLE