Documentation
¶
Overview ¶
grugui draws directly to textures.
It's not the best idea to use it... which is why i gave it a weird name :3
Index ¶
- type App
- type Context
- type Input
- type Renderer
- type Surface
- func (s *Surface) Add(v View)
- func (s *Surface) AddChildSurface(width, height int) *Surface
- func (s *Surface) Clip(x, y, width, height int)
- func (s *Surface) ClipToRect(rect image.Rectangle)
- func (i *Surface) GetCursorPosition() (int, int)
- func (i *Surface) GetGlobalCursorPosition() (int, int)
- func (i *Surface) IsButtonJustPressed(button input.MouseButton) bool
- func (i *Surface) IsButtonPressed(button input.MouseButton) bool
- func (i *Surface) IsKeyJustPressed(key input.Key) bool
- func (i *Surface) IsKeyPressed(key input.Key) bool
- func (s *Surface) RemoveChildSurface(child *Surface)
- func (s *Surface) Render()
- func (s *Surface) Theme() *Theme
- func (s *Surface) Update()
- type Theme
- type View
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
func (*App) CreateSurface ¶
type Renderer ¶
type Renderer interface { SetVisibility(visible bool) DrawRect(x, y, width, height int, c color.Color) FillRect(x, y, width, height int, c color.Color) DrawCircle(x, y, radius int, c color.Color) FillCircle(x, y, radius int, c color.Color) DrawTriangle(points [3]geom.Point, c color.Color) FillTriangle(points [3]geom.Point, c color.Color) DrawText(x, y int, text string, c color.Color) DrawLine(x1, y1, x2, y2 int, c color.Color) DrawRoundedRectangle(x, y, width, height int, c color.Color) FillRoundedRectangle(x, y, width, height int, c color.Color) TextWidth(text string) int TextHeight(text string) int UpdateImage(image.Image) error ToImage() *image.RGBA Clear(color.Color) Render() Move(int, int) Resize(int, int) Clip(x, y, width, height int) GetX() int GetY() int Height() int Width() int }
type Surface ¶
type Surface struct { Renderer // contains filtered or unexported fields }
func NewSurface ¶
func (*Surface) AddChildSurface ¶
func (*Surface) ClipToRect ¶
func (*Surface) GetCursorPosition ¶
func (*Surface) GetGlobalCursorPosition ¶
func (*Surface) IsButtonJustPressed ¶
func (i *Surface) IsButtonJustPressed(button input.MouseButton) bool
func (*Surface) IsButtonPressed ¶
func (i *Surface) IsButtonPressed(button input.MouseButton) bool
func (*Surface) IsKeyJustPressed ¶
func (*Surface) IsKeyPressed ¶
func (*Surface) RemoveChildSurface ¶
Click to show internal directories.
Click to hide internal directories.