This commit is contained in:
2024-09-28 19:29:01 +02:00
parent 90f106f127
commit 8592b1cc50
12 changed files with 222 additions and 47 deletions
+5 -5
View File
@@ -10,10 +10,10 @@ import (
)
type InputBoxStyle struct {
Background string `defaults:"" type:"bg"`
Foreground string `defaults:"" type:"fg"`
Outline string `defaults:"" type:"fg"`
Cursor string `defaults:"" type:"fg"`
Background string `default:"" type:"bg"`
Foreground string `default:"" type:"fg"`
Outline string `default:"" type:"fg"`
Cursor string `default:"" type:"fg"`
}
type InputBoxComponent struct {
@@ -82,5 +82,5 @@ func (d *InputBoxComponent) SetStyle(c interface{}) {
}
func InputBox(max_size uint) *InputBoxComponent {
return osui.NewComponent(&InputBoxComponent{max_size: max_size, Style: osui.SetDefaults(&InputBoxStyle{}).(*InputBoxStyle)}).(*InputBoxComponent)
return &InputBoxComponent{max_size: max_size, Style: osui.SetDefaults(&InputBoxStyle{}).(*InputBoxStyle)}
}