Skip to main content Link Menu Expand (external link) Document Search Copy Copied

VariableConfig(vector<string> options, string title, function<void(int)> callback)

Makes a variable config with the given options, title, and callback

Parameters

  • options - The options to be displayed
  • title - The title of the variable config
  • callback - The callback to be called when the variable config is set

Example

VariableConfig config ({"Option 1", "Option 2", "Option 3"}, "Title", [](int i) {
    // Uses i + 1 because the index starts at 0, but the names start at 1
    std::cout << "Option " << i + 1 << " was selected" << std::endl;
});