diff --git a/DEVELOPER_GUIDE.md b/DEVELOPER_GUIDE.md index a95df1f..44f2c55 100644 --- a/DEVELOPER_GUIDE.md +++ b/DEVELOPER_GUIDE.md @@ -65,6 +65,8 @@ It is difficult to describe by text. So please see below figure: * **OptionDescriptionBGColor(prompt.Color)** : default `prompt.Turquoise` * **OptionSelectedDescriptionTextColor(prompt.Color)** : default `prompt.White` * **OptionSelectedDescriptionBGColor(prompt.Color)** : default `prompt.Cyan` +* **OptionScrollbarThumbColor** : `prompt.DarkGray` +* **OptionScrollbarBGColor** : `prompt.Cyan` **Other Options** @@ -77,6 +79,9 @@ Option to set history. #### `OptionPrefix(string)` : default `"> "` Option to set prefix string. +#### `OptionLivePrefix(func() (prefix string, useLivePrefix bool))` : default `nil` +Option to set a callback function for updating prefix string dynamically. + #### `OptionMaxSuggestions(x uint16)` : default `6` The max number of displayed suggestions. diff --git a/option.go b/option.go index d05c8cd..72c6de3 100644 --- a/option.go +++ b/option.go @@ -142,6 +142,20 @@ func OptionSelectedDescriptionBGColor(x Color) Option { } } +func OptionScrollbarThumbColor(x Color) Option { + return func(p *Prompt) error { + p.renderer.scrollbarThumbColor = x + return nil + } +} + +func OptionScrollbarBGColor(x Color) Option { + return func(p *Prompt) error { + p.renderer.scrollbarBGColor = x + return nil + } +} + // OptionMaxSuggestion specify the max number of displayed suggestions. func OptionMaxSuggestion(x uint16) Option { return func(p *Prompt) error {