Skip to content

Commit

Permalink
Merge pull request #6 from jcarolus/feature/puzzle_navigation
Browse files Browse the repository at this point in the history
Feature/puzzle navigation
  • Loading branch information
jcarolus committed Aug 30, 2014
2 parents 14830b1 + 41d9558 commit 4baa792
Show file tree
Hide file tree
Showing 6 changed files with 196 additions and 175 deletions.
350 changes: 176 additions & 174 deletions gen/jwtc/android/chess/R.java

Large diffs are not rendered by default.

Binary file modified native/project/jni/chess
Binary file not shown.
2 changes: 1 addition & 1 deletion native/project/jni/chess-jni.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ static JNINativeMethod sMethods[] = {
{"isLegalPosition", "()I", (void*)Java_jwtc_chess_JNI_isLegalPosition},
{"isAmbiguousCastle", "(II)I", (void*)Java_jwtc_chess_JNI_isAmbiguousCastle},
{"doCastleMove", "(II)I", (void*)Java_jwtc_chess_JNI_doCastleMove},
{"toFEN", "()Ljava/lang/String;", (void*)JNICALL Java_jwtc_chess_JNI_toFEN},
{"toFEN", "()Ljava/lang/String;", (void*)Java_jwtc_chess_JNI_toFEN},
{"removePiece", "(II)V", (void*)Java_jwtc_chess_JNI_removePiece},
{"getHashKey", "()J", (void*)Java_jwtc_chess_JNI_getHashKey},
{"loadDB", "(Ljava/lang/String;I)V", (void*)Java_jwtc_chess_JNI_loadDB},
Expand Down
2 changes: 2 additions & 0 deletions res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
<string name="pref_icscustomcommand_desc">Create your own custom commands</string>
<string name="pref_icsautosought">Auto sought</string>
<string name="pref_icsautosought_desc">Refresh the challenges screen automatically</string>
<string name="pref_puzzle_show_seekbar">Show seek bar</string>
<string name="pref_puzzle_show_seekbar_desc">Quickly navigate through puzzles with seek bar</string>

<string name="button_play">Play</string>
<string name="button_undo">Undo</string>
Expand Down
9 changes: 9 additions & 0 deletions res/xml/globalprefs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,15 @@
android:entryValues="@array/UCIArray" />
-->
</PreferenceCategory>

<PreferenceCategory android:title="Puzzle settings">
<CheckBoxPreference
android:title="@string/pref_puzzle_show_seekbar"
android:defaultValue="true"
android:summary="@string/pref_puzzle_show_seekbar_desc"
android:key="PuzzleShowSeekBar" />
</PreferenceCategory>

<PreferenceCategory android:title="Play online settings">
<CheckBoxPreference
android:title="@string/pref_icsconfirmmove"
Expand Down
8 changes: 8 additions & 0 deletions src/jwtc/android/chess/puzzle/ChessViewPuzzle.java
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,14 @@ public void OnPause(SharedPreferences.Editor editor){
public void OnResume(final SharedPreferences prefs){
super.OnResume();

if(prefs.getBoolean("PuzzleShowSeekBar", true)){
_seekBar.setVisibility(View.VISIBLE);

} else {
_seekBar.setVisibility(View.GONE);

}

_view.OnResume();

ChessImageView._colorScheme = prefs.getInt("ColorScheme", 0);
Expand Down

0 comments on commit 4baa792

Please sign in to comment.