mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
Fix misspellings
This commit is contained in:
parent
c30918261b
commit
cbe4844fa0
@ -252,7 +252,7 @@ type TouchEnd struct {
|
|||||||
Primary bool
|
Primary bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// TouchCancel occurs when a touch is canceled. This can happen in various situations, depending on the underlying platform, for example when the aplication loses focus.
|
// TouchCancel occurs when a touch is canceled. This can happen in various situations, depending on the underlying platform, for example when the application loses focus.
|
||||||
type TouchCancel struct {
|
type TouchCancel struct {
|
||||||
// ID identifies the touch that caused the touch event.
|
// ID identifies the touch that caused the touch event.
|
||||||
ID int
|
ID int
|
||||||
|
@ -274,7 +274,7 @@ var (
|
|||||||
Members: membersTouch,
|
Members: membersTouch,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Comment: "TouchCancel occurs when a touch is canceled. This can happen in various situations, depending on the underlying platform, for example when the aplication loses focus.",
|
Comment: "TouchCancel occurs when a touch is canceled. This can happen in various situations, depending on the underlying platform, for example when the application loses focus.",
|
||||||
Members: []Member{
|
Members: []Member{
|
||||||
{
|
{
|
||||||
Comment: "ID identifies the touch that caused the touch event.",
|
Comment: "ID identifies the touch that caused the touch event.",
|
||||||
|
@ -252,7 +252,7 @@ type TouchEnd struct {
|
|||||||
Primary bool
|
Primary bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// TouchCancel occurs when a touch is canceled. This can happen in various situations, depending on the underlying platform, for example when the aplication loses focus.
|
// TouchCancel occurs when a touch is canceled. This can happen in various situations, depending on the underlying platform, for example when the application loses focus.
|
||||||
type TouchCancel struct {
|
type TouchCancel struct {
|
||||||
// ID identifies the touch that caused the touch event.
|
// ID identifies the touch that caused the touch event.
|
||||||
ID int
|
ID int
|
||||||
|
@ -24,8 +24,8 @@ import (
|
|||||||
type rectToPixels struct {
|
type rectToPixels struct {
|
||||||
m map[image.Rectangle][]byte
|
m map[image.Rectangle][]byte
|
||||||
|
|
||||||
lastr image.Rectangle
|
lastR image.Rectangle
|
||||||
lastpix []byte
|
lastPix []byte
|
||||||
}
|
}
|
||||||
|
|
||||||
func (rtp *rectToPixels) addOrReplace(pixels []byte, x, y, width, height int) {
|
func (rtp *rectToPixels) addOrReplace(pixels []byte, x, y, width, height int) {
|
||||||
@ -45,8 +45,8 @@ func (rtp *rectToPixels) addOrReplace(pixels []byte, x, y, width, height int) {
|
|||||||
if r == newr {
|
if r == newr {
|
||||||
// Replace the region.
|
// Replace the region.
|
||||||
rtp.m[r] = copied
|
rtp.m[r] = copied
|
||||||
if r == rtp.lastr {
|
if r == rtp.lastR {
|
||||||
rtp.lastpix = copied
|
rtp.lastPix = copied
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -57,8 +57,8 @@ func (rtp *rectToPixels) addOrReplace(pixels []byte, x, y, width, height int) {
|
|||||||
|
|
||||||
// Add the region.
|
// Add the region.
|
||||||
rtp.m[newr] = copied
|
rtp.m[newr] = copied
|
||||||
if newr == rtp.lastr {
|
if newr == rtp.lastR {
|
||||||
rtp.lastpix = copied
|
rtp.lastPix = copied
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,16 +84,16 @@ func (rtp *rectToPixels) at(i, j int) (byte, byte, byte, byte, bool) {
|
|||||||
var pix []byte
|
var pix []byte
|
||||||
|
|
||||||
var r *image.Rectangle
|
var r *image.Rectangle
|
||||||
if pt := image.Pt(i, j); pt.In(rtp.lastr) {
|
if pt := image.Pt(i, j); pt.In(rtp.lastR) {
|
||||||
r = &rtp.lastr
|
r = &rtp.lastR
|
||||||
pix = rtp.lastpix
|
pix = rtp.lastPix
|
||||||
} else {
|
} else {
|
||||||
for rr := range rtp.m {
|
for rr := range rtp.m {
|
||||||
if pt.In(rr) {
|
if pt.In(rr) {
|
||||||
r = &rr
|
r = &rr
|
||||||
rtp.lastr = rr
|
rtp.lastR = rr
|
||||||
pix = rtp.m[rr]
|
pix = rtp.m[rr]
|
||||||
rtp.lastpix = pix
|
rtp.lastPix = pix
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user