gamepad.go (5600B)
1 // Copyright 2015 Hajime Hoshi 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 package ebiten 16 17 import ( 18 "github.com/hajimehoshi/ebiten/v2/internal/driver" 19 ) 20 21 // GamepadButton represents a gamepad button. 22 type GamepadButton = driver.GamepadButton 23 24 // GamepadButtons 25 const ( 26 GamepadButton0 GamepadButton = driver.GamepadButton0 27 GamepadButton1 GamepadButton = driver.GamepadButton1 28 GamepadButton2 GamepadButton = driver.GamepadButton2 29 GamepadButton3 GamepadButton = driver.GamepadButton3 30 GamepadButton4 GamepadButton = driver.GamepadButton4 31 GamepadButton5 GamepadButton = driver.GamepadButton5 32 GamepadButton6 GamepadButton = driver.GamepadButton6 33 GamepadButton7 GamepadButton = driver.GamepadButton7 34 GamepadButton8 GamepadButton = driver.GamepadButton8 35 GamepadButton9 GamepadButton = driver.GamepadButton9 36 GamepadButton10 GamepadButton = driver.GamepadButton10 37 GamepadButton11 GamepadButton = driver.GamepadButton11 38 GamepadButton12 GamepadButton = driver.GamepadButton12 39 GamepadButton13 GamepadButton = driver.GamepadButton13 40 GamepadButton14 GamepadButton = driver.GamepadButton14 41 GamepadButton15 GamepadButton = driver.GamepadButton15 42 GamepadButton16 GamepadButton = driver.GamepadButton16 43 GamepadButton17 GamepadButton = driver.GamepadButton17 44 GamepadButton18 GamepadButton = driver.GamepadButton18 45 GamepadButton19 GamepadButton = driver.GamepadButton19 46 GamepadButton20 GamepadButton = driver.GamepadButton20 47 GamepadButton21 GamepadButton = driver.GamepadButton21 48 GamepadButton22 GamepadButton = driver.GamepadButton22 49 GamepadButton23 GamepadButton = driver.GamepadButton23 50 GamepadButton24 GamepadButton = driver.GamepadButton24 51 GamepadButton25 GamepadButton = driver.GamepadButton25 52 GamepadButton26 GamepadButton = driver.GamepadButton26 53 GamepadButton27 GamepadButton = driver.GamepadButton27 54 GamepadButton28 GamepadButton = driver.GamepadButton28 55 GamepadButton29 GamepadButton = driver.GamepadButton29 56 GamepadButton30 GamepadButton = driver.GamepadButton30 57 GamepadButton31 GamepadButton = driver.GamepadButton31 58 GamepadButtonMax GamepadButton = GamepadButton31 59 ) 60 61 // StandardGamepadButton represents a gamepad button in the standard layout. 62 // 63 // The layout and the button values are based on the web standard. 64 // See https://www.w3.org/TR/gamepad/#remapping. 65 type StandardGamepadButton = driver.StandardGamepadButton 66 67 // StandardGamepadButtons 68 const ( 69 StandardGamepadButtonRightBottom StandardGamepadButton = driver.StandardGamepadButtonRightBottom 70 StandardGamepadButtonRightRight StandardGamepadButton = driver.StandardGamepadButtonRightRight 71 StandardGamepadButtonRightLeft StandardGamepadButton = driver.StandardGamepadButtonRightLeft 72 StandardGamepadButtonRightTop StandardGamepadButton = driver.StandardGamepadButtonRightTop 73 StandardGamepadButtonFrontTopLeft StandardGamepadButton = driver.StandardGamepadButtonFrontTopLeft 74 StandardGamepadButtonFrontTopRight StandardGamepadButton = driver.StandardGamepadButtonFrontTopRight 75 StandardGamepadButtonFrontBottomLeft StandardGamepadButton = driver.StandardGamepadButtonFrontBottomLeft 76 StandardGamepadButtonFrontBottomRight StandardGamepadButton = driver.StandardGamepadButtonFrontBottomRight 77 StandardGamepadButtonCenterLeft StandardGamepadButton = driver.StandardGamepadButtonCenterLeft 78 StandardGamepadButtonCenterRight StandardGamepadButton = driver.StandardGamepadButtonCenterRight 79 StandardGamepadButtonLeftStick StandardGamepadButton = driver.StandardGamepadButtonLeftStick 80 StandardGamepadButtonRightStick StandardGamepadButton = driver.StandardGamepadButtonRightStick 81 StandardGamepadButtonLeftTop StandardGamepadButton = driver.StandardGamepadButtonLeftTop 82 StandardGamepadButtonLeftBottom StandardGamepadButton = driver.StandardGamepadButtonLeftBottom 83 StandardGamepadButtonLeftLeft StandardGamepadButton = driver.StandardGamepadButtonLeftLeft 84 StandardGamepadButtonLeftRight StandardGamepadButton = driver.StandardGamepadButtonLeftRight 85 StandardGamepadButtonCenterCenter StandardGamepadButton = driver.StandardGamepadButtonCenterCenter 86 StandardGamepadButtonMax StandardGamepadButton = StandardGamepadButtonCenterCenter 87 ) 88 89 // StandardGamepadAxis represents a gamepad axis in the standard layout. 90 // 91 // The layout and the button values are based on the web standard. 92 // See https://www.w3.org/TR/gamepad/#remapping. 93 type StandardGamepadAxis = driver.StandardGamepadAxis 94 95 // StandardGamepadAxes 96 const ( 97 StandardGamepadAxisLeftStickHorizontal StandardGamepadAxis = driver.StandardGamepadAxisLeftStickHorizontal 98 StandardGamepadAxisLeftStickVertical StandardGamepadAxis = driver.StandardGamepadAxisLeftStickVertical 99 StandardGamepadAxisRightStickHorizontal StandardGamepadAxis = driver.StandardGamepadAxisRightStickHorizontal 100 StandardGamepadAxisRightStickVertical StandardGamepadAxis = driver.StandardGamepadAxisRightStickVertical 101 StandardGamepadAxisMax StandardGamepadAxis = StandardGamepadAxisRightStickVertical 102 )