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

Method ReceiveMessage

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

Source from the content-addressed store, hash-verified

5773}
5774
5775func (w *InternetContents) ReceiveMessage(msg *Message) {
5776
5777 switch msg.Type {
5778 case MessageCardDeleted:
5779 w.BrowserTab.Destroy()
5780 w.BrowserTab = nil
5781 case MessageCardRestored:
5782 w.ReinitContext()
5783 if w.BrowserTab != nil {
5784 w.BrowserTab.ForceRefresh.Store(true) // Send the input sent to indicate that it should update the texture regardless of FPS, update settings, etc.
5785 }
5786 case MessageUndoRedo:
5787 if w.BrowserTab != nil {
5788 w.BrowserTab.UpdateBufferSize(w.Width(), w.Height())
5789 }
5790 case MessageCardDestroyed:
5791 w.BrowserTab.Destroy()
5792 }
5793
5794}
5795
5796func (w *InternetContents) DefaultSize() Vector {
5797 return Vector{float32(w.Width()), float32(w.Height())}.LockToGrid()

Callers

nothing calls this directly

Calls 5

ReinitContextMethod · 0.95
WidthMethod · 0.95
HeightMethod · 0.95
UpdateBufferSizeMethod · 0.80
DestroyMethod · 0.65

Tested by

no test coverage detected