Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const config& options = scenario_->child("options");
- std::map<std::string, string_map> data;
- string_map item;
- item["label"] = (*scenario_)["name"];
- data["tree_view_node_label"] = item;
- ttree_view_node& option_node = options_tree.add_node("option_node", data);
- data.clear();
- for(const auto& checkbox_option : options.child_range("checkbox")) {
- item["label"] = checkbox_option["name"];
- data["option_checkbox"] = item;
- ttree_view_node& node = option_node.add_child("option_checkbox_node", data);
- ttoggle_button* checkbox = dynamic_cast<ttoggle_button*>(node.find("option_checkbox", true));
- VALIDATE(checkbox, missing_widget("option_checkbox"));
- checkbox->set_value(checkbox_option["default"].to_bool());
- checkbox->set_label(checkbox_option["name"].str());
- }
Advertisement
Add Comment
Please, Sign In to add comment