mirror of
https://github.com/etlegacy/JoyStick.git
synced 2024-11-10 06:42:15 +00:00
Update README.md
This commit is contained in:
parent
9966addd39
commit
7b29374231
1 changed files with 8 additions and 1 deletions
|
@ -18,6 +18,7 @@ JoyStick with Image for button<br>
|
||||||
|
|
||||||
<H2>Usage</H2>
|
<H2>Usage</H2>
|
||||||
Gradle Import: jcenter <br>
|
Gradle Import: jcenter <br>
|
||||||
|
|
||||||
```groovy
|
```groovy
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
|
@ -34,12 +35,15 @@ dependencies {
|
||||||
compile 'com.github.erz05:JoyStick:1.1.0'
|
compile 'com.github.erz05:JoyStick:1.1.0'
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
<H2>v1.1.0 BREAKING CHANGE!</H2>
|
<H2>v1.1.0 BREAKING CHANGE!</H2>
|
||||||
|
|
||||||
1. Made changes to JoyStickListener<br>
|
1. Made changes to JoyStickListener<br>
|
||||||
a. Added Direction to onMove<br>
|
a. Added Direction to onMove<br>
|
||||||
b. Added Event calls for onTap and onDoubleTap<br>
|
b. Added Event calls for onTap and onDoubleTap<br>
|
||||||
|
|
||||||
<H2>Defaults:</H2>
|
<H2>Defaults:</H2>
|
||||||
|
|
||||||
1. Background = White
|
1. Background = White
|
||||||
2. Button = Red
|
2. Button = Red
|
||||||
3. Button Radius = 25%
|
3. Button Radius = 25%
|
||||||
|
@ -77,6 +81,7 @@ JoyStick joyStick = new JoyStick(context);
|
||||||
```
|
```
|
||||||
|
|
||||||
<H2>JoyStickListener:</H2>
|
<H2>JoyStickListener:</H2>
|
||||||
|
|
||||||
```java
|
```java
|
||||||
//JoyStickListener Interface
|
//JoyStickListener Interface
|
||||||
public interface JoyStickListener {
|
public interface JoyStickListener {
|
||||||
|
@ -104,6 +109,7 @@ joyStick.setListener(this);
|
||||||
9. DIRECTION_DOWN_LEFT = 7
|
9. DIRECTION_DOWN_LEFT = 7
|
||||||
|
|
||||||
To get JoyStick direction you can use
|
To get JoyStick direction you can use
|
||||||
|
|
||||||
```java
|
```java
|
||||||
joyStick.getDirection();
|
joyStick.getDirection();
|
||||||
```
|
```
|
||||||
|
@ -116,11 +122,13 @@ or get it from the JoyStickListener
|
||||||
4. TYPE_2_AXIS_UP_DOWN
|
4. TYPE_2_AXIS_UP_DOWN
|
||||||
|
|
||||||
To set Axis Type:
|
To set Axis Type:
|
||||||
|
|
||||||
```java
|
```java
|
||||||
joyStick.setType(JoyStick.TYPE_4_AXIS);
|
joyStick.setType(JoyStick.TYPE_4_AXIS);
|
||||||
```
|
```
|
||||||
|
|
||||||
<H2>Getters/Setters</H2>
|
<H2>Getters/Setters</H2>
|
||||||
|
|
||||||
```java
|
```java
|
||||||
//Set GamePad Color
|
//Set GamePad Color
|
||||||
joyStick.setPadColor(Color.BLACK);
|
joyStick.setPadColor(Color.BLACK);
|
||||||
|
@ -164,4 +172,3 @@ joyStick.getAngleDegrees();
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue