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

Method ReceiveMessage

contents.go:4901–4918  ·  view source on GitHub ↗
(msg *Message)

Source from the content-addressed store, hash-verified

4899}
4900
4901func (tc *TableContents) ReceiveMessage(msg *Message) {
4902 if msg.Type == MessageCardResizeCompleted {
4903 w := int(tc.Card.Rect.W / 32)
4904 h := int(tc.Card.Rect.H / 32)
4905 tc.TableData.Resize(w, h)
4906 tc.Card.Properties.Get("contents").SetRaw(tc.TableData.Serialize())
4907 } else if msg.Type == MessageUndoRedo {
4908 tc.TableData.Deserialize(tc.Card.Properties.Get("contents").AsString())
4909 tc.Card.Properties.Get("contents").SetRaw(tc.TableData.Serialize())
4910 } else if msg.Type == MessageCardDeselected {
4911
4912 msg := globals.MenuSystem.Get("table settings menu")
4913 if msg.Opened {
4914 msg.Close()
4915 }
4916
4917 }
4918}
4919
4920func (tc *TableContents) DefaultSize() Vector {
4921 gs := globals.GridSize

Callers

nothing calls this directly

Calls 7

SetRawMethod · 0.80
AsStringMethod · 0.80
CloseMethod · 0.80
ResizeMethod · 0.45
GetMethod · 0.45
SerializeMethod · 0.45
DeserializeMethod · 0.45

Tested by

no test coverage detected