43 lines
1.0 KiB
Go
43 lines
1.0 KiB
Go
package npc
|
|
|
|
import (
|
|
"fyne.io/fyne/v2"
|
|
"fyne.io/fyne/v2/container"
|
|
"fyne.io/fyne/v2/layout"
|
|
"fyne.io/fyne/v2/widget"
|
|
)
|
|
|
|
type FieldCreator struct {
|
|
Representation *fyne.Container
|
|
NameValue *widget.Entry
|
|
DescValue *widget.Entry
|
|
RegExValue *widget.Entry
|
|
ByteSizeValue *widget.Entry
|
|
BitSizeValue *widget.Entry
|
|
// to be filled with needed things
|
|
}
|
|
|
|
func CreateFieldCreator() *FieldCreator {
|
|
fc := &FieldCreator{}
|
|
fc.Representation = container.New(layout.NewVBoxLayout())
|
|
|
|
fc.Representation.Add(widget.NewLabel("Name"))
|
|
fc.NameValue = widget.NewEntry()
|
|
fc.Representation.Add(fc.NameValue)
|
|
|
|
fc.Representation.Add(widget.NewLabel("Description"))
|
|
fc.DescValue = widget.NewEntry()
|
|
fc.Representation.Add(fc.DescValue)
|
|
|
|
fc.Representation.Add(widget.NewLabel("RegEx"))
|
|
fc.RegExValue = widget.NewEntry()
|
|
fc.Representation.Add(fc.RegExValue)
|
|
|
|
fc.Representation.Add(widget.NewLabel("ByteSize"))
|
|
fc.ByteSizeValue = widget.NewEntry()
|
|
fc.Representation.Add(fc.ByteSizeValue)
|
|
// add that later
|
|
fc.BitSizeValue = widget.NewEntry()
|
|
return fc
|
|
}
|