Skip to content

Commit

Permalink
Added back_to_menu button. Closes #16
Browse files Browse the repository at this point in the history
  • Loading branch information
bojidar-bg committed Apr 11, 2015
1 parent 5cea0be commit e62c784
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 29 deletions.
Binary file added gfx/menuGrid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
61 changes: 33 additions & 28 deletions scenes/main.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<resource_file type="PackedScene" subresource_count="4" version="1.1" version_name="Godot Engine v1.1.beta1.custom_build">
<ext_resource path="res://scenes/player.xml" type="PackedScene"></ext_resource>
<ext_resource path="res://scripts/level_holder.gd" type="Script"></ext_resource>
<resource_file type="PackedScene" subresource_count="5" version="1.1" version_name="Godot Engine v1.1.beta1.custom_build">
<ext_resource path="res://gfx/return.png" type="Texture"></ext_resource>
<ext_resource path="res://scripts/level_holder.gd" type="Script"></ext_resource>
<ext_resource path="res://gfx/menuGrid.png" type="Texture"></ext_resource>
<ext_resource path="res://scenes/player.xml" type="PackedScene"></ext_resource>
<main_resource>
<dictionary name="_bundled" shared="false">
<string> "names" </string>
<string_array len="52">
<string_array len="54">
<string> "world" </string>
<string> "Node2D" </string>
<string> "_import_path" </string>
Expand Down Expand Up @@ -57,17 +58,19 @@
<string> "textures/click_mask" </string>
<string> "params/scale" </string>
<string> "params/modulate" </string>
<string> "menu" </string>
<string> "retry_level" </string>
<string> "pressed" </string>
<string> "back_to_menu" </string>
</string_array>
<string> "version" </string>
<int> 1 </int>
<string> "conn_count" </string>
<int> 1 </int>
<int> 2 </int>
<string> "node_count" </string>
<int> 7 </int>
<int> 8 </int>
<string> "variants" </string>
<array len="23" shared="false">
<array len="25" shared="false">
<node_path> "" </node_path>
<bool> True </bool>
<real> 1 </real>
Expand All @@ -82,7 +85,7 @@
<string> "Script" </string>
<dictionary shared="false">
<string> "current" </string>
<int> 2 </int>
<int> 0 </int>
<string> "sources" </string>
<array len="5" shared="false">
<string> "res://scripts/level_holder.gd" </string>
Expand All @@ -99,7 +102,7 @@
<string> "snap_rotation_step" </string>
<real> 0.261799 </real>
<string> "zoom" </string>
<real> 0.902499 </real>
<real> 2.050544 </real>
<string> "snap_step" </string>
<vector2> 64, 64 </vector2>
<string> "snap_relative" </string>
Expand All @@ -113,7 +116,7 @@
<string> "snap_offset" </string>
<vector2> 0, 0 </vector2>
<string> "ofs" </string>
<vector2> -320.334, -231.613 </vector2>
<vector2> 479.786, -110.264 </vector2>
<string> "snap_rotation" </string>
<bool> False </bool>
</dictionary>
Expand Down Expand Up @@ -218,7 +221,7 @@
<int> 0 </int>
</dictionary>
<string> "__editor_plugin_screen__" </string>
<string> "2D" </string>
<string> "Script" </string>
</dictionary>
<resource resource_type="Script" path="res://scripts/level_holder.gd"> </resource>
<vector2> 32, 32 </vector2>
Expand All @@ -243,16 +246,16 @@
<bool> False </bool>
<string> "snap_rotation_step" </string>
<real> 0.261799 </real>
<string> "snap_step" </string>
<vector2> 64, 64 </vector2>
<string> "snap_relative" </string>
<bool> False </bool>
<string> "zoom" </string>
<real> 4.204739 </real>
<string> "snap_step" </string>
<vector2> 64, 64 </vector2>
<string> "snap_rotation_offset" </string>
<real> 0 </real>
<string> "snap_grid" </string>
<bool> True </bool>
<string> "snap_rotation_offset" </string>
<real> 0 </real>
<string> "snap_show_grid" </string>
<bool> True </bool>
<string> "snap_offset" </string>
Expand All @@ -264,6 +267,10 @@
</dictionary>
<string> "3D" </string>
<dictionary shared="false">
<string> "fov" </string>
<real> 45 </real>
<string> "zfar" </string>
<real> 500 </real>
<string> "viewports" </string>
<array len="4" shared="false">
<dictionary shared="false">
Expand Down Expand Up @@ -331,28 +338,24 @@
<vector3> 0, 0, 0 </vector3>
</dictionary>
</array>
<string> "zfar" </string>
<real> 500 </real>
<string> "deflight_rot_y" </string>
<real> 0.628319 </real>
<string> "fov" </string>
<real> 45 </real>
<string> "default_light" </string>
<bool> True </bool>
<string> "viewport_mode" </string>
<int> 1 </int>
<string> "default_light" </string>
<bool> True </bool>
<string> "ambient_light_color" </string>
<color> 0.15, 0.15, 0.15, 1 </color>
<string> "show_grid" </string>
<bool> True </bool>
<string> "znear" </string>
<real> 0.1 </real>
<string> "show_origin" </string>
<bool> True </bool>
<string> "deflight_rot_x" </string>
<real> 0.942478 </real>
<string> "znear" </string>
<real> 0.1 </real>
<string> "default_srgb" </string>
<bool> False </bool>
<string> "deflight_rot_x" </string>
<real> 0.942478 </real>
</dictionary>
</dictionary>
<string> "__editor_run_settings__" </string>
Expand All @@ -365,19 +368,21 @@
<string> "__editor_plugin_screen__" </string>
<string> "Script" </string>
</dictionary>
<real> 896 </real>
<real> 960 </real>
<real> 1024 </real>
<real> 64 </real>
<bool> False </bool>
<int> 2 </int>
<resource resource_type="Texture" path="res://gfx/return.png"> </resource>
<resource name=""></resource> <vector2> 0.64, 0.64 </vector2>
<color> 1, 1, 1, 1 </color>
<real> 1024 </real>
<resource resource_type="Texture" path="res://gfx/menuGrid.png"> </resource>
</array>
<string> "nodes" </string>
<int_array len="207"> -1, -1, 1, 0, -1, 11, 2, 0, 3, 1, 4, 2, 5, 2, 6, 3, 7, 4, 8, 5, 9, 6, 10, 7, 11, 1, 12, 8, 0, 0, 0, 1, 13, -1, 11, 2, 0, 3, 1, 4, 2, 5, 2, 6, 3, 7, 4, 8, 5, 9, 6, 10, 7, 11, 1, 14, 9, 0, 0, 0, 1, 15, -1, 10, 2, 0, 3, 1, 4, 2, 5, 2, 6, 3, 7, 10, 8, 5, 9, 6, 10, 7, 11, 1, 0, 2, 0, 17, 16, 11, 3, 2, 0, 7, 12, 12, 13, 0, 0, 0, 1, 18, -1, 10, 2, 0, 3, 1, 4, 2, 5, 2, 6, 3, 7, 4, 8, 5, 9, 6, 10, 7, 11, 1, 0, 4, 0, 19, 19, -1, 5, 2, 0, 20, 7, 21, 4, 22, 5, 23, 6, 0, 5, 0, 25, 24, -1, 29, 2, 0, 3, 1, 4, 2, 5, 2, 6, 3, 26, 14, 27, 15, 28, 16, 29, 0, 30, 0, 31, 0, 32, 0, 33, 17, 34, 1, 35, 18, 36, 18, 37, 2, 38, 17, 39, 17, 40, 17, 41, 17, 42, 19, 43, 20, 44, 20, 45, 20, 46, 20, 47, 20, 48, 21, 49, 22, 0 </int_array>
<int_array len="272"> -1, -1, 1, 0, -1, 11, 2, 0, 3, 1, 4, 2, 5, 2, 6, 3, 7, 4, 8, 5, 9, 6, 10, 7, 11, 1, 12, 8, 0, 0, 0, 1, 13, -1, 11, 2, 0, 3, 1, 4, 2, 5, 2, 6, 3, 7, 4, 8, 5, 9, 6, 10, 7, 11, 1, 14, 9, 0, 0, 0, 1, 15, -1, 10, 2, 0, 3, 1, 4, 2, 5, 2, 6, 3, 7, 10, 8, 5, 9, 6, 10, 7, 11, 1, 0, 2, 0, 17, 16, 11, 3, 2, 0, 7, 12, 12, 13, 0, 0, 0, 1, 18, -1, 10, 2, 0, 3, 1, 4, 2, 5, 2, 6, 3, 7, 4, 8, 5, 9, 6, 10, 7, 11, 1, 0, 4, 0, 19, 19, -1, 5, 2, 0, 20, 7, 21, 4, 22, 5, 23, 6, 0, 5, 0, 25, 24, -1, 29, 2, 0, 3, 1, 4, 2, 5, 2, 6, 3, 26, 14, 27, 15, 28, 16, 29, 0, 30, 0, 31, 0, 32, 0, 33, 17, 34, 1, 35, 18, 36, 18, 37, 2, 38, 17, 39, 17, 40, 17, 41, 17, 42, 19, 43, 20, 44, 20, 45, 20, 46, 20, 47, 20, 48, 21, 49, 22, 0, 5, 0, 25, 50, -1, 29, 2, 0, 3, 1, 4, 2, 5, 2, 6, 3, 26, 15, 27, 23, 28, 16, 29, 0, 30, 0, 31, 0, 32, 0, 33, 17, 34, 1, 35, 18, 36, 18, 37, 2, 38, 17, 39, 17, 40, 17, 41, 17, 42, 24, 43, 20, 44, 20, 45, 20, 46, 20, 47, 20, 48, 21, 49, 22, 0 </int_array>
<string> "conns" </string>
<int_array len="6"> 6, 1, 51, 50, 2, 0 </int_array>
<int_array len="12"> 6, 1, 52, 51, 2, 0, 7, 1, 52, 53, 2, 0 </int_array>
</dictionary>

</main_resource>
Expand Down
3 changes: 2 additions & 1 deletion scripts/level_holder.gd
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,5 @@ func _ready():
player = get_node("../player_holder/player")
set_process_input(true)


func back_to_menu():
get_node("/root/global").load_scene("res://scenes/main_menu.xml")

0 comments on commit e62c784

Please sign in to comment.