MCPcopy
hub / github.com/g3n/engine / NewPanel

Function NewPanel

gui/panel.go:126–131  ·  view source on GitHub ↗

NewPanel creates and returns a pointer to a new panel with the specified dimensions in pixels and a default quad geometry

(width, height float32)

Source from the content-addressed store, hash-verified

124// NewPanel creates and returns a pointer to a new panel with the
125// specified dimensions in pixels and a default quad geometry
126func 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.
134func (p *Panel) Initialize(ipan IPanel, width, height float32) { // TODO rename to Init

Callers 4

NewImageButtonFunction · 0.85
buildPanelFunction · 0.85
newSliderMethod · 0.85

Calls 1

InitializeMethod · 0.45

Tested by

no test coverage detected