This commit is contained in:
2024-09-26 17:49:03 +02:00
parent 8f375efe41
commit 179de20dba
9 changed files with 253 additions and 127 deletions
+32
View File
@@ -0,0 +1,32 @@
package main
// IMPORTANT NOTE: Needs bugfix. "Some text here" is distorted
import (
"github.com/orus-dev/osui"
"github.com/orus-dev/osui/colors"
"github.com/orus-dev/osui/ui"
)
func main() {
// innerDiv := ui.Div(ui.Text("ABC"))
// innerDiv.Data.X = 4
// innerDiv.Style.BackgroundColor = colors.Red
// innerDiv.Data.Width = 5
// innerDiv.Data.Height = 3
input := ui.InputBox(30)
input.Style.Cursor = colors.Green
input.Style.Background = colors.Red
input.Style.Outline = colors.Blue
someText := ui.Text("Some text here")
someText.Data.X = 40
someText.Data.Y = 1
div := ui.Div(input, someText)
screen := osui.NewScreen(div)
screen.Run()
}