INNER CODE UNIT · Go
NewFileSelectButton
g3n/g3nd · util/fileselect.go:20
func NewFileSelectButton(path, text string, width, height float32) *FileSelectButton {
// Initialize file select button
fsb := new(FileSelectButton)
fsb.Button = gui.NewButton(text)
fsb.path = path
// Creates error label
fsb.errLabel = gui.NewLabel("")
fsb.errLabel.SetBounded(false)
fsb.errLabel.SetBgColor(&math32.Color{1, 1, 1})
fsb.errLabel.SetColor(&math32.Color{1, 0, 0})
fsb.errLabel.SetPosition(4, 40)
fsb.errLabel.SetBorders(1, 1, 1, 1)
fsb.errLabel.SetPaddings(2, 6, 2, 6)
fsb.errLabel.SetFontSize(18)
fsb.errLabel.SetVisible(false)
fsb.Button.Add(fsb.errLabel)