(msg *Message)
| 5773 | } |
| 5774 | |
| 5775 | func (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 | |
| 5796 | func (w *InternetContents) DefaultSize() Vector { |
| 5797 | return Vector{float32(w.Width()), float32(w.Height())}.LockToGrid() |
nothing calls this directly
no test coverage detected