Added settings screen, even if the look has to be polished and new items have to be added

The toolshop-button and the settings-button in the topBar now consist of icons (no text). Bad thing is, that the 'disabled' state doesn't look that good
Every screen is given its caller when flipped to. At OnBackKeyDown you can now either 'flipToCaller()' or 'flipToPreviousScreenInTree()' or as you wish...
This commit is contained in:
= 2017-09-10 15:10:40 +02:00
parent 74b73bb143
commit bd38883299
22 changed files with 1080 additions and 964 deletions

View File

@ -456,7 +456,7 @@ public final class R {
public static final int abc_textfield_search_activated_mtrl_alpha = 0x7f020042;
public static final int abc_textfield_search_default_mtrl_alpha = 0x7f020043;
public static final int abc_textfield_search_material = 0x7f020044;
public static final int notification_template_icon_bg = 0x7f02008a;
public static final int notification_template_icon_bg = 0x7f020090;
}
public static final class id {
public static final int action0 = 0x7f0e006c;
@ -597,7 +597,7 @@ public final class R {
public static final int select_dialog_item_material = 0x7f040029;
public static final int select_dialog_multichoice_material = 0x7f04002a;
public static final int select_dialog_singlechoice_material = 0x7f04002b;
public static final int support_simple_spinner_dropdown_item = 0x7f04002e;
public static final int support_simple_spinner_dropdown_item = 0x7f04002f;
}
public static final class string {
public static final int abc_action_bar_home_description = 0x7f070000;

File diff suppressed because it is too large Load Diff

View File

@ -19,6 +19,10 @@
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\tutorial_place_ramp_air_1.png",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\src\\main\\res\\drawable\\tutorial_place_ramp_air_1.png"
},
{
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\shop.png",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\src\\main\\res\\drawable\\shop.png"
},
{
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\abc_btn_borderless_material.xml",
"source": "C:\\Users\\Julian\\.android\\build-cache\\2232000db64551c7682d41127fbc27c912efcc3d\\output\\res\\drawable\\abc_btn_borderless_material.xml"
@ -75,6 +79,10 @@
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\abc_edit_text_material.xml",
"source": "C:\\Users\\Julian\\.android\\build-cache\\2232000db64551c7682d41127fbc27c912efcc3d\\output\\res\\drawable\\abc_edit_text_material.xml"
},
{
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\xml_selector_settingsbutton.xml",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\src\\main\\res\\drawable\\xml_selector_settingsbutton.xml"
},
{
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\abc_item_background_holo_light.xml",
"source": "C:\\Users\\Julian\\.android\\build-cache\\2232000db64551c7682d41127fbc27c912efcc3d\\output\\res\\drawable\\abc_item_background_holo_light.xml"
@ -151,6 +159,10 @@
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\obstacles_cave.png",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\src\\main\\res\\drawable\\obstacles_cave.png"
},
{
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\xml_selector_shopbutton.xml",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\src\\main\\res\\drawable\\xml_selector_shopbutton.xml"
},
{
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\tools_bomb.png",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\src\\main\\res\\drawable\\tools_bomb.png"
@ -159,6 +171,10 @@
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\abc_cab_background_internal_bg.xml",
"source": "C:\\Users\\Julian\\.android\\build-cache\\2232000db64551c7682d41127fbc27c912efcc3d\\output\\res\\drawable\\abc_cab_background_internal_bg.xml"
},
{
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\settings_disabled.png",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\src\\main\\res\\drawable\\settings_disabled.png"
},
{
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\tutorial_toolshop_all_tools.png",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\src\\main\\res\\drawable\\tutorial_toolshop_all_tools.png"
@ -351,6 +367,10 @@
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\tools_magnetbutton.png",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\src\\main\\res\\drawable\\tools_magnetbutton.png"
},
{
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\settings.png",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\src\\main\\res\\drawable\\settings.png"
},
{
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\backgrounds_game_cave.png",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\src\\main\\res\\drawable\\backgrounds_game_cave.png"
@ -359,6 +379,10 @@
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\previews_grass.png",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\src\\main\\res\\drawable\\previews_grass.png"
},
{
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\shop_disabled.png",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\src\\main\\res\\drawable\\shop_disabled.png"
},
{
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\abc_item_background_holo_dark.xml",
"source": "C:\\Users\\Julian\\.android\\build-cache\\2232000db64551c7682d41127fbc27c912efcc3d\\output\\res\\drawable\\abc_item_background_holo_dark.xml"

View File

@ -3,22 +3,22 @@
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\layout\\levels.xml",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\src\\main\\res\\layout\\levels.xml"
},
{
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\layout\\toolshop.xml",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\src\\main\\res\\layout\\toolshop.xml"
},
{
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\layout\\tutorial.xml",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\src\\main\\res\\layout\\tutorial.xml"
},
{
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\layout\\abc_screen_simple_overlay_action_mode.xml",
"source": "C:\\Users\\Julian\\.android\\build-cache\\2232000db64551c7682d41127fbc27c912efcc3d\\output\\res\\layout\\abc_screen_simple_overlay_action_mode.xml"
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\layout\\toolshop.xml",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\src\\main\\res\\layout\\toolshop.xml"
},
{
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\layout\\worlds.xml",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\src\\main\\res\\layout\\worlds.xml"
},
{
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\layout\\abc_screen_simple_overlay_action_mode.xml",
"source": "C:\\Users\\Julian\\.android\\build-cache\\2232000db64551c7682d41127fbc27c912efcc3d\\output\\res\\layout\\abc_screen_simple_overlay_action_mode.xml"
},
{
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\layout\\abc_screen_simple.xml",
"source": "C:\\Users\\Julian\\.android\\build-cache\\2232000db64551c7682d41127fbc27c912efcc3d\\output\\res\\layout\\abc_screen_simple.xml"
@ -227,6 +227,10 @@
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\layout\\gl_test_screen.xml",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\src\\main\\res\\layout\\gl_test_screen.xml"
},
{
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\layout\\settings.xml",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\src\\main\\res\\layout\\settings.xml"
},
{
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\layout\\abc_action_menu_item_layout.xml",
"source": "C:\\Users\\Julian\\.android\\build-cache\\2232000db64551c7682d41127fbc27c912efcc3d\\output\\res\\layout\\abc_action_menu_item_layout.xml"

File diff suppressed because one or more lines are too long

View File

@ -3,16 +3,14 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<ToggleButton
android:id="@+id/startscreen_sound"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignEnd="@+id/startscreen_play"
<Button
android:id="@+id/startscreen_settings"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
android:layout_alignRight="@+id/startscreen_play"
android:background="@drawable/xml_selector_sound"
android:textOff=""
android:textOn=""/>
android:background="@drawable/xml_selector_settingsbutton"
android:layout_marginBottom="15dp"/>
<Button
android:id="@+id/startscreen_play"

View File

@ -14,8 +14,8 @@
android:layout_centerVertical="true"
android:layout_marginEnd="20dp"
android:layout_marginStart="5dp"
android:orientation="vertical"
android:clipChildren="false">
android:clipChildren="false"
android:orientation="vertical">
<TextView
android:id="@+id/topbar_leveldisplay"
@ -42,15 +42,15 @@
android:background="@drawable/currency_star"/>
<ImageView
android:id="@+id/topbar_energyview"
android:layout_width="40dp"
android:layout_height="40dp"
android:background="@drawable/currency_energy"
android:layout_centerVertical="true"
android:layout_toRightOf="@+id/topbar_starcount"
android:layout_toEndOf="@+id/topbar_starcount"
android:layout_marginLeft="20dp"
android:layout_marginStart="20dp"
android:id="@+id/topbar_energyview"/>
android:layout_toEndOf="@+id/topbar_starcount"
android:layout_toRightOf="@+id/topbar_starcount"
android:background="@drawable/currency_energy"/>
<TextView
android:id="@+id/topbar_starcount"
@ -70,59 +70,44 @@
android:text="@string/number_placeholder"
android:textSize="25sp"/>
<ToggleButton
android:id="@+id/topbar_soundtoggle"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_alignParentTop="true"
<Button
android:id="@+id/topbar_settings"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_centerVertical="true"
android:layout_margin="5dp"
android:layout_marginRight="20dp"
android:layout_toLeftOf="@+id/topbar_toolshop"
android:layout_toStartOf="@+id/topbar_toolshop"
android:background="@drawable/xml_selector_sound"
android:textOff=""
android:textOn=""/>
android:background="@drawable/xml_selector_settingsbutton"/>
<Button
android:id="@+id/topbar_toolshop"
style="@style/GameButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginRight="5dp"
android:text="@string/topbar_toolshop"/>
android:background="@drawable/xml_selector_shopbutton"/>
<TextView
android:id="@+id/topbar_starcount_decrease"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/number_placeholder"
android:visibility="invisible"
android:textSize="20sp"
android:layout_alignEnd="@+id/topbar_starcount"
android:layout_centerVertical="true"
android:layout_alignEnd="@+id/topbar_starcount"/>
android:text="@string/number_placeholder"
android:textSize="20sp"
android:visibility="invisible"/>
<TextView
android:id="@+id/topbar_energycount_decrease"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/number_placeholder"
android:visibility="invisible"
android:textSize="20sp"
android:layout_alignEnd="@+id/topbar_energycount"
android:layout_centerVertical="true"
android:layout_alignEnd="@+id/topbar_energycount"/>
<Button
android:id="@+id/topbar_resetButton"
style="@style/GameButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/topbar_reset"
android:layout_marginLeft="64dp"
android:layout_marginStart="64dp"
android:layout_alignBaseline="@+id/topbar_soundtoggle"
android:layout_alignBottom="@+id/topbar_soundtoggle"
android:layout_toRightOf="@+id/topbar_energycount"
android:layout_toEndOf="@+id/topbar_energycount"/>
android:text="@string/number_placeholder"
android:textSize="20sp"
android:visibility="invisible"/>
</RelativeLayout>

View File

@ -257,6 +257,7 @@
<string name="pre_start_screen_loading">LOADING...</string>
<string name="price_button_buy">Buy</string>
<string name="price_button_upgrade">Upgrade</string>
<string name="settings_reset">Reset</string>
<string name="short_menu_continue">Continue</string>
<string name="short_menu_exit">Exit</string>
<string name="short_menu_restart">Restart</string>
@ -280,7 +281,6 @@
<string name="tool_upgrade_value_max">Max.</string>
<string name="topbar_level_format_d">Level: %d</string>
<string name="topbar_level_placeholder">Level: 24</string>
<string name="topbar_reset">Reset</string>
<string name="topbar_toolshop">Toolshop</string>
<string name="tutorial_leveled_up">Congratulations!!!\nYou have leveled up!</string>
<string name="tutorial_place_ramp_air">You can even set a Tool in mid-air.\nTry it out!</string>

View File

@ -486,7 +486,7 @@ int drawable guis_sound_on 0x7f020056
int drawable lock_locked 0x7f020057
int drawable lock_unlocked 0x7f020058
int drawable magnet_field 0x7f020059
int drawable notification_template_icon_bg 0x7f02008a
int drawable notification_template_icon_bg 0x7f020090
int drawable obstacles_cave 0x7f02005a
int drawable obstacles_grass 0x7f02005b
int drawable obstacles_mountains 0x7f02005c
@ -498,43 +498,49 @@ int drawable playershapes_smiley 0x7f020061
int drawable previews_grass 0x7f020062
int drawable purple 0x7f020063
int drawable radius 0x7f020064
int drawable splitter 0x7f020065
int drawable terrain_c_grass 0x7f020066
int drawable terrain_t_grass 0x7f020067
int drawable tick 0x7f020068
int drawable tip_icon 0x7f020069
int drawable tools_bomb 0x7f02006a
int drawable tools_bombbutton 0x7f02006b
int drawable tools_emptybutton 0x7f02006c
int drawable tools_lockedbutton 0x7f02006d
int drawable tools_magnet 0x7f02006e
int drawable tools_magnetbutton 0x7f02006f
int drawable tools_ramp 0x7f020070
int drawable tools_rampbutton 0x7f020071
int drawable tools_spring 0x7f020072
int drawable tools_springbutton 0x7f020073
int drawable tools_unlockedbutton 0x7f020074
int drawable tutorial_place_ramp_air_1 0x7f020075
int drawable tutorial_place_ramp_gap 0x7f020076
int drawable tutorial_place_ramp_obstacle 0x7f020077
int drawable tutorial_place_tools 0x7f020078
int drawable tutorial_to_toolshop 0x7f020079
int drawable tutorial_toolbar 0x7f02007a
int drawable tutorial_toolshop_all_tools 0x7f02007b
int drawable tutorial_toolshop_equip_spring 0x7f02007c
int drawable tutorial_toolshop_inspector 0x7f02007d
int drawable tutorial_toolshop_select_buy_spring 0x7f02007e
int drawable tutorial_toolshop_toolbar 0x7f02007f
int drawable xml_background_bountymessage 0x7f020080
int drawable xml_background_levelbutton 0x7f020081
int drawable xml_background_toolslot 0x7f020082
int drawable xml_background_toolupgrade 0x7f020083
int drawable xml_background_tutorialtextview 0x7f020084
int drawable xml_background_worldbutton 0x7f020085
int drawable xml_layers_toolprogressbar 0x7f020086
int drawable xml_selector_gamebutton 0x7f020087
int drawable xml_selector_pricebutton 0x7f020088
int drawable xml_selector_sound 0x7f020089
int drawable settings 0x7f020065
int drawable settings_disabled 0x7f020066
int drawable shop 0x7f020067
int drawable shop_disabled 0x7f020068
int drawable splitter 0x7f020069
int drawable terrain_c_grass 0x7f02006a
int drawable terrain_t_grass 0x7f02006b
int drawable tick 0x7f02006c
int drawable tip_icon 0x7f02006d
int drawable tools_bomb 0x7f02006e
int drawable tools_bombbutton 0x7f02006f
int drawable tools_emptybutton 0x7f020070
int drawable tools_lockedbutton 0x7f020071
int drawable tools_magnet 0x7f020072
int drawable tools_magnetbutton 0x7f020073
int drawable tools_ramp 0x7f020074
int drawable tools_rampbutton 0x7f020075
int drawable tools_spring 0x7f020076
int drawable tools_springbutton 0x7f020077
int drawable tools_unlockedbutton 0x7f020078
int drawable tutorial_place_ramp_air_1 0x7f020079
int drawable tutorial_place_ramp_gap 0x7f02007a
int drawable tutorial_place_ramp_obstacle 0x7f02007b
int drawable tutorial_place_tools 0x7f02007c
int drawable tutorial_to_toolshop 0x7f02007d
int drawable tutorial_toolbar 0x7f02007e
int drawable tutorial_toolshop_all_tools 0x7f02007f
int drawable tutorial_toolshop_equip_spring 0x7f020080
int drawable tutorial_toolshop_inspector 0x7f020081
int drawable tutorial_toolshop_select_buy_spring 0x7f020082
int drawable tutorial_toolshop_toolbar 0x7f020083
int drawable xml_background_bountymessage 0x7f020084
int drawable xml_background_levelbutton 0x7f020085
int drawable xml_background_toolslot 0x7f020086
int drawable xml_background_toolupgrade 0x7f020087
int drawable xml_background_tutorialtextview 0x7f020088
int drawable xml_background_worldbutton 0x7f020089
int drawable xml_layers_toolprogressbar 0x7f02008a
int drawable xml_selector_gamebutton 0x7f02008b
int drawable xml_selector_pricebutton 0x7f02008c
int drawable xml_selector_settingsbutton 0x7f02008d
int drawable xml_selector_shopbutton 0x7f02008e
int drawable xml_selector_sound 0x7f02008f
int id action0 0x7f0e006c
int id action_bar 0x7f0e0041
int id action_bar_activity_content 0x7f0e0000
@ -585,14 +591,14 @@ int id icon 0x7f0e0029
int id ifRoom 0x7f0e001d
int id image 0x7f0e0026
int id imageView 0x7f0e0065
int id imageView4 0x7f0e00bb
int id imageView4 0x7f0e00bd
int id info 0x7f0e0077
int id levelbutton_energy 0x7f0e005c
int id levelbutton_lock 0x7f0e005d
int id levelbutton_star1 0x7f0e0059
int id levelbutton_star2 0x7f0e005a
int id levelbutton_star3 0x7f0e005b
int id levelbutton_starView 0x7f0e00b8
int id levelbutton_starView 0x7f0e00ba
int id levelbutton_textview 0x7f0e0058
int id levels_bottomRow 0x7f0e0061
int id levels_topRow 0x7f0e0060
@ -604,8 +610,8 @@ int id levelup_unlocklist 0x7f0e0066
int id line1 0x7f0e0071
int id line3 0x7f0e0075
int id linearLayout 0x7f0e0079
int id linearLayout3 0x7f0e0087
int id linearLayout4 0x7f0e009d
int id linearLayout3 0x7f0e008a
int id linearLayout4 0x7f0e00a0
int id listMode 0x7f0e0009
int id list_item 0x7f0e0028
int id media_actions 0x7f0e006f
@ -641,11 +647,14 @@ int id search_plate 0x7f0e0049
int id search_src_text 0x7f0e004a
int id search_voice_btn 0x7f0e004e
int id select_dialog_listview 0x7f0e004f
int id settings_reset 0x7f0e007f
int id settings_soundtoggle 0x7f0e007e
int id settings_topbar 0x7f0e007d
int id shortcut 0x7f0e003a
int id shortmenu_continue 0x7f0e007e
int id shortmenu_exit 0x7f0e0080
int id shortmenu_restart 0x7f0e007f
int id shortmenu_topbar 0x7f0e007d
int id shortmenu_continue 0x7f0e0081
int id shortmenu_exit 0x7f0e0083
int id shortmenu_restart 0x7f0e0082
int id shortmenu_topbar 0x7f0e0080
int id showCustom 0x7f0e000f
int id showHome 0x7f0e0010
int id showTitle 0x7f0e0011
@ -654,11 +663,11 @@ int id split_action_bar 0x7f0e0007
int id src_atop 0x7f0e0015
int id src_in 0x7f0e0016
int id src_over 0x7f0e0017
int id startscreen_gain_90_ep 0x7f0e0084
int id startscreen_play 0x7f0e0082
int id startscreen_sound 0x7f0e0081
int id startscreen_to_gl_test_screen 0x7f0e0085
int id startscreen_unlock_levels 0x7f0e0083
int id startscreen_gain_90_ep 0x7f0e0087
int id startscreen_play 0x7f0e0085
int id startscreen_settings 0x7f0e0084
int id startscreen_to_gl_test_screen 0x7f0e0088
int id startscreen_unlock_levels 0x7f0e0086
int id status_bar_latest_event_content 0x7f0e006e
int id submit_area 0x7f0e004c
int id tabMode 0x7f0e000b
@ -668,63 +677,62 @@ int id textSpacerNoButtons 0x7f0e0034
int id time 0x7f0e0072
int id title 0x7f0e002a
int id title_template 0x7f0e002f
int id toolProgressBar 0x7f0e0096
int id toolProgressBarView 0x7f0e0094
int id toolProgressButtonAnimation 0x7f0e0095
int id tool_inspector_imageview 0x7f0e0088
int id tool_inspector_pricebutton 0x7f0e0089
int id tool_inspector_title 0x7f0e0086
int id tool_inspector_toolupgrade0 0x7f0e008a
int id tool_inspector_toolupgrade1 0x7f0e008b
int id tool_upgrade_imageview 0x7f0e0090
int id tool_upgrade_pricebutton 0x7f0e0093
int id tool_upgrade_title 0x7f0e008f
int id tool_upgrade_value_new 0x7f0e0092
int id tool_upgrade_value_old 0x7f0e0091
int id toolbutton_1 0x7f0e0097
int id toolbutton_2 0x7f0e0098
int id toolbutton_3 0x7f0e0099
int id toolbutton_4 0x7f0e009a
int id toolofferslot_slot 0x7f0e008d
int id toolofferslot_title 0x7f0e008c
int id toolshop_slot1 0x7f0e009e
int id toolshop_slot2 0x7f0e009f
int id toolshop_slot3 0x7f0e00a0
int id toolshop_slot4 0x7f0e00a1
int id toolshop_tool_offer_layout 0x7f0e00a2
int id toolshop_toolinspector 0x7f0e009c
int id toolshop_topbar 0x7f0e009b
int id toolslot_image 0x7f0e008e
int id toolProgressBar 0x7f0e0099
int id toolProgressBarView 0x7f0e0097
int id toolProgressButtonAnimation 0x7f0e0098
int id tool_inspector_imageview 0x7f0e008b
int id tool_inspector_pricebutton 0x7f0e008c
int id tool_inspector_title 0x7f0e0089
int id tool_inspector_toolupgrade0 0x7f0e008d
int id tool_inspector_toolupgrade1 0x7f0e008e
int id tool_upgrade_imageview 0x7f0e0093
int id tool_upgrade_pricebutton 0x7f0e0096
int id tool_upgrade_title 0x7f0e0092
int id tool_upgrade_value_new 0x7f0e0095
int id tool_upgrade_value_old 0x7f0e0094
int id toolbutton_1 0x7f0e009a
int id toolbutton_2 0x7f0e009b
int id toolbutton_3 0x7f0e009c
int id toolbutton_4 0x7f0e009d
int id toolofferslot_slot 0x7f0e0090
int id toolofferslot_title 0x7f0e008f
int id toolshop_slot1 0x7f0e00a1
int id toolshop_slot2 0x7f0e00a2
int id toolshop_slot3 0x7f0e00a3
int id toolshop_slot4 0x7f0e00a4
int id toolshop_tool_offer_layout 0x7f0e00a5
int id toolshop_toolinspector 0x7f0e009f
int id toolshop_topbar 0x7f0e009e
int id toolslot_image 0x7f0e0091
int id topPanel 0x7f0e002e
int id topbar_energycount 0x7f0e00aa
int id topbar_energycount_decrease 0x7f0e00ae
int id topbar_energyview 0x7f0e00a9
int id topbar_layout 0x7f0e00a3
int id topbar_leveldisplay 0x7f0e00a5
int id topbar_levellayout 0x7f0e00a4
int id topbar_levelprogress 0x7f0e00a6
int id topbar_resetButton 0x7f0e00af
int id topbar_soundtoggle 0x7f0e00ab
int id topbar_starcount 0x7f0e00a8
int id topbar_starcount_decrease 0x7f0e00ad
int id topbar_starview 0x7f0e00a7
int id topbar_toolshop 0x7f0e00ac
int id tutorial_image_view 0x7f0e00b1
int id tutorial_text_view 0x7f0e00b0
int id unlockmessage_message 0x7f0e00b3
int id unlockmessage_toolimage 0x7f0e00b2
int id topbar_energycount 0x7f0e00ad
int id topbar_energycount_decrease 0x7f0e00b1
int id topbar_energyview 0x7f0e00ab
int id topbar_layout 0x7f0e00a6
int id topbar_leveldisplay 0x7f0e00a8
int id topbar_levellayout 0x7f0e00a7
int id topbar_levelprogress 0x7f0e00a9
int id topbar_settings 0x7f0e00ae
int id topbar_starcount 0x7f0e00ac
int id topbar_starcount_decrease 0x7f0e00b0
int id topbar_starview 0x7f0e00aa
int id topbar_toolshop 0x7f0e00af
int id tutorial_image_view 0x7f0e00b3
int id tutorial_text_view 0x7f0e00b2
int id unlockmessage_message 0x7f0e00b5
int id unlockmessage_toolimage 0x7f0e00b4
int id up 0x7f0e0008
int id useLogo 0x7f0e0012
int id withText 0x7f0e001f
int id worldbutton_energycount 0x7f0e00ba
int id worldbutton_levelcount 0x7f0e00b7
int id worldbutton_lock 0x7f0e00bc
int id worldbutton_preview 0x7f0e00b5
int id worldbutton_starcount 0x7f0e00b9
int id worldbutton_tickView 0x7f0e00b6
int id worldbutton_title 0x7f0e00b4
int id worlds_layout 0x7f0e00be
int id worlds_topbar 0x7f0e00bd
int id worldbutton_energycount 0x7f0e00bc
int id worldbutton_levelcount 0x7f0e00b9
int id worldbutton_lock 0x7f0e00be
int id worldbutton_preview 0x7f0e00b7
int id worldbutton_starcount 0x7f0e00bb
int id worldbutton_tickView 0x7f0e00b8
int id worldbutton_title 0x7f0e00b6
int id worlds_layout 0x7f0e00c0
int id worlds_topbar 0x7f0e00bf
int id wrap_content 0x7f0e0020
int integer abc_config_activityDefaultDur 0x7f0b0001
int integer abc_config_activityShortDur 0x7f0b0002
@ -775,21 +783,22 @@ int layout price_button 0x7f040028
int layout select_dialog_item_material 0x7f040029
int layout select_dialog_multichoice_material 0x7f04002a
int layout select_dialog_singlechoice_material 0x7f04002b
int layout short_menu 0x7f04002c
int layout start_screen 0x7f04002d
int layout support_simple_spinner_dropdown_item 0x7f04002e
int layout tool_inspector 0x7f04002f
int layout tool_offer_slot 0x7f040030
int layout tool_slot 0x7f040031
int layout tool_upgrade 0x7f040032
int layout toolbutton 0x7f040033
int layout toolbuttonbar 0x7f040034
int layout toolshop 0x7f040035
int layout topbar 0x7f040036
int layout tutorial 0x7f040037
int layout unlock_message 0x7f040038
int layout world_button 0x7f040039
int layout worlds 0x7f04003a
int layout settings 0x7f04002c
int layout short_menu 0x7f04002d
int layout start_screen 0x7f04002e
int layout support_simple_spinner_dropdown_item 0x7f04002f
int layout tool_inspector 0x7f040030
int layout tool_offer_slot 0x7f040031
int layout tool_slot 0x7f040032
int layout tool_upgrade 0x7f040033
int layout toolbutton 0x7f040034
int layout toolbuttonbar 0x7f040035
int layout toolshop 0x7f040036
int layout topbar 0x7f040037
int layout tutorial 0x7f040038
int layout unlock_message 0x7f040039
int layout world_button 0x7f04003a
int layout worlds 0x7f04003b
int mipmap ic_launcher 0x7f030000
int raw background 0x7f060000
int raw ramp 0x7f060001
@ -838,30 +847,30 @@ int string percent_placeholder 0x7f07002a
int string pre_start_screen_loading 0x7f07002b
int string price_button_buy 0x7f07002c
int string price_button_upgrade 0x7f07002d
int string short_menu_continue 0x7f07002e
int string short_menu_exit 0x7f07002f
int string short_menu_restart 0x7f070030
int string start_screen_gain_90_ep 0x7f070031
int string start_screen_play 0x7f070032
int string start_screen_to_gl_test_screen 0x7f070033
int string start_screen_unlock_all_levels 0x7f070034
int string settings_reset 0x7f07002e
int string short_menu_continue 0x7f07002f
int string short_menu_exit 0x7f070030
int string short_menu_restart 0x7f070031
int string start_screen_gain_90_ep 0x7f070032
int string start_screen_play 0x7f070033
int string start_screen_to_gl_test_screen 0x7f070034
int string start_screen_unlock_all_levels 0x7f070035
int string status_bar_notification_info_overflow 0x7f070013
int string textview_placeholder 0x7f070035
int string tool_name_bomb 0x7f070036
int string tool_name_magnet 0x7f070037
int string tool_name_ramp 0x7f070038
int string tool_name_spring 0x7f070039
int string tool_name_unknown 0x7f07003a
int string tool_upgrade_force 0x7f07003b
int string tool_upgrade_none 0x7f07003c
int string tool_upgrade_radius 0x7f07003d
int string tool_upgrade_time 0x7f07003e
int string tool_upgrade_title_format_sd 0x7f07003f
int string tool_upgrade_title_placeholder 0x7f070040
int string tool_upgrade_value_max 0x7f070041
int string topbar_level_format_d 0x7f070042
int string topbar_level_placeholder 0x7f070043
int string topbar_reset 0x7f070044
int string textview_placeholder 0x7f070036
int string tool_name_bomb 0x7f070037
int string tool_name_magnet 0x7f070038
int string tool_name_ramp 0x7f070039
int string tool_name_spring 0x7f07003a
int string tool_name_unknown 0x7f07003b
int string tool_upgrade_force 0x7f07003c
int string tool_upgrade_none 0x7f07003d
int string tool_upgrade_radius 0x7f07003e
int string tool_upgrade_time 0x7f07003f
int string tool_upgrade_title_format_sd 0x7f070040
int string tool_upgrade_title_placeholder 0x7f070041
int string tool_upgrade_value_max 0x7f070042
int string topbar_level_format_d 0x7f070043
int string topbar_level_placeholder 0x7f070044
int string topbar_toolshop 0x7f070045
int string tutorial_leveled_up 0x7f070046
int string tutorial_place_ramp_air 0x7f070047

View File

@ -24,7 +24,7 @@ public class GLTestScreen extends GLScreen<RelativeLayout> {
@Override
public void prepareToBeShown() {
glView.setCurrentRendering(rendering);
flipToCaller();
}
@Override

View File

@ -0,0 +1,51 @@
package de.frajul.endlessroll.main.screens;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.ToggleButton;
import de.frajul.endlessroll.R;
import de.frajul.endlessroll.main.GameActivity;
import de.frajul.endlessroll.views.TopBar;
/**
* Created by Julian on 10.09.2017.
*/
public class SettingsScreen extends Screen<LinearLayout> implements View.OnClickListener {
private TopBar topBar;
private ToggleButton soundToggle;
private Button resetButton;
public SettingsScreen(GameActivity gameActivity) {
super(ScreenType.SETTINGS, gameActivity, R.layout.settings);
topBar = super.createTopBar(R.id.settings_topbar);
soundToggle = (ToggleButton) layout.findViewById(R.id.settings_soundtoggle);
soundToggle.setOnClickListener(this);
resetButton = (Button) layout.findViewById(R.id.settings_reset);
resetButton.setOnClickListener(this);
}
@Override
public void prepareToBeShown() {
topBar.update();
soundToggle.setChecked(gameActivity.getSoundManager().isSoundOn());
resetButton.setEnabled(super.caller != ScreenType.GAME);
}
@Override
public void onBackKeyDown() {
flipToCaller();
}
@Override
public void onClick(View v) {
if (v.equals(soundToggle)) {
gameActivity.getSoundManager().setSoundOn(soundToggle.isChecked());
} else if (v.equals(resetButton)) {
gameActivity.resetData();
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" tools:context=".main.GameActivity">
<item android:state_enabled="true">
<bitmap android:src="@drawable/settings_enabled"/>
</item>
<item android:state_enabled="false">
<bitmap android:src="@drawable/settings_disabled"/>
</item>
</selector>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" tools:context=".main.GameActivity">
<item android:state_enabled="true">
<bitmap android:src="@drawable/shop_enabled"/>
</item>
<item android:state_enabled="false">
<bitmap android:src="@drawable/shop_disabled"/>
</item>
</selector>

View File

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/backgrounds_menu_grass"
android:orientation="vertical">
<include
android:id="@+id/settings_topbar"
layout="@layout/topbar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top"/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:orientation="vertical"
android:layout_marginLeft="20dp">
<ToggleButton
android:id="@+id/settings_soundtoggle"
android:layout_width="40dp"
android:layout_height="40dp"
android:background="@drawable/xml_selector_sound"
android:textOff=""
android:textOn=""/>
<Button
android:id="@+id/settings_reset"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
style="@style/GameButton"
android:text="@string/settings_reset"/>
</LinearLayout>
</RelativeLayout>
</LinearLayout>

View File

@ -3,16 +3,14 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<ToggleButton
android:id="@+id/startscreen_sound"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignEnd="@+id/startscreen_play"
<Button
android:id="@+id/startscreen_settings"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
android:layout_alignRight="@+id/startscreen_play"
android:background="@drawable/xml_selector_sound"
android:textOff=""
android:textOn=""/>
android:background="@drawable/xml_selector_settingsbutton"
android:layout_marginBottom="15dp"/>
<Button
android:id="@+id/startscreen_play"

View File

@ -14,8 +14,8 @@
android:layout_centerVertical="true"
android:layout_marginEnd="20dp"
android:layout_marginStart="5dp"
android:orientation="vertical"
android:clipChildren="false">
android:clipChildren="false"
android:orientation="vertical">
<TextView
android:id="@+id/topbar_leveldisplay"
@ -42,15 +42,15 @@
android:background="@drawable/currency_star"/>
<ImageView
android:id="@+id/topbar_energyview"
android:layout_width="40dp"
android:layout_height="40dp"
android:background="@drawable/currency_energy"
android:layout_centerVertical="true"
android:layout_toRightOf="@+id/topbar_starcount"
android:layout_toEndOf="@+id/topbar_starcount"
android:layout_marginLeft="20dp"
android:layout_marginStart="20dp"
android:id="@+id/topbar_energyview"/>
android:layout_toEndOf="@+id/topbar_starcount"
android:layout_toRightOf="@+id/topbar_starcount"
android:background="@drawable/currency_energy"/>
<TextView
android:id="@+id/topbar_starcount"
@ -70,59 +70,44 @@
android:text="@string/number_placeholder"
android:textSize="25sp"/>
<ToggleButton
android:id="@+id/topbar_soundtoggle"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_alignParentTop="true"
<Button
android:id="@+id/topbar_settings"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_centerVertical="true"
android:layout_margin="5dp"
android:layout_marginRight="20dp"
android:layout_toLeftOf="@+id/topbar_toolshop"
android:layout_toStartOf="@+id/topbar_toolshop"
android:background="@drawable/xml_selector_sound"
android:textOff=""
android:textOn=""/>
android:background="@drawable/xml_selector_settingsbutton"/>
<Button
android:id="@+id/topbar_toolshop"
style="@style/GameButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginRight="5dp"
android:text="@string/topbar_toolshop"/>
android:background="@drawable/xml_selector_shopbutton"/>
<TextView
android:id="@+id/topbar_starcount_decrease"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/number_placeholder"
android:visibility="invisible"
android:textSize="20sp"
android:layout_alignEnd="@+id/topbar_starcount"
android:layout_centerVertical="true"
android:layout_alignEnd="@+id/topbar_starcount"/>
android:text="@string/number_placeholder"
android:textSize="20sp"
android:visibility="invisible"/>
<TextView
android:id="@+id/topbar_energycount_decrease"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/number_placeholder"
android:visibility="invisible"
android:textSize="20sp"
android:layout_alignEnd="@+id/topbar_energycount"
android:layout_centerVertical="true"
android:layout_alignEnd="@+id/topbar_energycount"/>
<Button
android:id="@+id/topbar_resetButton"
style="@style/GameButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/topbar_reset"
android:layout_marginLeft="64dp"
android:layout_marginStart="64dp"
android:layout_alignBaseline="@+id/topbar_soundtoggle"
android:layout_alignBottom="@+id/topbar_soundtoggle"
android:layout_toRightOf="@+id/topbar_energycount"
android:layout_toEndOf="@+id/topbar_energycount"/>
android:text="@string/number_placeholder"
android:textSize="20sp"
android:visibility="invisible"/>
</RelativeLayout>

View File

@ -31,7 +31,7 @@
<string name="tool_upgrade_title_placeholder">Time (Lv12)</string>
<string name="topbar_level_placeholder">Level: 24</string>
<string name="topbar_level_format_d">Level: %d</string>
<string name="topbar_reset">Reset</string>
<string name="settings_reset">Reset</string>
<string name="topbar_toolshop">Toolshop</string>
<string name="unlock_message_placeholder">Ramp unlocked</string>
<string name="world_button_title_placeholder">Great world</string>