MCPcopy Create free account
hub / github.com/SolarLune/masterplan / NewNoteContents

Function NewNoteContents

contents.go:727–747  ·  view source on GitHub ↗
(card *Card)

Source from the content-addressed store, hash-verified

725}
726
727func NewNoteContents(card *Card) *NoteContents {
728
729 nc := &NoteContents{
730 DefaultContents: newDefaultContents(card),
731 }
732
733 nc.Label = NewLabel("New Note", nil, true, AlignLeft)
734 nc.Label.Editable = true
735 nc.Label.Property = card.Properties.Get("description")
736
737 nc.Label.OnChange = func() {
738 commonTextEditingResizing(nc.Label, card)
739 }
740
741 row := nc.container.AddRow(AlignLeft)
742 row.Add("icon", NewGUIImage(nil, &sdl.FRect{112, 160, 32, 32}, globals.GUITexture.Texture, true))
743 row.Add("label", nc.Label)
744
745 return nc
746
747}
748
749func (nc *NoteContents) AutosetSize() {
750

Callers 1

SetContentsMethod · 0.85

Calls 7

newDefaultContentsFunction · 0.85
NewLabelFunction · 0.85
NewGUIImageFunction · 0.85
AddRowMethod · 0.80
GetMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected