Skip to content

Commit

Permalink
showing mouse button
Browse files Browse the repository at this point in the history
  • Loading branch information
thejoshwolfe committed Jun 1, 2011
1 parent 48f206e commit f127d70
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.go
Expand Up @@ -13,7 +13,7 @@ func main() {
if screen == nil {
panic(sdl.GetError())
}
sdl.WM_SetCaption("Blokus (Caption)", "")
sdl.WM_SetCaption("Blokus", "")

running := true
for running {
Expand Down Expand Up @@ -44,7 +44,7 @@ func main() {
fmt.Printf("Type: %02x Which: %02x State: %02x Pad: %02x\n", k.Type, k.Which, k.State, k.Pad0[0])
fmt.Printf("Scancode: %02x Sym: %08x Mod: %04x Unicode: %04x\n", k.Keysym.Scancode, k.Keysym.Sym, k.Keysym.Mod, k.Keysym.Unicode)
case sdl.MOUSEBUTTONDOWN:
println("Click:", e.MouseButton().X, e.MouseButton().Y)
println("Click:", e.MouseButton().Button, e.MouseButton().X, e.MouseButton().Y)
case sdl.VIDEORESIZE:
println("resize screen ", e.Resize().W, e.Resize().H)

Expand All @@ -57,7 +57,7 @@ func main() {
}
}

screen.FillRect(nil, 0x302019)
screen.FillRect(nil, 0xa0a0a0)

screen.Flip()
sdl.Delay(25)
Expand Down

0 comments on commit f127d70

Please sign in to comment.