NewPanel creates and returns a pointer to a new panel with the specified dimensions in pixels and a default quad geometry
(width, height float32)
| 124 | // NewPanel creates and returns a pointer to a new panel with the |
| 125 | // specified dimensions in pixels and a default quad geometry |
| 126 | func NewPanel(width, height float32) *Panel { |
| 127 | |
| 128 | p := new(Panel) |
| 129 | p.Initialize(p, width, height) |
| 130 | return p |
| 131 | } |
| 132 | |
| 133 | // Initialize initializes this panel and is normally used by other types which embed a panel. |
| 134 | func (p *Panel) Initialize(ipan IPanel, width, height float32) { // TODO rename to Init |
no test coverage detected