2014-12-24 03:04:10 +01:00
|
|
|
// Copyright 2014 Hajime Hoshi
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
2014-12-14 08:53:32 +01:00
|
|
|
|
|
|
|
package ebiten
|
|
|
|
|
2015-01-01 17:20:20 +01:00
|
|
|
import (
|
|
|
|
"github.com/hajimehoshi/ebiten/internal/ui"
|
|
|
|
)
|
|
|
|
|
2014-12-14 14:05:44 +01:00
|
|
|
// A Key represents a keyboard key.
|
2014-12-14 08:53:32 +01:00
|
|
|
type Key int
|
|
|
|
|
|
|
|
// TODO: Add more keys.
|
2014-12-14 14:05:44 +01:00
|
|
|
|
2015-01-01 17:20:20 +01:00
|
|
|
// TODO: Generate this automatically.
|
|
|
|
|
2014-12-14 14:05:44 +01:00
|
|
|
// Keys
|
2014-12-14 08:53:32 +01:00
|
|
|
const (
|
2015-01-01 17:20:20 +01:00
|
|
|
KeyUp = Key(ui.KeyUp)
|
|
|
|
KeyDown = Key(ui.KeyDown)
|
|
|
|
KeyLeft = Key(ui.KeyLeft)
|
|
|
|
KeyRight = Key(ui.KeyRight)
|
|
|
|
KeySpace = Key(ui.KeySpace)
|
|
|
|
KeyMax = Key(ui.KeyMax)
|
2014-12-14 08:53:32 +01:00
|
|
|
)
|
|
|
|
|
2014-12-14 14:05:44 +01:00
|
|
|
// A MouseButton represents a mouse button.
|
2014-12-14 08:53:32 +01:00
|
|
|
type MouseButton int
|
|
|
|
|
2014-12-14 14:05:44 +01:00
|
|
|
// MouseButtons
|
2014-12-14 08:53:32 +01:00
|
|
|
const (
|
2015-01-01 17:20:20 +01:00
|
|
|
MouseButtonLeft = MouseButton(ui.MouseButtonLeft)
|
|
|
|
MouseButtonRight = MouseButton(ui.MouseButtonRight)
|
|
|
|
MouseButtonMiddle = MouseButton(ui.MouseButtonMiddle)
|
|
|
|
MouseButtonMax = MouseButton(ui.MouseButtonMax)
|
2014-12-14 08:53:32 +01:00
|
|
|
)
|