Documentation ¶
Index ¶
- Variables
- func HasFocus() bool
- func HasMouseFocus() bool
- type XY
- func (a XY) Cartesian() (x, y, z float32)
- func (a XY) Coord() coord.XY
- func (a XY) FlipX() XY
- func (a XY) FlipY() XY
- func (a XY) Minus(b XY) XY
- func (a XY) MinusS(s int16) XY
- func (a XY) Mod(s int16) XY
- func (a XY) ModXY(b XY) XY
- func (a XY) Null() bool
- func (a XY) Opposite() XY
- func (a XY) Perp() XY
- func (a XY) Plus(b XY) XY
- func (a XY) PlusS(s int16) XY
- func (a XY) ProjX() XY
- func (a XY) ProjY() XY
- func (a XY) Slash(s int16) XY
- func (a XY) SlashXY(b XY) XY
- func (a XY) Times(s int16) XY
- func (a XY) TimesXY(b XY) XY
- func (a XY) YX() XY
Constants ¶
This section is empty.
Variables ¶
var Events = struct { Resize func() Hide func() Show func() Focus func() Unfocus func() Quit func() }{ Resize: func() {}, Hide: func() {}, Show: func() {}, Focus: func() {}, Unfocus: func() {}, Quit: func() { internal.QuitRequested = true }, }
Events holds the callbacks for each window events.
These callbacks can be modified at anytime, but should always contain valid functions (i.e., non nil). The change will take effect at the next frame.
Functions ¶
func HasMouseFocus ¶
func HasMouseFocus() bool
HasMouseFocus returns true if the mouse is currently inside the game window.
Types ¶
type XY ¶
type XY struct {
X, Y int16
}
XY represents the coordinates of a pixel on the window.
func RoundXYof ¶
func RoundXYof(v coord.Coordinates) XY
RoundXYof returns an integer vector corresponding to the first two coordinates of v.
func XYof ¶
func XYof(v coord.Coordinates) XY
XYof returns an integer vector corresponding to the first two coordinates of v.
func (XY) Cartesian ¶
Cartesian returns the coordinates of the vector in 3D space. X and Y are casted to float32, and the third coordinate is always 0.
func (XY) Mod ¶
Mod returns the remainder (modulus) of the division by a scalar (which must be non-zero).
func (XY) ModXY ¶
ModXY returns the remainder (modulus) of the component-wise division by another vector (of which both X and Y must be non-zero).
func (XY) Slash ¶
Slash returns the integer quotient of the division by a scalar (which must be non-zero).
func (XY) SlashXY ¶
SlashXY returns the integer quotients of the component-wise division by another vector (of which both X and Y must be non-zero).