Versions in this module Expand all Collapse all v0 v0.10.2 Jan 23, 2021 Changes in this version + const AxisLast + const AxisLeftTrigger + const AxisLeftX + const AxisLeftY + const AxisRightTrigger + const AxisRightX + const AxisRightY + const ButtonA + const ButtonB + const ButtonBack + const ButtonCircle + const ButtonCross + const ButtonDpadDown + const ButtonDpadLeft + const ButtonDpadRight + const ButtonDpadUp + const ButtonGuide + const ButtonLast + const ButtonLeftBumper + const ButtonLeftThumb + const ButtonRightBumper + const ButtonRightThumb + const ButtonSquare + const ButtonStart + const ButtonTriangle + const ButtonX + const ButtonY + const Joystick1 + const Joystick10 + const Joystick11 + const Joystick12 + const Joystick13 + const Joystick14 + const Joystick15 + const Joystick16 + const Joystick2 + const Joystick3 + const Joystick4 + const Joystick5 + const Joystick6 + const Joystick7 + const Joystick8 + const Joystick9 + const JoystickLast + const Key0 + const Key1 + const Key2 + const Key3 + const Key4 + const Key5 + const Key6 + const Key7 + const Key8 + const Key9 + const KeyA + const KeyApostrophe + const KeyB + const KeyBackslash + const KeyBackspace + const KeyC + const KeyCapsLock + const KeyComma + const KeyD + const KeyDelete + const KeyDown + const KeyE + const KeyEnd + const KeyEnter + const KeyEqual + const KeyEscape + const KeyF + const KeyF1 + const KeyF10 + const KeyF11 + const KeyF12 + const KeyF13 + const KeyF14 + const KeyF15 + const KeyF16 + const KeyF17 + const KeyF18 + const KeyF19 + const KeyF2 + const KeyF20 + const KeyF21 + const KeyF22 + const KeyF23 + const KeyF24 + const KeyF25 + const KeyF3 + const KeyF4 + const KeyF5 + const KeyF6 + const KeyF7 + const KeyF8 + const KeyF9 + const KeyG + const KeyGraveAccent + const KeyH + const KeyHome + const KeyI + const KeyInsert + const KeyJ + const KeyK + const KeyKP0 + const KeyKP1 + const KeyKP2 + const KeyKP3 + const KeyKP4 + const KeyKP5 + const KeyKP6 + const KeyKP7 + const KeyKP8 + const KeyKP9 + const KeyKPAdd + const KeyKPDecimal + const KeyKPDivide + const KeyKPEnter + const KeyKPEqual + const KeyKPMultiply + const KeyKPSubtract + const KeyL + const KeyLast + const KeyLeft + const KeyLeftAlt + const KeyLeftBracket + const KeyLeftControl + const KeyLeftShift + const KeyLeftSuper + const KeyM + const KeyMenu + const KeyMinus + const KeyN + const KeyNumLock + const KeyO + const KeyP + const KeyPageDown + const KeyPageUp + const KeyPause + const KeyPeriod + const KeyPrintScreen + const KeyQ + const KeyR + const KeyRight + const KeyRightAlt + const KeyRightBracket + const KeyRightControl + const KeyRightShift + const KeyRightSuper + const KeyS + const KeyScrollLock + const KeySemicolon + const KeySlash + const KeySpace + const KeyT + const KeyTab + const KeyU + const KeyUnknown + const KeyUp + const KeyV + const KeyW + const KeyWorld1 + const KeyWorld2 + const KeyX + const KeyY + const KeyZ + const MouseButton1 + const MouseButton2 + const MouseButton3 + const MouseButton4 + const MouseButton5 + const MouseButton6 + const MouseButton7 + const MouseButton8 + const MouseButtonLast + const MouseButtonLeft + const MouseButtonMiddle + const MouseButtonRight + func Run(run func()) + type Button int + func (b Button) String() string + type Canvas struct + func NewCanvas(bounds pixel.Rect) *Canvas + func (c *Canvas) Bounds() pixel.Rect + func (c *Canvas) Clear(color color.Color) + func (c *Canvas) Color(at pixel.Vec) pixel.RGBA + func (c *Canvas) Draw(t pixel.Target, matrix pixel.Matrix) + func (c *Canvas) DrawColorMask(t pixel.Target, matrix pixel.Matrix, mask color.Color) + func (c *Canvas) Frame() *glhf.Frame + func (c *Canvas) MakePicture(p pixel.Picture) pixel.TargetPicture + func (c *Canvas) MakeTriangles(t pixel.Triangles) pixel.TargetTriangles + func (c *Canvas) Pixels() []uint8 + func (c *Canvas) SetBounds(bounds pixel.Rect) + func (c *Canvas) SetColorMask(col color.Color) + func (c *Canvas) SetComposeMethod(cmp pixel.ComposeMethod) + func (c *Canvas) SetFragmentShader(src string) + func (c *Canvas) SetMatrix(m pixel.Matrix) + func (c *Canvas) SetPixels(pixels []uint8) + func (c *Canvas) SetSmooth(smooth bool) + func (c *Canvas) SetUniform(name string, value interface{}) + func (c *Canvas) Smooth() bool + func (c *Canvas) Texture() *glhf.Texture + type GLFrame struct + func NewGLFrame(bounds pixel.Rect) *GLFrame + func (gf *GLFrame) Bounds() pixel.Rect + func (gf *GLFrame) Color(at pixel.Vec) pixel.RGBA + func (gf *GLFrame) Dirty() + func (gf *GLFrame) Frame() *glhf.Frame + func (gf *GLFrame) SetBounds(bounds pixel.Rect) + func (gf *GLFrame) Texture() *glhf.Texture + type GLPicture interface + Texture func() *glhf.Texture + func NewGLPicture(p pixel.Picture) GLPicture + type GLShader struct + func NewGLShader(fragmentShader string) *GLShader + func (gs *GLShader) SetUniform(name string, value interface{}) + func (gs *GLShader) Update() + type GLTriangles struct + func NewGLTriangles(shader *GLShader, t pixel.Triangles) *GLTriangles + func (gt *GLTriangles) ClipRect() (pixel.Rect, bool) + func (gt *GLTriangles) Color(i int) pixel.RGBA + func (gt *GLTriangles) Copy() pixel.Triangles + func (gt *GLTriangles) Len() int + func (gt *GLTriangles) Picture(i int) (pic pixel.Vec, intensity float64) + func (gt *GLTriangles) Position(i int) pixel.Vec + func (gt *GLTriangles) SetClipRect(r pixel.Rect) + func (gt *GLTriangles) SetLen(length int) + func (gt *GLTriangles) Shader() *GLShader + func (gt *GLTriangles) Slice(i, j int) pixel.Triangles + func (gt *GLTriangles) Update(t pixel.Triangles) + func (gt *GLTriangles) VertexSlice() *glhf.VertexSlice + type GamepadAxis int + type GamepadButton int + type Joystick int + type Monitor struct + func Monitors() []*Monitor + func PrimaryMonitor() *Monitor + func (m *Monitor) BitDepth() (red, green, blue int) + func (m *Monitor) Name() string + func (m *Monitor) PhysicalSize() (width, height float64) + func (m *Monitor) Position() (x, y float64) + func (m *Monitor) RefreshRate() (rate float64) + func (m *Monitor) Size() (width, height float64) + func (m *Monitor) VideoModes() (vmodes []VideoMode) + type VideoMode struct + Height int + RefreshRate int + Width int + type Window struct + func NewWindow(cfg WindowConfig) (*Window, error) + func (w *Window) Bounds() pixel.Rect + func (w *Window) Canvas() *Canvas + func (w *Window) Clear(c color.Color) + func (w *Window) Closed() bool + func (w *Window) Color(at pixel.Vec) pixel.RGBA + func (w *Window) CursorVisible() bool + func (w *Window) Destroy() + func (w *Window) Focused() bool + func (w *Window) GetPos() pixel.Vec + func (w *Window) JoystickAxis(js Joystick, axis GamepadAxis) float64 + func (w *Window) JoystickAxisCount(js Joystick) int + func (w *Window) JoystickButtonCount(js Joystick) int + func (w *Window) JoystickJustPressed(js Joystick, button GamepadButton) bool + func (w *Window) JoystickJustReleased(js Joystick, button GamepadButton) bool + func (w *Window) JoystickName(js Joystick) string + func (w *Window) JoystickPresent(js Joystick) bool + func (w *Window) JoystickPressed(js Joystick, button GamepadButton) bool + func (w *Window) JustPressed(button Button) bool + func (w *Window) JustReleased(button Button) bool + func (w *Window) MakePicture(p pixel.Picture) pixel.TargetPicture + func (w *Window) MakeTriangles(t pixel.Triangles) pixel.TargetTriangles + func (w *Window) Monitor() *Monitor + func (w *Window) MouseInsideWindow() bool + func (w *Window) MousePosition() pixel.Vec + func (w *Window) MousePreviousPosition() pixel.Vec + func (w *Window) MouseScroll() pixel.Vec + func (w *Window) Pressed(button Button) bool + func (w *Window) Repeated(button Button) bool + func (w *Window) SetBounds(bounds pixel.Rect) + func (w *Window) SetClosed(closed bool) + func (w *Window) SetColorMask(c color.Color) + func (w *Window) SetComposeMethod(cmp pixel.ComposeMethod) + func (w *Window) SetCursorDisabled() + func (w *Window) SetCursorVisible(visible bool) + func (w *Window) SetMatrix(m pixel.Matrix) + func (w *Window) SetMonitor(monitor *Monitor) + func (w *Window) SetMousePosition(v pixel.Vec) + func (w *Window) SetPos(pos pixel.Vec) + func (w *Window) SetSmooth(smooth bool) + func (w *Window) SetTitle(title string) + func (w *Window) SetVSync(vsync bool) + func (w *Window) Show() + func (w *Window) Smooth() bool + func (w *Window) SwapBuffers() + func (w *Window) Typed() string + func (w *Window) Update() + func (w *Window) UpdateInput() + func (w *Window) UpdateInputWait(timeout time.Duration) + func (w *Window) VSync() bool + type WindowConfig struct + AlwaysOnTop bool + Bounds pixel.Rect + Icon []pixel.Picture + Invisible bool + Maximized bool + Monitor *Monitor + NoIconify bool + Position pixel.Vec + Resizable bool + Title string + TransparentFramebuffer bool + Undecorated bool + VSync bool