Make some menu options bold
This commit is contained in:
parent
5d98813402
commit
fe170efba3
3 changed files with 17 additions and 8 deletions
|
@ -1,13 +1,16 @@
|
|||
package menu
|
||||
|
||||
import "github.com/nexidian/gocliselect"
|
||||
import (
|
||||
"github.com/gookit/color"
|
||||
"github.com/nexidian/gocliselect"
|
||||
)
|
||||
|
||||
// Make a Next menu
|
||||
func Next(msg string) string {
|
||||
// Make the menu
|
||||
menu := gocliselect.NewMenu(msg)
|
||||
menu.AddItem("Next", "next")
|
||||
menu.AddItem("Go Back", "back")
|
||||
menu.AddItem(color.Bold.Sprint("Next"), "next")
|
||||
menu.AddItem(color.Bold.Sprint("Go Back"), "back")
|
||||
|
||||
// Display the menu
|
||||
choice := menu.Display()
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
package menu
|
||||
|
||||
import "github.com/nexidian/gocliselect"
|
||||
import (
|
||||
"github.com/gookit/color"
|
||||
"github.com/nexidian/gocliselect"
|
||||
)
|
||||
|
||||
// Make an OK menu
|
||||
func Ok(msg string) string {
|
||||
|
@ -19,8 +22,8 @@ func Ok(msg string) string {
|
|||
func OkBack(msg string) string {
|
||||
// Make the menu
|
||||
menu := gocliselect.NewMenu(msg)
|
||||
menu.AddItem("OK", "next")
|
||||
menu.AddItem("Go Back", "back")
|
||||
menu.AddItem(color.Bold.Sprint("OK"), "next")
|
||||
menu.AddItem(color.Bold.Sprint("Go Back"), "back")
|
||||
|
||||
// Display the menu
|
||||
choice := menu.Display()
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
package menu
|
||||
|
||||
import "github.com/nexidian/gocliselect"
|
||||
import (
|
||||
"github.com/gookit/color"
|
||||
"github.com/nexidian/gocliselect"
|
||||
)
|
||||
|
||||
// Make a YesNo menu
|
||||
func YesNo(msg string) string {
|
||||
|
@ -21,7 +24,7 @@ func YesNoBack(msg string) string {
|
|||
menu := gocliselect.NewMenu(msg)
|
||||
menu.AddItem("Yes", "y")
|
||||
menu.AddItem("No", "n")
|
||||
menu.AddItem("Go Back", "back")
|
||||
menu.AddItem(color.Bold.Sprint("Go Back"), "back")
|
||||
|
||||
// Display the menu
|
||||
choice := menu.Display()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue