Move the rendertime into a property and remove the toggleFrametimeType

Make OptionProperty work in Radio mode
Rename DROPDOWN and RADIO to Dropdown and Radio
This commit is contained in:
Alexander Bock
2016-11-06 22:15:52 +01:00
parent c469be26c3
commit 572257d3b0
9 changed files with 45 additions and 77 deletions
+5 -5
View File
@@ -72,16 +72,16 @@ void renderOptionProperty(Property* prop, const std::string& ownerName) {
int value = *p;
std::vector<OptionProperty::Option> options = p->options();
switch (p->displayType()) {
case OptionProperty::DisplayType::RADIO: {
case OptionProperty::DisplayType::Radio: {
ImGui::Text(name.c_str());
ImGui::Separator();
for (const OptionProperty::Option& o : options) {
ImGui::RadioButton(name.c_str(), &value, o.value);
ImGui::SameLine();
ImGui::Text(o.description.c_str());
ImGui::RadioButton(o.description.c_str(), &value, o.value);
renderTooltip(prop);
}
break;
}
case OptionProperty::DisplayType::DROPDOWN: {
case OptionProperty::DisplayType::Dropdown: {
std::string nodeNames = "";
for (const OptionProperty::Option& o : options) {
nodeNames += o.description + '\0';