bug fix but still a new one :(

This commit is contained in:
2024-09-26 23:03:24 +02:00
parent 4214f96c61
commit 3b2ff24c1f
+22
View File
@@ -0,0 +1,22 @@
package cutils
import "github.com/orus-dev/osui"
func WithPosition(x, y int, c osui.Component) osui.Component {
data := c.GetComponentData()
data.X = x
data.Y = y
return c
}
func WithStyle(style interface{}, c osui.Component) osui.Component {
c.SetStyle(style)
return c
}
func WithSize(width, height int, c osui.Component) osui.Component {
data := c.GetComponentData()
data.Width = width
data.Height = height
return c
}