doc: Update comments about gamepad platforms

Now Safari and Edge can treat Gamepad API.
This commit is contained in:
Hajime Hoshi 2017-10-27 11:07:05 +09:00
parent 7bcc9ee79f
commit fa43bc73d8
4 changed files with 8 additions and 8 deletions

View File

@ -14,7 +14,7 @@ A simple 2D game library in Go
* [iOS](https://github.com/hajimehoshi/ebiten/wiki/iOS)
* [Web browsers (Chrome, Firefox, Safari and Edge on desktops)](https://github.com/hajimehoshi/ebiten/wiki/Web-Browsers) (powered by [GopherJS](http://gopherjs.org/))
Note: Gamepad is not available on Safari/Android/iOS. Keyboard is not available on Android/iOS.
Note: Gamepad and keyboard are not available on Android/iOS.
## Features

View File

@ -46,7 +46,7 @@
<dt class="col-2 text-right">Web browsers</dt>
<dd class="col-10"><a href="https://github.com/hajimehoshi/ebiten/wiki/Web-Browsers">Chrome, Firefox, Safari and Edge on desktops</a> (powered by <a href="https://github.com/gopherjs/gopherjs">GopherJS</a>)</dd>
</dl>
<p><small>Note: Gamepads is not available on Safari/Android/iOS. Keyboard is not available on Android/iOS.</small></p>
<p><small>Note: Gamepads and keyboard are not available on Android/iOS.</small></p>
<h2 id="features">Features</h2>
<dl class="row">

View File

@ -46,7 +46,7 @@
<dt class="col-2 text-right">Web browsers</dt>
<dd class="col-10"><a href="https://github.com/hajimehoshi/ebiten/wiki/Web-Browsers">Chrome, Firefox, Safari and Edge on desktops</a> (powered by <a href="https://github.com/gopherjs/gopherjs">GopherJS</a>)</dd>
</dl>
<p><small>Note: Gamepads is not available on Safari/Android/iOS. Keyboard is not available on Android/iOS.</small></p>
<p><small>Note: Gamepads and keyboard are not available on Android/iOS.</small></p>
<h2 id="features">Features</h2>
<dl class="row">

View File

@ -60,7 +60,7 @@ func IsMouseButtonPressed(mouseButton MouseButton) bool {
//
// This function is concurrent-safe.
//
// NOTE: Gamepad API is available only on desktops, Chrome and Firefox.
// This function always returns an empty slice on mobiles.
func GamepadIDs() []int {
return ui.CurrentInput().GamepadIDs()
}
@ -69,7 +69,7 @@ func GamepadIDs() []int {
//
// This function is concurrent-safe.
//
// NOTE: Gamepad API is available only on desktops, Chrome and Firefox.
// This function always returns 0 on mobiles.
func GamepadAxisNum(id int) int {
return ui.CurrentInput().GamepadAxisNum(id)
}
@ -78,7 +78,7 @@ func GamepadAxisNum(id int) int {
//
// This function is concurrent-safe.
//
// NOTE: Gamepad API is available only on desktops, Chrome and Firefox.
// This function always returns 0 on mobiles.
func GamepadAxis(id int, axis int) float64 {
return ui.CurrentInput().GamepadAxis(id, axis)
}
@ -87,7 +87,7 @@ func GamepadAxis(id int, axis int) float64 {
//
// This function is concurrent-safe.
//
// NOTE: Gamepad API is available only on desktops, Chrome and Firefox.
// This function always returns 0 on mobiles.
func GamepadButtonNum(id int) int {
return ui.CurrentInput().GamepadButtonNum(id)
}
@ -100,7 +100,7 @@ func GamepadButtonNum(id int) int {
// There can be differences even between Chrome and Firefox.
// Don't assume that returned values are always same when same buttons are pressed.
//
// NOTE: Gamepad API is available only on desktops, Chrome and Firefox.
// This function always returns false on mobiles.
func IsGamepadButtonPressed(id int, button GamepadButton) bool {
return ui.CurrentInput().IsGamepadButtonPressed(id, ui.GamepadButton(button))
}