NeedsRebuild returns whether the [renderContext] indicates a full rebuild is needed. This is typically used to detect when the settings have been changed, such as when the color scheme or zoom is changed.
()
| 81 | // when the settings have been changed, such as when the color |
| 82 | // scheme or zoom is changed. |
| 83 | func (wb *WidgetBase) NeedsRebuild() bool { |
| 84 | if wb.This == nil || wb.Scene == nil || wb.Scene.Stage == nil { |
| 85 | return false |
| 86 | } |
| 87 | rc := wb.Scene.renderContext() |
| 88 | if rc == nil { |
| 89 | return false |
| 90 | } |
| 91 | return rc.rebuild |
| 92 | } |
| 93 | |
| 94 | // layoutScene does a layout of the scene: Size, Position |
| 95 | func (sc *Scene) layoutScene() { |
no test coverage detected