Skip to content
This repository has been archived by the owner on Oct 1, 2022. It is now read-only.

Commit

Permalink
Add normal speed button to Android app in-game menu
Browse files Browse the repository at this point in the history
  • Loading branch information
andreas-eberle committed Jun 18, 2017
1 parent 609d99a commit a1bc0e0
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -375,11 +375,16 @@ void slowerClicked() {
actionControls.fireAction(new Action(EActionType.SPEED_SLOWER));
}

@OptionsItem(R.id.menu_item_fast)
void fastClicked() {
@OptionsItem(R.id.menu_item_fast_speed)
void fastSpeedClicked() {
actionControls.fireAction(new Action(EActionType.SPEED_FAST));
}

@OptionsItem(R.id.menu_item_normal_speed)
void normalSpeedClicked() {
actionControls.fireAction(new Action(EActionType.SPEED_NORMAL));
}

@OptionsItem(R.id.menu_item_skip_one_minute)
void skipOneMinuteClicked() {
actionControls.fireAction(new Action(EActionType.FAST_FORWARD));
Expand Down
7 changes: 6 additions & 1 deletion jsettlers.main.android/src/main/res/menu/game.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,15 @@
android:orderInCategory="40"
app:showAsAction="never"/>
<item
android:id="@+id/menu_item_fast"
android:id="@+id/menu_item_fast_speed"
android:title="@string/fast"
android:orderInCategory="50"
app:showAsAction="never"/>
<item
android:id="@+id/menu_item_normal_speed"
android:title="@string/normal"
android:orderInCategory="50"
app:showAsAction="never"/>
<item
android:id="@+id/menu_item_skip_one_minute"
android:title="@string/skip_1_minute"
Expand Down
1 change: 1 addition & 0 deletions jsettlers.main.android/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,6 @@
<string name="goods">Waren</string>
<string name="settlers">Siedler</string>
<string name="multiplayer_not_all_players_ready">Alle Spieler müssen bereit sein um das Spiel zu starten.</string>
<string name="normal">Normale Geschwindigkeit</string>

</resources>
16 changes: 16 additions & 0 deletions jsettlers.main.android/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2017
~
~ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
~ to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
~ and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
~
~ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
~
~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
~ DEALINGS IN THE SOFTWARE.
-->

<resources>
<string name="app_name">JSettlers</string>
<string name="please_wait">Please wait</string>
Expand Down Expand Up @@ -128,4 +143,5 @@
<string name="goods">Goods</string>
<string name="settlers">Settlers</string>
<string name="multiplayer_not_all_players_ready">All players must be ready to start the match.</string>
<string name="normal">Normal Speed</string>
</resources>

0 comments on commit a1bc0e0

Please sign in to comment.