diff --git a/app/build/generated/source/r/debug/android/support/v7/appcompat/R.java b/app/build/generated/source/r/debug/android/support/v7/appcompat/R.java
index a10be0d..4968c0b 100644
--- a/app/build/generated/source/r/debug/android/support/v7/appcompat/R.java
+++ b/app/build/generated/source/r/debug/android/support/v7/appcompat/R.java
@@ -456,7 +456,7 @@ public final class R {
public static final int abc_textfield_search_activated_mtrl_alpha = 0x7f070042;
public static final int abc_textfield_search_default_mtrl_alpha = 0x7f070043;
public static final int abc_textfield_search_material = 0x7f070044;
- public static final int notification_template_icon_bg = 0x7f070062;
+ public static final int notification_template_icon_bg = 0x7f070064;
}
public static final class id {
public static final int action0 = 0x7f080000;
@@ -529,29 +529,29 @@ public final class R {
public static final int search_src_text = 0x7f080066;
public static final int search_voice_btn = 0x7f080067;
public static final int select_dialog_listview = 0x7f080068;
- public static final int shortcut = 0x7f080072;
- public static final int showCustom = 0x7f080077;
- public static final int showHome = 0x7f080078;
- public static final int showTitle = 0x7f080079;
- public static final int spacer = 0x7f08007a;
- public static final int split_action_bar = 0x7f08007b;
- public static final int src_atop = 0x7f08007c;
- public static final int src_in = 0x7f08007d;
- public static final int src_over = 0x7f08007e;
- public static final int status_bar_latest_event_content = 0x7f080084;
- public static final int submit_area = 0x7f080085;
- public static final int tabMode = 0x7f080086;
- public static final int text = 0x7f080087;
- public static final int text2 = 0x7f080088;
- public static final int textSpacerNoButtons = 0x7f080089;
- public static final int time = 0x7f08008a;
- public static final int title = 0x7f08008b;
- public static final int title_template = 0x7f08008c;
- public static final int topPanel = 0x7f0800a9;
- public static final int up = 0x7f0800bb;
- public static final int useLogo = 0x7f0800bc;
- public static final int withText = 0x7f0800bd;
- public static final int wrap_content = 0x7f0800c7;
+ public static final int shortcut = 0x7f080078;
+ public static final int showCustom = 0x7f08007d;
+ public static final int showHome = 0x7f08007e;
+ public static final int showTitle = 0x7f08007f;
+ public static final int spacer = 0x7f080080;
+ public static final int split_action_bar = 0x7f080081;
+ public static final int src_atop = 0x7f080082;
+ public static final int src_in = 0x7f080083;
+ public static final int src_over = 0x7f080084;
+ public static final int status_bar_latest_event_content = 0x7f08008a;
+ public static final int submit_area = 0x7f08008b;
+ public static final int tabMode = 0x7f08008c;
+ public static final int text = 0x7f08008d;
+ public static final int text2 = 0x7f08008e;
+ public static final int textSpacerNoButtons = 0x7f08008f;
+ public static final int time = 0x7f080090;
+ public static final int title = 0x7f080091;
+ public static final int title_template = 0x7f080092;
+ public static final int topPanel = 0x7f0800af;
+ public static final int up = 0x7f0800c1;
+ public static final int useLogo = 0x7f0800c2;
+ public static final int withText = 0x7f0800c3;
+ public static final int wrap_content = 0x7f0800cd;
}
public static final class integer {
public static final int abc_config_activityDefaultDur = 0x7f090000;
@@ -597,7 +597,7 @@ public final class R {
public static final int select_dialog_item_material = 0x7f0a0029;
public static final int select_dialog_multichoice_material = 0x7f0a002a;
public static final int select_dialog_singlechoice_material = 0x7f0a002b;
- public static final int support_simple_spinner_dropdown_item = 0x7f0a0032;
+ public static final int support_simple_spinner_dropdown_item = 0x7f0a0033;
}
public static final class string {
public static final int abc_action_bar_home_description = 0x7f0d0000;
@@ -619,7 +619,7 @@ public final class R {
public static final int abc_shareactionprovider_share_with = 0x7f0d0010;
public static final int abc_shareactionprovider_share_with_application = 0x7f0d0011;
public static final int abc_toolbar_collapse_description = 0x7f0d0012;
- public static final int status_bar_notification_info_overflow = 0x7f0d003d;
+ public static final int status_bar_notification_info_overflow = 0x7f0d0046;
}
public static final class style {
public static final int AlertDialog_AppCompat = 0x7f0e0000;
diff --git a/app/build/intermediates/assets/debug/levelpacks/Grasslands.xml b/app/build/intermediates/assets/debug/levelpacks/Grasslands.xml
index 8c339f5..1b68b08 100644
--- a/app/build/intermediates/assets/debug/levelpacks/Grasslands.xml
+++ b/app/build/intermediates/assets/debug/levelpacks/Grasslands.xml
@@ -370,13 +370,13 @@
-
+
-
+
-
+
diff --git a/app/build/intermediates/incremental/mergeDebugResources/merger.xml b/app/build/intermediates/incremental/mergeDebugResources/merger.xml
index 2b7f4fb..2bd27bf 100644
--- a/app/build/intermediates/incremental/mergeDebugResources/merger.xml
+++ b/app/build/intermediates/incremental/mergeDebugResources/merger.xml
@@ -1352,7 +1352,7 @@
- Icy Mountains
- Testcave
- Mysterious fireworld
- #ffda45#891e4e#39be27#ffb405#daf10d#db911c0f#dbfff200#e5dc1522#db41e42b#db494b49#715f5f#60715f#db41e42b#b3d700#f0f41e02#f0f28117#f0d7b106Endless Roll0.0m%.1fm0.0m/s%.1fm/sFps: 00Fps: %d3Level UpGAME OVERYOU DID ITToolsTo menuRestartTry againNext levelLOADING...ContinueRestartExitPlayUnlock all levels (Yes! It\'s magic!)Gain 90 ep (Nope! No magic at all!)Test GL Stuff!!!Time (Lv12)Level: 24Level: %dResetToolshopRamp unlockedGreat world21/15%s%s unlocked!You unlocked a ToolslotLevel: %dBuyUpgradeBallClockHypnoPacmanSmileyRampSpringMagnetBombMushroom%1$s (Lv%2$d)NoneTimeRadiusForceMax.This is a multiline placeholder\nfor all the tutorials I made!!!\nAwesome! - Isn\'t it?Welcome to Endless Roll!\nHave fun!This is the toolbar. Here you can select the tool you currently want to use.You can use the selected tool by clicking on the wanted position on the screen.Now place your ramp in front of the gap!Now place it in front of the obstacle!You can even set a Tool in mid-air.\nTry it out!Now try again!Congratulations!!!\nYou have leveled up!Now go to the toolshop by either clicking on the \'Spring unlocked\' or the toolshop button!Welcome to the toolshop!\nHere you can buy and upgrade all tools and you can customize your toolbar.Right! That is your toolbar.Here you can see all the tools you will be able to buy and use.Here one can buy and upgrade the selected tool.Now select the spring and buy it!Now tip on an unlocked slot of your toolbar to equip the spring!\n(It is the same where the ramp is attached at the moment)\nAfter that you will be able to complete the next level.SunWheelI\'m a text!85.1%Level: %dClick me!997.5Roll up the ramp to gain heightBlow up all obstacles near the bombShoots you in the airDifficult to handle, but if you master it you can do anythingThis will give you super-powers for a few seconds\?\?\?You will unlock this mysterious tool at level %d170dp170dp70dp60dp
\ No newline at end of file
+ 170dp170dp70dp60dp
\ No newline at end of file
diff --git a/app/build/intermediates/symbols/debug/R.txt b/app/build/intermediates/symbols/debug/R.txt
index 8a952c8..a73ffb2 100644
--- a/app/build/intermediates/symbols/debug/R.txt
+++ b/app/build/intermediates/symbols/debug/R.txt
@@ -482,72 +482,76 @@ int drawable currency_energy_empty 0x7f07004d
int drawable currency_star 0x7f07004e
int drawable currency_star_empty 0x7f07004f
int drawable guis_arrow_green 0x7f070050
-int drawable guis_clock 0x7f070051
-int drawable guis_goal 0x7f070052
-int drawable guis_lock_locked 0x7f070053
-int drawable guis_magnet_field 0x7f070054
-int drawable guis_pausebutton 0x7f070055
-int drawable guis_playerarrow 0x7f070056
-int drawable guis_radius 0x7f070057
-int drawable guis_settings_disabled 0x7f070058
-int drawable guis_settings_enabled 0x7f070059
-int drawable guis_shape_shop_disabled 0x7f07005a
-int drawable guis_shape_shop_enabled 0x7f07005b
-int drawable guis_sound_off 0x7f07005c
-int drawable guis_sound_on 0x7f07005d
-int drawable guis_splitter 0x7f07005e
-int drawable guis_tick 0x7f07005f
-int drawable guis_tool_shop_disabled 0x7f070060
-int drawable guis_tool_shop_enabled 0x7f070061
-int drawable notification_template_icon_bg 0x7f070062
-int drawable obstacles_grass 0x7f070063
-int drawable playershapes_ball 0x7f070064
-int drawable playershapes_clock 0x7f070065
-int drawable playershapes_hypno_spiral 0x7f070066
-int drawable playershapes_pacman 0x7f070067
-int drawable playershapes_smiley 0x7f070068
-int drawable playershapes_sun 0x7f070069
-int drawable playershapes_wheel 0x7f07006a
-int drawable terrain_c_grass 0x7f07006b
-int drawable terrain_t_grass 0x7f07006c
-int drawable tools_bomb 0x7f07006d
-int drawable tools_bomb_button 0x7f07006e
-int drawable tools_button_empty 0x7f07006f
-int drawable tools_button_locked 0x7f070070
-int drawable tools_button_unlocked 0x7f070071
-int drawable tools_magnet 0x7f070072
-int drawable tools_magnet_button 0x7f070073
-int drawable tools_power_mushroom 0x7f070074
-int drawable tools_power_mushroom_button 0x7f070075
-int drawable tools_ramp 0x7f070076
-int drawable tools_ramp_button 0x7f070077
-int drawable tools_spring 0x7f070078
-int drawable tools_spring_button 0x7f070079
-int drawable tutorial_place_ramp_air_1 0x7f07007a
-int drawable tutorial_place_ramp_gap 0x7f07007b
-int drawable tutorial_place_ramp_obstacle 0x7f07007c
-int drawable tutorial_place_tools 0x7f07007d
-int drawable tutorial_to_toolshop 0x7f07007e
-int drawable tutorial_toolbar 0x7f07007f
-int drawable tutorial_toolshop_all_tools 0x7f070080
-int drawable tutorial_toolshop_equip_spring 0x7f070081
-int drawable tutorial_toolshop_inspector 0x7f070082
-int drawable tutorial_toolshop_select_buy_spring 0x7f070083
-int drawable tutorial_toolshop_toolbar 0x7f070084
-int drawable world_previews_grass 0x7f070085
-int drawable xml_background_bountymessage 0x7f070086
-int drawable xml_background_levelbutton 0x7f070087
-int drawable xml_background_toolslot 0x7f070088
-int drawable xml_background_toolupgrade 0x7f070089
-int drawable xml_background_tutorialtextview 0x7f07008a
-int drawable xml_background_worldbutton 0x7f07008b
-int drawable xml_layers_toolprogressbar 0x7f07008c
-int drawable xml_selector_gamebutton 0x7f07008d
-int drawable xml_selector_pricebutton 0x7f07008e
-int drawable xml_selector_settingsbutton 0x7f07008f
-int drawable xml_selector_shapeshopbutton 0x7f070090
-int drawable xml_selector_sound 0x7f070091
-int drawable xml_selector_toolshopbutton 0x7f070092
+int drawable guis_checkbox_checked 0x7f070051
+int drawable guis_checkbox_unchecked 0x7f070052
+int drawable guis_clock 0x7f070053
+int drawable guis_goal 0x7f070054
+int drawable guis_lock_locked 0x7f070055
+int drawable guis_magnet_field 0x7f070056
+int drawable guis_pausebutton 0x7f070057
+int drawable guis_playerarrow 0x7f070058
+int drawable guis_radius 0x7f070059
+int drawable guis_settings_disabled 0x7f07005a
+int drawable guis_settings_enabled 0x7f07005b
+int drawable guis_shape_shop_disabled 0x7f07005c
+int drawable guis_shape_shop_enabled 0x7f07005d
+int drawable guis_sound_off 0x7f07005e
+int drawable guis_sound_on 0x7f07005f
+int drawable guis_splitter 0x7f070060
+int drawable guis_tick 0x7f070061
+int drawable guis_tool_shop_disabled 0x7f070062
+int drawable guis_tool_shop_enabled 0x7f070063
+int drawable notification_template_icon_bg 0x7f070064
+int drawable obstacles_grass 0x7f070065
+int drawable playershapes_ball 0x7f070066
+int drawable playershapes_clock 0x7f070067
+int drawable playershapes_hypno_spiral 0x7f070068
+int drawable playershapes_locked 0x7f070069
+int drawable playershapes_pacman 0x7f07006a
+int drawable playershapes_smiley 0x7f07006b
+int drawable playershapes_sun 0x7f07006c
+int drawable playershapes_wheel 0x7f07006d
+int drawable terrain_c_grass 0x7f07006e
+int drawable terrain_t_grass 0x7f07006f
+int drawable tools_bomb 0x7f070070
+int drawable tools_bomb_button 0x7f070071
+int drawable tools_button_empty 0x7f070072
+int drawable tools_button_locked 0x7f070073
+int drawable tools_button_unlocked 0x7f070074
+int drawable tools_magnet 0x7f070075
+int drawable tools_magnet_button 0x7f070076
+int drawable tools_power_mushroom 0x7f070077
+int drawable tools_power_mushroom_button 0x7f070078
+int drawable tools_ramp 0x7f070079
+int drawable tools_ramp_button 0x7f07007a
+int drawable tools_spring 0x7f07007b
+int drawable tools_spring_button 0x7f07007c
+int drawable tutorial_place_ramp_air_1 0x7f07007d
+int drawable tutorial_place_ramp_gap 0x7f07007e
+int drawable tutorial_place_ramp_obstacle 0x7f07007f
+int drawable tutorial_place_tools 0x7f070080
+int drawable tutorial_to_toolshop 0x7f070081
+int drawable tutorial_toolbar 0x7f070082
+int drawable tutorial_toolshop_all_tools 0x7f070083
+int drawable tutorial_toolshop_equip_spring 0x7f070084
+int drawable tutorial_toolshop_inspector 0x7f070085
+int drawable tutorial_toolshop_select_buy_spring 0x7f070086
+int drawable tutorial_toolshop_toolbar 0x7f070087
+int drawable world_previews_grass 0x7f070088
+int drawable xml_background_bountymessage 0x7f070089
+int drawable xml_background_levelbutton 0x7f07008a
+int drawable xml_background_toolslot 0x7f07008b
+int drawable xml_background_toolupgrade 0x7f07008c
+int drawable xml_background_tutorialtextview 0x7f07008d
+int drawable xml_background_worldbutton 0x7f07008e
+int drawable xml_layers_toolprogressbar 0x7f07008f
+int drawable xml_selector_gamebutton 0x7f070090
+int drawable xml_selector_pricebutton 0x7f070091
+int drawable xml_selector_settingsbutton 0x7f070092
+int drawable xml_selector_shapeshopbutton 0x7f070093
+int drawable xml_selector_sound 0x7f070094
+int drawable xml_selector_toolshopbutton 0x7f070095
+int drawable xml_shape_inspector_checkbox 0x7f070096
int id action0 0x7f080000
int id action_bar 0x7f080001
int id action_bar_activity_content 0x7f080002
@@ -658,96 +662,102 @@ int id settings_soundtoggle 0x7f08006a
int id settings_topbar 0x7f08006b
int id shape_button_button 0x7f08006c
int id shape_button_textview 0x7f08006d
-int id shape_shop_bottomRow 0x7f08006e
-int id shape_shop_shape_inspector 0x7f08006f
-int id shape_shop_topRow 0x7f080070
-int id shape_shop_topbar 0x7f080071
-int id shortcut 0x7f080072
-int id shortmenu_continue 0x7f080073
-int id shortmenu_exit 0x7f080074
-int id shortmenu_restart 0x7f080075
-int id shortmenu_topbar 0x7f080076
-int id showCustom 0x7f080077
-int id showHome 0x7f080078
-int id showTitle 0x7f080079
-int id spacer 0x7f08007a
-int id split_action_bar 0x7f08007b
-int id src_atop 0x7f08007c
-int id src_in 0x7f08007d
-int id src_over 0x7f08007e
-int id startscreen_gain_90_ep 0x7f08007f
-int id startscreen_play 0x7f080080
-int id startscreen_settings 0x7f080081
-int id startscreen_to_gl_test_screen 0x7f080082
-int id startscreen_unlock_levels 0x7f080083
-int id status_bar_latest_event_content 0x7f080084
-int id submit_area 0x7f080085
-int id tabMode 0x7f080086
-int id text 0x7f080087
-int id text2 0x7f080088
-int id textSpacerNoButtons 0x7f080089
-int id time 0x7f08008a
-int id title 0x7f08008b
-int id title_template 0x7f08008c
-int id tool_button_animation_layer 0x7f08008d
-int id tool_button_background_layer 0x7f08008e
-int id tool_button_progress_bar 0x7f08008f
-int id tool_inspector_description 0x7f080090
-int id tool_inspector_imageview 0x7f080091
-int id tool_inspector_level_view 0x7f080092
-int id tool_inspector_pricebutton 0x7f080093
-int id tool_inspector_title 0x7f080094
-int id tool_upgrade_imageview 0x7f080095
-int id tool_upgrade_pricebutton 0x7f080096
-int id tool_upgrade_title 0x7f080097
-int id tool_upgrade_value_new 0x7f080098
-int id tool_upgrade_value_old 0x7f080099
-int id toolbutton_1 0x7f08009a
-int id toolbutton_2 0x7f08009b
-int id toolbutton_3 0x7f08009c
-int id toolbutton_4 0x7f08009d
-int id toolofferslot_slot 0x7f08009e
-int id toolofferslot_title 0x7f08009f
-int id toolshop_slot1 0x7f0800a0
-int id toolshop_slot2 0x7f0800a1
-int id toolshop_slot3 0x7f0800a2
-int id toolshop_slot4 0x7f0800a3
-int id toolshop_tool_offer_bottom_row 0x7f0800a4
-int id toolshop_tool_offer_top_row 0x7f0800a5
-int id toolshop_toolinspector 0x7f0800a6
-int id toolshop_topbar 0x7f0800a7
-int id toolslot_image 0x7f0800a8
-int id topPanel 0x7f0800a9
-int id topbar_energycount 0x7f0800aa
-int id topbar_energycount_decrease 0x7f0800ab
-int id topbar_energyview 0x7f0800ac
-int id topbar_layout 0x7f0800ad
-int id topbar_leveldisplay 0x7f0800ae
-int id topbar_levellayout 0x7f0800af
-int id topbar_levelprogress 0x7f0800b0
-int id topbar_settings 0x7f0800b1
-int id topbar_shapeshop 0x7f0800b2
-int id topbar_starcount 0x7f0800b3
-int id topbar_starcount_decrease 0x7f0800b4
-int id topbar_starview 0x7f0800b5
-int id topbar_toolshop 0x7f0800b6
-int id tutorial_image_view 0x7f0800b7
-int id tutorial_text_view 0x7f0800b8
-int id unlockmessage_message 0x7f0800b9
-int id unlockmessage_toolimage 0x7f0800ba
-int id up 0x7f0800bb
-int id useLogo 0x7f0800bc
-int id withText 0x7f0800bd
-int id worldbutton_energycount 0x7f0800be
-int id worldbutton_levelcount 0x7f0800bf
-int id worldbutton_lock 0x7f0800c0
-int id worldbutton_preview 0x7f0800c1
-int id worldbutton_starcount 0x7f0800c2
-int id worldbutton_tickView 0x7f0800c3
-int id worldbutton_title 0x7f0800c4
-int id worlds_layout 0x7f0800c5
-int id worlds_topbar 0x7f0800c6
-int id wrap_content 0x7f0800c7
+int id shape_inspector_check_box 0x7f08006e
+int id shape_inspector_check_box_image 0x7f08006f
+int id shape_inspector_check_box_text 0x7f080070
+int id shape_inspector_description 0x7f080071
+int id shape_inspector_imageview 0x7f080072
+int id shape_inspector_title 0x7f080073
+int id shape_shop_bottomRow 0x7f080074
+int id shape_shop_shape_inspector 0x7f080075
+int id shape_shop_topRow 0x7f080076
+int id shape_shop_topbar 0x7f080077
+int id shortcut 0x7f080078
+int id shortmenu_continue 0x7f080079
+int id shortmenu_exit 0x7f08007a
+int id shortmenu_restart 0x7f08007b
+int id shortmenu_topbar 0x7f08007c
+int id showCustom 0x7f08007d
+int id showHome 0x7f08007e
+int id showTitle 0x7f08007f
+int id spacer 0x7f080080
+int id split_action_bar 0x7f080081
+int id src_atop 0x7f080082
+int id src_in 0x7f080083
+int id src_over 0x7f080084
+int id startscreen_gain_90_ep 0x7f080085
+int id startscreen_play 0x7f080086
+int id startscreen_settings 0x7f080087
+int id startscreen_to_gl_test_screen 0x7f080088
+int id startscreen_unlock_levels 0x7f080089
+int id status_bar_latest_event_content 0x7f08008a
+int id submit_area 0x7f08008b
+int id tabMode 0x7f08008c
+int id text 0x7f08008d
+int id text2 0x7f08008e
+int id textSpacerNoButtons 0x7f08008f
+int id time 0x7f080090
+int id title 0x7f080091
+int id title_template 0x7f080092
+int id tool_button_animation_layer 0x7f080093
+int id tool_button_background_layer 0x7f080094
+int id tool_button_progress_bar 0x7f080095
+int id tool_inspector_description 0x7f080096
+int id tool_inspector_imageview 0x7f080097
+int id tool_inspector_level_view 0x7f080098
+int id tool_inspector_pricebutton 0x7f080099
+int id tool_inspector_title 0x7f08009a
+int id tool_upgrade_imageview 0x7f08009b
+int id tool_upgrade_pricebutton 0x7f08009c
+int id tool_upgrade_title 0x7f08009d
+int id tool_upgrade_value_new 0x7f08009e
+int id tool_upgrade_value_old 0x7f08009f
+int id toolbutton_1 0x7f0800a0
+int id toolbutton_2 0x7f0800a1
+int id toolbutton_3 0x7f0800a2
+int id toolbutton_4 0x7f0800a3
+int id toolofferslot_slot 0x7f0800a4
+int id toolofferslot_title 0x7f0800a5
+int id toolshop_slot1 0x7f0800a6
+int id toolshop_slot2 0x7f0800a7
+int id toolshop_slot3 0x7f0800a8
+int id toolshop_slot4 0x7f0800a9
+int id toolshop_tool_offer_bottom_row 0x7f0800aa
+int id toolshop_tool_offer_top_row 0x7f0800ab
+int id toolshop_toolinspector 0x7f0800ac
+int id toolshop_topbar 0x7f0800ad
+int id toolslot_image 0x7f0800ae
+int id topPanel 0x7f0800af
+int id topbar_energycount 0x7f0800b0
+int id topbar_energycount_decrease 0x7f0800b1
+int id topbar_energyview 0x7f0800b2
+int id topbar_layout 0x7f0800b3
+int id topbar_leveldisplay 0x7f0800b4
+int id topbar_levellayout 0x7f0800b5
+int id topbar_levelprogress 0x7f0800b6
+int id topbar_settings 0x7f0800b7
+int id topbar_shapeshop 0x7f0800b8
+int id topbar_starcount 0x7f0800b9
+int id topbar_starcount_decrease 0x7f0800ba
+int id topbar_starview 0x7f0800bb
+int id topbar_toolshop 0x7f0800bc
+int id tutorial_image_view 0x7f0800bd
+int id tutorial_text_view 0x7f0800be
+int id unlockmessage_message 0x7f0800bf
+int id unlockmessage_toolimage 0x7f0800c0
+int id up 0x7f0800c1
+int id useLogo 0x7f0800c2
+int id withText 0x7f0800c3
+int id worldbutton_energycount 0x7f0800c4
+int id worldbutton_levelcount 0x7f0800c5
+int id worldbutton_lock 0x7f0800c6
+int id worldbutton_preview 0x7f0800c7
+int id worldbutton_starcount 0x7f0800c8
+int id worldbutton_tickView 0x7f0800c9
+int id worldbutton_title 0x7f0800ca
+int id worlds_layout 0x7f0800cb
+int id worlds_topbar 0x7f0800cc
+int id wrap_content 0x7f0800cd
int integer abc_config_activityDefaultDur 0x7f090000
int integer abc_config_activityShortDur 0x7f090001
int integer abc_max_action_buttons 0x7f090002
@@ -800,22 +810,23 @@ int layout select_dialog_singlechoice_material 0x7f0a002b
int layout settings 0x7f0a002c
int layout shape_button 0x7f0a002d
int layout shape_inspector 0x7f0a002e
-int layout shape_shop 0x7f0a002f
-int layout short_menu 0x7f0a0030
-int layout start_screen 0x7f0a0031
-int layout support_simple_spinner_dropdown_item 0x7f0a0032
-int layout tool_inspector 0x7f0a0033
-int layout tool_offer_slot 0x7f0a0034
-int layout tool_slot 0x7f0a0035
-int layout tool_upgrade 0x7f0a0036
-int layout toolbutton 0x7f0a0037
-int layout toolbuttonbar 0x7f0a0038
-int layout toolshop 0x7f0a0039
-int layout topbar 0x7f0a003a
-int layout tutorial 0x7f0a003b
-int layout unlock_message 0x7f0a003c
-int layout world_button 0x7f0a003d
-int layout worlds 0x7f0a003e
+int layout shape_inspector_check_box 0x7f0a002f
+int layout shape_shop 0x7f0a0030
+int layout short_menu 0x7f0a0031
+int layout start_screen 0x7f0a0032
+int layout support_simple_spinner_dropdown_item 0x7f0a0033
+int layout tool_inspector 0x7f0a0034
+int layout tool_offer_slot 0x7f0a0035
+int layout tool_slot 0x7f0a0036
+int layout tool_upgrade 0x7f0a0037
+int layout toolbutton 0x7f0a0038
+int layout toolbuttonbar 0x7f0a0039
+int layout toolshop 0x7f0a003a
+int layout topbar 0x7f0a003b
+int layout tutorial 0x7f0a003c
+int layout unlock_message 0x7f0a003d
+int layout world_button 0x7f0a003e
+int layout worlds 0x7f0a003f
int mipmap ic_launcher 0x7f0b0000
int raw background 0x7f0c0000
int raw ramp 0x7f0c0001
@@ -862,67 +873,82 @@ int string placeholder_button 0x7f0d0027
int string placeholder_number 0x7f0d0028
int string placeholder_percent 0x7f0d0029
int string placeholder_textview 0x7f0d002a
-int string playershape_name_ball 0x7f0d002b
-int string playershape_name_clock 0x7f0d002c
-int string playershape_name_hypno_spiral 0x7f0d002d
-int string playershape_name_pacman 0x7f0d002e
-int string playershape_name_smiley 0x7f0d002f
-int string playershape_name_sun 0x7f0d0030
-int string playershape_name_wheel 0x7f0d0031
-int string pre_start_screen_loading 0x7f0d0032
-int string price_button_buy 0x7f0d0033
-int string price_button_upgrade 0x7f0d0034
-int string settings_reset 0x7f0d0035
-int string short_menu_continue 0x7f0d0036
-int string short_menu_exit 0x7f0d0037
-int string short_menu_restart 0x7f0d0038
-int string start_screen_gain_90_ep 0x7f0d0039
-int string start_screen_play 0x7f0d003a
-int string start_screen_to_gl_test_screen 0x7f0d003b
-int string start_screen_unlock_all_levels 0x7f0d003c
-int string status_bar_notification_info_overflow 0x7f0d003d
-int string tool_description_bomb 0x7f0d003e
-int string tool_description_locked_format_d 0x7f0d003f
-int string tool_description_magnet 0x7f0d0040
-int string tool_description_power_mushroom 0x7f0d0041
-int string tool_description_ramp 0x7f0d0042
-int string tool_description_spring 0x7f0d0043
-int string tool_level_format_d 0x7f0d0044
-int string tool_name_bomb 0x7f0d0045
-int string tool_name_locked 0x7f0d0046
-int string tool_name_magnet 0x7f0d0047
-int string tool_name_power_mushroom 0x7f0d0048
-int string tool_name_ramp 0x7f0d0049
-int string tool_name_spring 0x7f0d004a
-int string tool_upgrade_force 0x7f0d004b
-int string tool_upgrade_none 0x7f0d004c
-int string tool_upgrade_radius 0x7f0d004d
-int string tool_upgrade_time 0x7f0d004e
-int string tool_upgrade_title_format_sd 0x7f0d004f
-int string tool_upgrade_title_placeholder 0x7f0d0050
-int string tool_upgrade_value_max 0x7f0d0051
-int string topbar_level_format_d 0x7f0d0052
-int string topbar_level_placeholder 0x7f0d0053
-int string topbar_toolshop 0x7f0d0054
-int string tutorial_leveled_up 0x7f0d0055
-int string tutorial_place_ramp_air 0x7f0d0056
-int string tutorial_place_ramp_air_2 0x7f0d0057
-int string tutorial_place_ramp_gap 0x7f0d0058
-int string tutorial_place_ramp_obstacle 0x7f0d0059
-int string tutorial_place_tools 0x7f0d005a
-int string tutorial_placeholder 0x7f0d005b
-int string tutorial_to_toolshop 0x7f0d005c
-int string tutorial_toolbar 0x7f0d005d
-int string tutorial_toolshop_all_tools 0x7f0d005e
-int string tutorial_toolshop_equip_spring 0x7f0d005f
-int string tutorial_toolshop_inspector 0x7f0d0060
-int string tutorial_toolshop_select_buy_spring 0x7f0d0061
-int string tutorial_toolshop_toolbar 0x7f0d0062
-int string tutorial_toolshop_welcome 0x7f0d0063
-int string tutorial_welcome 0x7f0d0064
-int string unlock_message_placeholder 0x7f0d0065
-int string world_button_progress_placeholder 0x7f0d0066
-int string world_button_title_placeholder 0x7f0d0067
+int string playershape_description_ball 0x7f0d002b
+int string playershape_description_clock 0x7f0d002c
+int string playershape_description_hypno_spiral 0x7f0d002d
+int string playershape_description_locked 0x7f0d002e
+int string playershape_description_pacman 0x7f0d002f
+int string playershape_description_smiley 0x7f0d0030
+int string playershape_description_sun 0x7f0d0031
+int string playershape_description_wheel 0x7f0d0032
+int string playershape_name_ball 0x7f0d0033
+int string playershape_name_clock 0x7f0d0034
+int string playershape_name_hypno_spiral 0x7f0d0035
+int string playershape_name_locked 0x7f0d0036
+int string playershape_name_pacman 0x7f0d0037
+int string playershape_name_smiley 0x7f0d0038
+int string playershape_name_sun 0x7f0d0039
+int string playershape_name_wheel 0x7f0d003a
+int string pre_start_screen_loading 0x7f0d003b
+int string price_button_buy 0x7f0d003c
+int string price_button_upgrade 0x7f0d003d
+int string settings_reset 0x7f0d003e
+int string short_menu_continue 0x7f0d003f
+int string short_menu_exit 0x7f0d0040
+int string short_menu_restart 0x7f0d0041
+int string start_screen_gain_90_ep 0x7f0d0042
+int string start_screen_play 0x7f0d0043
+int string start_screen_to_gl_test_screen 0x7f0d0044
+int string start_screen_unlock_all_levels 0x7f0d0045
+int string status_bar_notification_info_overflow 0x7f0d0046
+int string task_collect_energy_format_d 0x7f0d0047
+int string task_collect_energy_progress_format_ddd 0x7f0d0048
+int string task_collect_stars_format_d 0x7f0d0049
+int string task_collect_stars_progress_format_ddd 0x7f0d004a
+int string task_complete_world_format_d 0x7f0d004b
+int string task_empty 0x7f0d004c
+int string tool_description_bomb 0x7f0d004d
+int string tool_description_locked_format_d 0x7f0d004e
+int string tool_description_magnet 0x7f0d004f
+int string tool_description_power_mushroom 0x7f0d0050
+int string tool_description_ramp 0x7f0d0051
+int string tool_description_spring 0x7f0d0052
+int string tool_level_format_d 0x7f0d0053
+int string tool_name_bomb 0x7f0d0054
+int string tool_name_locked 0x7f0d0055
+int string tool_name_magnet 0x7f0d0056
+int string tool_name_power_mushroom 0x7f0d0057
+int string tool_name_ramp 0x7f0d0058
+int string tool_name_spring 0x7f0d0059
+int string tool_upgrade_force 0x7f0d005a
+int string tool_upgrade_none 0x7f0d005b
+int string tool_upgrade_radius 0x7f0d005c
+int string tool_upgrade_time 0x7f0d005d
+int string tool_upgrade_title_format_sd 0x7f0d005e
+int string tool_upgrade_title_placeholder 0x7f0d005f
+int string tool_upgrade_value_max 0x7f0d0060
+int string topbar_level_format_d 0x7f0d0061
+int string topbar_level_placeholder 0x7f0d0062
+int string topbar_toolshop 0x7f0d0063
+int string tutorial_leveled_up 0x7f0d0064
+int string tutorial_place_ramp_air 0x7f0d0065
+int string tutorial_place_ramp_air_2 0x7f0d0066
+int string tutorial_place_ramp_gap 0x7f0d0067
+int string tutorial_place_ramp_obstacle 0x7f0d0068
+int string tutorial_place_tools 0x7f0d0069
+int string tutorial_placeholder 0x7f0d006a
+int string tutorial_to_toolshop 0x7f0d006b
+int string tutorial_toolbar 0x7f0d006c
+int string tutorial_toolshop_all_tools 0x7f0d006d
+int string tutorial_toolshop_equip_spring 0x7f0d006e
+int string tutorial_toolshop_inspector 0x7f0d006f
+int string tutorial_toolshop_select_buy_spring 0x7f0d0070
+int string tutorial_toolshop_toolbar 0x7f0d0071
+int string tutorial_toolshop_welcome 0x7f0d0072
+int string tutorial_welcome 0x7f0d0073
+int string unlock_message_placeholder 0x7f0d0074
+int string world_button_progress_placeholder 0x7f0d0075
+int string world_button_title_placeholder 0x7f0d0076
int style AlertDialog_AppCompat 0x7f0e0000
int style AlertDialog_AppCompat_Light 0x7f0e0001
int style Animation_AppCompat_Dialog 0x7f0e0002
diff --git a/app/src/main/assets/levelpacks/Grasslands.xml b/app/src/main/assets/levelpacks/Grasslands.xml
index 8c339f5..1b68b08 100644
--- a/app/src/main/assets/levelpacks/Grasslands.xml
+++ b/app/src/main/assets/levelpacks/Grasslands.xml
@@ -370,13 +370,13 @@
-
+
-
+
-
+
diff --git a/app/src/main/java/de/frajul/endlessroll/entities/shapes/CollectEnergyTask.java b/app/src/main/java/de/frajul/endlessroll/entities/shapes/CollectEnergyTask.java
new file mode 100644
index 0000000..ee990cc
--- /dev/null
+++ b/app/src/main/java/de/frajul/endlessroll/entities/shapes/CollectEnergyTask.java
@@ -0,0 +1,31 @@
+package de.frajul.endlessroll.entities.shapes;
+
+import android.content.Context;
+
+import de.frajul.endlessroll.R;
+import de.frajul.endlessroll.levels.LevelManager;
+
+/**
+ * Created by Julian on 30.10.2017.
+ */
+
+public class CollectEnergyTask extends Task {
+
+ public CollectEnergyTask(int condition) {
+ super(condition);
+ }
+
+ @Override
+ protected boolean checkConditionFulfilled(LevelManager levelManager) {
+ return levelManager.getTotalCollectedEnergyCount() >= condition;
+ }
+
+ @Override
+ public String toString(Context context, LevelManager levelManager) {
+ if (conditionFulfilled) {
+ return context.getString(R.string.task_collect_energy_format_d, condition);
+ }
+ return context.getString(R.string.task_collect_energy_progress_format_ddd, condition,
+ levelManager.getTotalCollectedEnergyCount(), condition);
+ }
+}
diff --git a/app/src/main/java/de/frajul/endlessroll/entities/shapes/CollectStarTask.java b/app/src/main/java/de/frajul/endlessroll/entities/shapes/CollectStarTask.java
new file mode 100644
index 0000000..989b33d
--- /dev/null
+++ b/app/src/main/java/de/frajul/endlessroll/entities/shapes/CollectStarTask.java
@@ -0,0 +1,31 @@
+package de.frajul.endlessroll.entities.shapes;
+
+import android.content.Context;
+
+import de.frajul.endlessroll.R;
+import de.frajul.endlessroll.levels.LevelManager;
+
+/**
+ * Created by Julian on 30.10.2017.
+ */
+
+public class CollectStarTask extends Task {
+
+ public CollectStarTask(int condition) {
+ super(condition);
+ }
+
+ @Override
+ protected boolean checkConditionFulfilled(LevelManager levelManager) {
+ return levelManager.getTotalCollectedStarCount() >= condition;
+ }
+
+ @Override
+ public String toString(Context context, LevelManager levelManager) {
+ if (conditionFulfilled) {
+ return context.getString(R.string.task_collect_stars_format_d, condition);
+ }
+ return context.getString(R.string.task_collect_stars_progress_format_ddd, condition,
+ levelManager.getTotalCollectedStarCount(), condition);
+ }
+}
diff --git a/app/src/main/java/de/frajul/endlessroll/entities/shapes/CompleteWorldTask.java b/app/src/main/java/de/frajul/endlessroll/entities/shapes/CompleteWorldTask.java
new file mode 100644
index 0000000..f916e33
--- /dev/null
+++ b/app/src/main/java/de/frajul/endlessroll/entities/shapes/CompleteWorldTask.java
@@ -0,0 +1,27 @@
+package de.frajul.endlessroll.entities.shapes;
+
+import android.content.Context;
+
+import de.frajul.endlessroll.R;
+import de.frajul.endlessroll.levels.LevelManager;
+
+/**
+ * Created by Julian on 30.10.2017.
+ */
+
+public class CompleteWorldTask extends Task {
+
+ public CompleteWorldTask(int condition) {
+ super(condition);
+ }
+
+ @Override
+ protected boolean checkConditionFulfilled(LevelManager levelManager) {
+ return levelManager.getPackWithId(condition).isAllLevelsFinished();
+ }
+
+ @Override
+ public String toString(Context context, LevelManager levelManager) {
+ return context.getString(R.string.task_complete_world_format_d, condition);
+ }
+}
diff --git a/app/src/main/java/de/frajul/endlessroll/entities/shapes/EmptyTask.java b/app/src/main/java/de/frajul/endlessroll/entities/shapes/EmptyTask.java
new file mode 100644
index 0000000..c5af16a
--- /dev/null
+++ b/app/src/main/java/de/frajul/endlessroll/entities/shapes/EmptyTask.java
@@ -0,0 +1,27 @@
+package de.frajul.endlessroll.entities.shapes;
+
+import android.content.Context;
+
+import de.frajul.endlessroll.R;
+import de.frajul.endlessroll.levels.LevelManager;
+
+/**
+ * Created by Julian on 30.10.2017.
+ */
+
+public class EmptyTask extends Task{
+
+ public EmptyTask() {
+ super(0);
+ }
+
+ @Override
+ protected boolean checkConditionFulfilled(LevelManager levelManager) {
+ return true;
+ }
+
+ @Override
+ public String toString(Context context, LevelManager levelManager) {
+ return context.getString(R.string.task_empty);
+ }
+}
diff --git a/app/src/main/java/de/frajul/endlessroll/entities/shapes/PlayerShape.java b/app/src/main/java/de/frajul/endlessroll/entities/shapes/PlayerShape.java
index e9d8f87..3831531 100644
--- a/app/src/main/java/de/frajul/endlessroll/entities/shapes/PlayerShape.java
+++ b/app/src/main/java/de/frajul/endlessroll/entities/shapes/PlayerShape.java
@@ -12,24 +12,37 @@ import de.frajul.endlessroll.entities.textures.TexturePack;
*/
public enum PlayerShape {
- BALL(R.string.playershape_name_ball, R.drawable.playershapes_ball),
- CLOCK(R.string.playershape_name_clock, R.drawable.playershapes_clock),
- HYPNO_SPIRAL(R.string.playershape_name_hypno_spiral, R.drawable.playershapes_hypno_spiral),
- PACMAN(R.string.playershape_name_pacman, R.drawable.playershapes_pacman),
- SMILEY(R.string.playershape_name_smiley, R.drawable.playershapes_smiley),
- WHEEL(R.string.playershape_name_wheel, R.drawable.playershapes_wheel),
- SUN(R.string.playershape_name_sun, R.drawable.playershapes_sun);
+ BALL(R.string.playershape_name_ball, R.string.playershape_description_ball,
+ R.drawable.playershapes_ball, new EmptyTask()),
+ CLOCK(R.string.playershape_name_clock, R.string.playershape_description_clock,
+ R.drawable.playershapes_clock, new CollectStarTask(15)),
+ HYPNO_SPIRAL(R.string.playershape_name_hypno_spiral,
+ R.string.playershape_description_hypno_spiral, R.drawable.playershapes_hypno_spiral,
+ new CollectEnergyTask(3)),
+ PACMAN(R.string.playershape_name_pacman, R.string.playershape_description_pacman,
+ R.drawable.playershapes_pacman, new CompleteWorldTask(1)),
+ SMILEY(R.string.playershape_name_smiley, R.string.playershape_description_smiley,
+ R.drawable.playershapes_smiley, new CollectStarTask(30)),
+ WHEEL(R.string.playershape_name_wheel, R.string.playershape_description_wheel,
+ R.drawable.playershapes_wheel, new CollectStarTask(48)),
+ SUN(R.string.playershape_name_sun, R.string.playershape_description_sun,
+ R.drawable.playershapes_sun, new CollectEnergyTask(16));
@StringRes
private int nameId;
+ @StringRes
+ private int descriptionId;
@DrawableRes
private int drawableId;
+ private Task unlockTask;
private Texture texture;
- PlayerShape(@StringRes int nameId, @DrawableRes int drawableId) {
+ PlayerShape(@StringRes int nameId, @StringRes int descriptionId, @DrawableRes int drawableId, Task unlockTask) {
this.nameId = nameId;
+ this.descriptionId = descriptionId;
this.drawableId = drawableId;
+ this.unlockTask = unlockTask;
}
public static void loadAllTextures(TexturePack texturePack) {
@@ -43,11 +56,20 @@ public enum PlayerShape {
texture = texturePack.loadTexture(drawableId);
}
+ public Task getUnlockTask() {
+ return unlockTask;
+ }
+
@StringRes
public int getNameId() {
return nameId;
}
+ @StringRes
+ public int getDescriptionId() {
+ return descriptionId;
+ }
+
@DrawableRes
public int getDrawableId() {
return drawableId;
diff --git a/app/src/main/java/de/frajul/endlessroll/entities/shapes/Task.java b/app/src/main/java/de/frajul/endlessroll/entities/shapes/Task.java
new file mode 100644
index 0000000..0815b3a
--- /dev/null
+++ b/app/src/main/java/de/frajul/endlessroll/entities/shapes/Task.java
@@ -0,0 +1,31 @@
+package de.frajul.endlessroll.entities.shapes;
+
+import android.content.Context;
+
+import de.frajul.endlessroll.levels.LevelManager;
+
+/**
+ * Created by Julian on 29.10.2017.
+ */
+
+public abstract class Task {
+
+ protected int condition;
+ protected boolean conditionFulfilled;
+
+ public Task(int condition) {
+ this.condition = condition;
+ }
+
+ public void update(LevelManager levelManager){
+ conditionFulfilled = checkConditionFulfilled(levelManager);
+ }
+
+ protected abstract boolean checkConditionFulfilled(LevelManager levelManager);
+
+ public abstract String toString(Context context, LevelManager levelManager);
+
+ public boolean isConditionFulfilled() {
+ return conditionFulfilled;
+ }
+}
diff --git a/app/src/main/java/de/frajul/endlessroll/main/screens/PlayerShapeShopScreen.java b/app/src/main/java/de/frajul/endlessroll/main/screens/PlayerShapeShopScreen.java
index 8f994be..521f3cd 100644
--- a/app/src/main/java/de/frajul/endlessroll/main/screens/PlayerShapeShopScreen.java
+++ b/app/src/main/java/de/frajul/endlessroll/main/screens/PlayerShapeShopScreen.java
@@ -2,13 +2,13 @@ package de.frajul.endlessroll.main.screens;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
-import android.widget.TableRow;
import de.frajul.endlessroll.R;
import de.frajul.endlessroll.entities.shapes.PlayerShape;
import de.frajul.endlessroll.entities.shapes.PlayerShapeButtonOnClickListener;
import de.frajul.endlessroll.main.GameActivity;
import de.frajul.endlessroll.views.PlayerShapeButton;
+import de.frajul.endlessroll.views.ShapeInspector;
import de.frajul.endlessroll.views.TopBar;
/**
@@ -18,6 +18,8 @@ public class PlayerShapeShopScreen extends Screen implements Pla
private PlayerShapeButton activeButton;
+ private ShapeInspector shapeInspector;
+
private TopBar topBar;
private LinearLayout topRow;
private LinearLayout bottomRow;
@@ -27,6 +29,8 @@ public class PlayerShapeShopScreen extends Screen implements Pla
topBar = super.createTopBar(R.id.shape_shop_topbar);
topRow = (LinearLayout) layout.findViewById(R.id.shape_shop_topRow);
bottomRow = (LinearLayout) layout.findViewById(R.id.shape_shop_bottomRow);
+ shapeInspector = new ShapeInspector(gameActivity,
+ layout.findViewById(R.id.shape_shop_shape_inspector));
}
private void createViews() {
@@ -35,9 +39,12 @@ public class PlayerShapeShopScreen extends Screen implements Pla
int i = 0;
int totalShapes = PlayerShape.values().length;
for (PlayerShape playerShape : PlayerShape.values()) {
+ playerShape.getUnlockTask().update(gameActivity.getLevelManager());
boolean lastInRow = i == totalShapes / 2 || i == totalShapes - 1;
+ boolean locked = !playerShape.getUnlockTask()
+ .isConditionFulfilled();
PlayerShapeButton button = new PlayerShapeButton(gameActivity, playerShape, this,
- !lastInRow);
+ locked, !lastInRow);
if (i < totalShapes / 2 + 1)
topRow.addView(button.getView());
else
@@ -50,6 +57,8 @@ public class PlayerShapeShopScreen extends Screen implements Pla
i++;
}
+
+ shapeInspector.update(activeButton.getPlayerShape(), activeButton.isLocked());
}
@Override
@@ -66,9 +75,12 @@ public class PlayerShapeShopScreen extends Screen implements Pla
@Override
public void onClick(PlayerShapeButton button) {
- activeButton.stopRotating();
- activeButton = button;
- activeButton.startRotating();
- gameActivity.getUser().setCurrentPlayerShape(button.getPlayerShape());
+ shapeInspector.update(button.getPlayerShape(), button.isLocked());
+ if (!button.isLocked()) {
+ activeButton.stopRotating();
+ activeButton = button;
+ activeButton.startRotating();
+ gameActivity.getUser().setCurrentPlayerShape(button.getPlayerShape());
+ }
}
}
diff --git a/app/src/main/java/de/frajul/endlessroll/views/PlayerShapeButton.java b/app/src/main/java/de/frajul/endlessroll/views/PlayerShapeButton.java
index 140e81c..940af76 100644
--- a/app/src/main/java/de/frajul/endlessroll/views/PlayerShapeButton.java
+++ b/app/src/main/java/de/frajul/endlessroll/views/PlayerShapeButton.java
@@ -1,6 +1,5 @@
package de.frajul.endlessroll.views;
-import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -29,25 +28,29 @@ public class PlayerShapeButton implements View.OnClickListener {
private Button button;
private Animation rotation;
- public PlayerShapeButton(GameActivity gameActivity, PlayerShape playerShape, PlayerShapeButtonOnClickListener clickListener, boolean marginToRight) {
+ private boolean locked;
+
+ public PlayerShapeButton(GameActivity gameActivity, PlayerShape playerShape, PlayerShapeButtonOnClickListener clickListener, boolean locked, boolean marginToRight) {
this.clickListener = clickListener;
this.playerShape = playerShape;
+ this.locked = locked;
view = LayoutInflater.from(gameActivity).inflate(R.layout.shape_button, null);
view.setLayoutParams(createLayoutParams(marginToRight));
textView = (TextView) view.findViewById(R.id.shape_button_textview);
textView.setTypeface(gameActivity.getTypeface());
- textView.setText(playerShape.getNameId());
+ textView.setText(locked ? R.string.playershape_name_locked : playerShape.getNameId());
button = (Button) view.findViewById(R.id.shape_button_button);
- button.setBackgroundDrawable(gameActivity.getResources().getDrawable(playerShape.getDrawableId()));
+ button.setBackgroundDrawable(
+ gameActivity.getResources().getDrawable(locked ? R.drawable.playershapes_locked : playerShape.getDrawableId()));
button.setOnClickListener(this);
rotation = AnimationUtils.loadAnimation(gameActivity, R.anim.shape_button_rotation);
}
- private LinearLayout.LayoutParams createLayoutParams(boolean marginToRight){
- LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,
- ViewGroup.LayoutParams.WRAP_CONTENT);
- if(marginToRight)
- params.setMargins(0, 0, 60, 0);
+ private LinearLayout.LayoutParams createLayoutParams(boolean marginToRight) {
+ LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
+ ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
+ if (marginToRight)
+ params.setMargins(0, 0, 60, 0);
return params;
}
@@ -68,6 +71,10 @@ public class PlayerShapeButton implements View.OnClickListener {
return view;
}
+ public boolean isLocked() {
+ return locked;
+ }
+
public PlayerShape getPlayerShape() {
return playerShape;
}
diff --git a/app/src/main/java/de/frajul/endlessroll/views/ShapeInspector.java b/app/src/main/java/de/frajul/endlessroll/views/ShapeInspector.java
new file mode 100644
index 0000000..70a074f
--- /dev/null
+++ b/app/src/main/java/de/frajul/endlessroll/views/ShapeInspector.java
@@ -0,0 +1,54 @@
+package de.frajul.endlessroll.views;
+
+import android.graphics.Typeface;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import de.frajul.endlessroll.R;
+import de.frajul.endlessroll.entities.shapes.EmptyTask;
+import de.frajul.endlessroll.entities.shapes.PlayerShape;
+import de.frajul.endlessroll.entities.shapes.Task;
+import de.frajul.endlessroll.main.GameActivity;
+
+/**
+ * Created by Julian on 03.06.2017.
+ */
+
+public class ShapeInspector {
+
+ private GameActivity gameActivity;
+
+ private TextView title;
+ private ImageView imageView;
+ private TextView description;
+ private ShapeInspectorCheckbox checkbox;
+
+ private PlayerShape shape;
+ private boolean locked;
+
+ public ShapeInspector(GameActivity gameActivity, View layout) {
+ this.gameActivity = gameActivity;
+ Typeface typeface = gameActivity.getTypeface();
+ title = (TextView) layout.findViewById(R.id.shape_inspector_title);
+ title.setTypeface(typeface);
+ imageView = (ImageView) layout.findViewById(R.id.shape_inspector_imageview);
+ description = (TextView) layout.findViewById(R.id.shape_inspector_description);
+ description.setTypeface(typeface);
+ checkbox = new ShapeInspectorCheckbox(gameActivity, typeface,
+ layout.findViewById(R.id.shape_inspector_check_box));
+ }
+
+ public void update(PlayerShape shape, boolean locked) {
+ this.shape = shape;
+ this.locked = locked;
+
+ title.setText(locked ? R.string.playershape_name_locked : shape.getNameId());
+ imageView.setImageDrawable(gameActivity.getResources()
+ .getDrawable(locked ? R.drawable.playershapes_locked : shape.getDrawableId()));
+ description.setText(
+ locked ? R.string.playershape_description_locked : shape.getDescriptionId());
+
+ checkbox.updateForTask(shape.getUnlockTask());
+ }
+}
diff --git a/app/src/main/java/de/frajul/endlessroll/views/ShapeInspectorCheckbox.java b/app/src/main/java/de/frajul/endlessroll/views/ShapeInspectorCheckbox.java
new file mode 100644
index 0000000..be7d155
--- /dev/null
+++ b/app/src/main/java/de/frajul/endlessroll/views/ShapeInspectorCheckbox.java
@@ -0,0 +1,50 @@
+package de.frajul.endlessroll.views;
+
+import android.graphics.Typeface;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import de.frajul.endlessroll.R;
+import de.frajul.endlessroll.entities.shapes.EmptyTask;
+import de.frajul.endlessroll.entities.shapes.Task;
+import de.frajul.endlessroll.main.GameActivity;
+
+/**
+ * Created by Julian on 30.10.2017.
+ */
+
+public class ShapeInspectorCheckbox {
+
+ private GameActivity gameActivity;
+ private View layout;
+ private ImageView image;
+ private TextView textView;
+
+ public ShapeInspectorCheckbox(GameActivity gameActivity, Typeface typeface, View layout) {
+ this.gameActivity = gameActivity;
+ this.layout = layout;
+ image = (ImageView) layout.findViewById(R.id.shape_inspector_check_box_image);
+ textView = (TextView) layout.findViewById(R.id.shape_inspector_check_box_text);
+ textView.setTypeface(typeface);
+ }
+
+ public void updateForTask(Task task) {
+ boolean taskNotEmpty = !(task instanceof EmptyTask);
+ setVisible(taskNotEmpty);
+ if (taskNotEmpty) {
+ textView.setText(task.toString(gameActivity, gameActivity.getLevelManager()));
+ setChecked(task.isConditionFulfilled());
+ }
+ }
+
+ private void setChecked(boolean checked) {
+ int drawableId = checked ? R.drawable.guis_checkbox_checked : R.drawable.guis_checkbox_unchecked;
+ image.setBackgroundDrawable(gameActivity.getResources().getDrawable(drawableId));
+ }
+
+ private void setVisible(boolean visible) {
+ layout.setVisibility(visible ? View.VISIBLE : View.INVISIBLE);
+ }
+
+}
diff --git a/app/src/main/res/drawable/guis_checkbox_checked.png b/app/src/main/res/drawable/guis_checkbox_checked.png
new file mode 100644
index 0000000..f30cf9c
Binary files /dev/null and b/app/src/main/res/drawable/guis_checkbox_checked.png differ
diff --git a/app/src/main/res/drawable/guis_checkbox_unchecked.png b/app/src/main/res/drawable/guis_checkbox_unchecked.png
new file mode 100644
index 0000000..62e448e
Binary files /dev/null and b/app/src/main/res/drawable/guis_checkbox_unchecked.png differ
diff --git a/app/src/main/res/drawable/guis_lock_locked.png b/app/src/main/res/drawable/guis_lock_locked.png
new file mode 100644
index 0000000..e4c4256
Binary files /dev/null and b/app/src/main/res/drawable/guis_lock_locked.png differ
diff --git a/app/src/main/res/drawable/playershapes_locked.png b/app/src/main/res/drawable/playershapes_locked.png
new file mode 100644
index 0000000..df674be
Binary files /dev/null and b/app/src/main/res/drawable/playershapes_locked.png differ
diff --git a/app/src/main/res/drawable/xml_shape_inspector_checkbox.xml b/app/src/main/res/drawable/xml_shape_inspector_checkbox.xml
new file mode 100644
index 0000000..6893f10
--- /dev/null
+++ b/app/src/main/res/drawable/xml_shape_inspector_checkbox.xml
@@ -0,0 +1,19 @@
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/shape_button.xml b/app/src/main/res/layout/shape_button.xml
index 942fc0a..2ad8ab5 100644
--- a/app/src/main/res/layout/shape_button.xml
+++ b/app/src/main/res/layout/shape_button.xml
@@ -12,11 +12,18 @@
android:text="@string/placeholder_button"
android:textSize="28sp"/>
-
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/shape_inspector.xml b/app/src/main/res/layout/shape_inspector.xml
index 734686e..b5441d1 100644
--- a/app/src/main/res/layout/shape_inspector.xml
+++ b/app/src/main/res/layout/shape_inspector.xml
@@ -7,7 +7,7 @@
android:padding="10dp">
+
+
+ android:layout_centerInParent="true"
+ android:src="@drawable/playershapes_smiley"/>
+
-
-
-
-
+ android:layout_height="wrap_content"/>
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 6d71104..81c3e12 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -49,6 +49,22 @@
Smiley
Wheel
Sun
+ \?\?\?
+ Keep calm and roll on
+ Tick tack!
+ Hypnotizes you for more fun
+ PACMAN!
+ Don\'t worry, roll happy!
+ A nice car without the... car
+ Shine bright like the sun
+ A new shape for more fun
+
+ Empty task
+ Collect %d stars (%d/%d)
+ Collect %d energy (%d/%d)
+ Collect %d stars
+ Collect %d energy
+ Finish the %d. world
You will unlock this mysterious tool at level %d
Roll up the ramp to gain height