The Multi Selection Menu is just the Selection Menu but you can select more than 1 option.
type MultiSelectionMenu struct {
Title string // The Title
Description string // The Description
Options []string // Options
Separatorstyle string // Changes the separator between the number and the option title (default: >)
ShowControlsMSG bool // Shows how to exit menu
}
How to create:
// You only need the options to make a menu
menu := cmenu.MultiSelectionMenu{
// 1 2 3
Options: []string{"Option 1", "Option 2", "Option 3"},
}
getoption := menu.Show()
How to use in an for loop and if statement:
for i := 0; i < len(getoption); i++ {
if getoption[i] == "Option 1" {
println("selected option 1")
}
}