divs and paginators

This commit is contained in:
2024-09-25 12:29:03 +02:00
parent 905a77f8b0
commit 8f375efe41
7 changed files with 210 additions and 80 deletions
+3 -6
View File
@@ -8,12 +8,9 @@ import (
func main() {
colors := ui.Text(
styles.Red + "Red!\n" + styles.Green + "Green!\n" + styles.Blue + "Blue!\n",
styles.Red + "Red!\n" + styles.Green + "Green!\n" + styles.Blue + "Blue!" + styles.Reset,
)
input := ui.InputBox(30)
paginator := ui.Paginator(colors, input)
paginator.UpdatePages[1] = input.Update
paginator := ui.Paginator(ui.Div(colors), ui.Div(ui.InputBox(30)))
screen := osui.NewScreen(paginator)
screen.Render()
paginator.Run()
screen.Run()
}