ajout d'un onglet de selection de scene, au menu setting.
This commit is contained in:
parent
b46a2cda20
commit
e29637f08b
7 changed files with 282 additions and 5 deletions
|
@ -10,6 +10,8 @@
|
||||||
|
|
||||||
[node name="world" type="Spatial" parent="." index="0"]
|
[node name="world" type="Spatial" parent="." index="0"]
|
||||||
|
|
||||||
|
editor/display_folded = true
|
||||||
|
|
||||||
[node name="DisCor1wDoLRAA01" parent="world" index="0" instance=ExtResource( 1 )]
|
[node name="DisCor1wDoLRAA01" parent="world" index="0" instance=ExtResource( 1 )]
|
||||||
|
|
||||||
transform = Transform( -1, 0, -8.74228e-008, 0, 1, 0, 8.74228e-008, 0, -1, -1, 0, 0 )
|
transform = Transform( -1, 0, -8.74228e-008, 0, 1, 0, 8.74228e-008, 0, -1, -1, 0, 0 )
|
||||||
|
|
|
@ -1018,11 +1018,11 @@ _sections_unfolded = [ "Transform" ]
|
||||||
|
|
||||||
[node name="World" type="Spatial" parent="." index="0"]
|
[node name="World" type="Spatial" parent="." index="0"]
|
||||||
|
|
||||||
editor/display_folded = true
|
|
||||||
_sections_unfolded = [ "Transform", "Visibility" ]
|
_sections_unfolded = [ "Transform", "Visibility" ]
|
||||||
|
|
||||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="World" index="0"]
|
[node name="WorldEnvironment" type="WorldEnvironment" parent="World" index="0"]
|
||||||
|
|
||||||
|
editor/display_folded = true
|
||||||
environment = SubResource( 2 )
|
environment = SubResource( 2 )
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ _sections_unfolded = [ "Font", "Settings" ]
|
||||||
|
|
||||||
default_font = SubResource( 1 )
|
default_font = SubResource( 1 )
|
||||||
|
|
||||||
[node name="GUI" type="MarginContainer" index="0"]
|
[node name="GUI" type="MarginContainer"]
|
||||||
|
|
||||||
pause_mode = 2
|
pause_mode = 2
|
||||||
anchor_left = 0.0
|
anchor_left = 0.0
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=16 format=2]
|
[gd_scene load_steps=17 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://gui_scene/GUI/Settings/Settings.gd" type="Script" id=1]
|
[ext_resource path="res://gui_scene/GUI/Settings/Settings.gd" type="Script" id=1]
|
||||||
[ext_resource path="res://assets/GUI/fonts/ryzom.ttf" type="DynamicFontData" id=2]
|
[ext_resource path="res://assets/GUI/fonts/ryzom.ttf" type="DynamicFontData" id=2]
|
||||||
|
@ -6,7 +6,7 @@
|
||||||
[ext_resource path="res://addons/input_map_button/icon.png" type="Texture" id=4]
|
[ext_resource path="res://addons/input_map_button/icon.png" type="Texture" id=4]
|
||||||
[ext_resource path="res://gui_scene/GUI/Settings/MenuButton.gd" type="Script" id=5]
|
[ext_resource path="res://gui_scene/GUI/Settings/MenuButton.gd" type="Script" id=5]
|
||||||
[ext_resource path="res://gui_scene/GUI/MusicControls/MusicControls.tscn" type="PackedScene" id=6]
|
[ext_resource path="res://gui_scene/GUI/MusicControls/MusicControls.tscn" type="PackedScene" id=6]
|
||||||
|
[ext_resource path="res://gui_scene/GUI/scene_selection/scene_selection_menu.tscn" type="PackedScene" id=7]
|
||||||
|
|
||||||
[sub_resource type="DynamicFont" id=1]
|
[sub_resource type="DynamicFont" id=1]
|
||||||
|
|
||||||
|
@ -619,6 +619,7 @@ _sections_unfolded = [ "Size Flags" ]
|
||||||
|
|
||||||
[node name="Controles" type="VBoxContainer" parent="Menus/TabContainer" index="1"]
|
[node name="Controles" type="VBoxContainer" parent="Menus/TabContainer" index="1"]
|
||||||
|
|
||||||
|
editor/display_folded = true
|
||||||
visible = false
|
visible = false
|
||||||
anchor_left = 0.0
|
anchor_left = 0.0
|
||||||
anchor_top = 0.0
|
anchor_top = 0.0
|
||||||
|
@ -1294,6 +1295,7 @@ _sections_unfolded = [ "Size Flags" ]
|
||||||
|
|
||||||
[node name="Test" type="MarginContainer" parent="Menus/TabContainer" index="2"]
|
[node name="Test" type="MarginContainer" parent="Menus/TabContainer" index="2"]
|
||||||
|
|
||||||
|
editor/display_folded = true
|
||||||
visible = false
|
visible = false
|
||||||
anchor_left = 0.0
|
anchor_left = 0.0
|
||||||
anchor_top = 0.0
|
anchor_top = 0.0
|
||||||
|
@ -1633,6 +1635,11 @@ edit_alpha = true
|
||||||
margin_top = 323.0
|
margin_top = 323.0
|
||||||
margin_bottom = 446.0
|
margin_bottom = 446.0
|
||||||
|
|
||||||
|
[node name="scene_selection" parent="Menus/TabContainer" index="3" instance=ExtResource( 7 )]
|
||||||
|
|
||||||
|
visible = false
|
||||||
|
margin_top = 49.0
|
||||||
|
|
||||||
[node name="Footer" type="HBoxContainer" parent="Menus" index="2"]
|
[node name="Footer" type="HBoxContainer" parent="Menus" index="2"]
|
||||||
|
|
||||||
anchor_left = 0.0
|
anchor_left = 0.0
|
||||||
|
|
258
gui_scene/GUI/scene_selection/scene_selection_menu.tscn
Normal file
258
gui_scene/GUI/scene_selection/scene_selection_menu.tscn
Normal file
|
@ -0,0 +1,258 @@
|
||||||
|
[gd_scene load_steps=2 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://gui_scene/GUI/scene_selection/select_scene_button.gd" type="Script" id=1]
|
||||||
|
|
||||||
|
[node name="scene_selection_menu" type="Control" index="0"]
|
||||||
|
|
||||||
|
anchor_left = 0.0
|
||||||
|
anchor_top = 0.0
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
|
rect_clip_content = false
|
||||||
|
mouse_filter = 0
|
||||||
|
mouse_default_cursor_shape = 0
|
||||||
|
size_flags_horizontal = 1
|
||||||
|
size_flags_vertical = 1
|
||||||
|
|
||||||
|
[node name="scenes_box" type="CenterContainer" parent="." index="0"]
|
||||||
|
|
||||||
|
anchor_left = 0.0
|
||||||
|
anchor_top = 0.0
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
|
rect_clip_content = false
|
||||||
|
mouse_filter = 0
|
||||||
|
mouse_default_cursor_shape = 0
|
||||||
|
size_flags_horizontal = 1
|
||||||
|
size_flags_vertical = 1
|
||||||
|
use_top_left = false
|
||||||
|
|
||||||
|
[node name="scenes" type="VBoxContainer" parent="scenes_box" index="0"]
|
||||||
|
|
||||||
|
anchor_left = 0.0
|
||||||
|
anchor_top = 0.0
|
||||||
|
anchor_right = 0.0
|
||||||
|
anchor_bottom = 0.0
|
||||||
|
margin_left = 441.0
|
||||||
|
margin_top = 266.0
|
||||||
|
margin_right = 583.0
|
||||||
|
margin_bottom = 334.0
|
||||||
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
|
rect_clip_content = false
|
||||||
|
mouse_filter = 1
|
||||||
|
mouse_default_cursor_shape = 0
|
||||||
|
size_flags_horizontal = 7
|
||||||
|
size_flags_vertical = 7
|
||||||
|
alignment = 0
|
||||||
|
_sections_unfolded = [ "Size Flags" ]
|
||||||
|
|
||||||
|
[node name="main_scene" type="HBoxContainer" parent="scenes_box/scenes" index="0"]
|
||||||
|
|
||||||
|
editor/display_folded = true
|
||||||
|
anchor_left = 0.0
|
||||||
|
anchor_top = 0.0
|
||||||
|
anchor_right = 0.0
|
||||||
|
anchor_bottom = 0.0
|
||||||
|
margin_right = 142.0
|
||||||
|
margin_bottom = 20.0
|
||||||
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
|
rect_clip_content = false
|
||||||
|
mouse_filter = 1
|
||||||
|
mouse_default_cursor_shape = 0
|
||||||
|
size_flags_horizontal = 1
|
||||||
|
size_flags_vertical = 1
|
||||||
|
alignment = 0
|
||||||
|
|
||||||
|
[node name="label" type="Label" parent="scenes_box/scenes/main_scene" index="0"]
|
||||||
|
|
||||||
|
anchor_left = 0.0
|
||||||
|
anchor_top = 0.0
|
||||||
|
anchor_right = 0.0
|
||||||
|
anchor_bottom = 0.0
|
||||||
|
margin_top = 3.0
|
||||||
|
margin_right = 87.0
|
||||||
|
margin_bottom = 17.0
|
||||||
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
|
rect_clip_content = false
|
||||||
|
mouse_filter = 2
|
||||||
|
mouse_default_cursor_shape = 0
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_vertical = 4
|
||||||
|
text = "Main scene"
|
||||||
|
percent_visible = 1.0
|
||||||
|
lines_skipped = 0
|
||||||
|
max_lines_visible = -1
|
||||||
|
_sections_unfolded = [ "Size Flags" ]
|
||||||
|
|
||||||
|
[node name="select_scene_button" type="Button" parent="scenes_box/scenes/main_scene" index="1"]
|
||||||
|
|
||||||
|
anchor_left = 0.0
|
||||||
|
anchor_top = 0.0
|
||||||
|
anchor_right = 0.0
|
||||||
|
anchor_bottom = 0.0
|
||||||
|
margin_left = 91.0
|
||||||
|
margin_right = 142.0
|
||||||
|
margin_bottom = 20.0
|
||||||
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
|
rect_clip_content = false
|
||||||
|
focus_mode = 2
|
||||||
|
mouse_filter = 0
|
||||||
|
mouse_default_cursor_shape = 0
|
||||||
|
size_flags_horizontal = 9
|
||||||
|
size_flags_vertical = 1
|
||||||
|
toggle_mode = false
|
||||||
|
enabled_focus_mode = 2
|
||||||
|
shortcut = null
|
||||||
|
group = null
|
||||||
|
text = "select"
|
||||||
|
flat = false
|
||||||
|
align = 1
|
||||||
|
script = ExtResource( 1 )
|
||||||
|
_sections_unfolded = [ "Size Flags" ]
|
||||||
|
scene_path = "res://game_scene/Game/Game.tscn"
|
||||||
|
start_position_path = "start_position"
|
||||||
|
|
||||||
|
[node name="test_grid_map" type="HBoxContainer" parent="scenes_box/scenes" index="1"]
|
||||||
|
|
||||||
|
editor/display_folded = true
|
||||||
|
anchor_left = 0.0
|
||||||
|
anchor_top = 0.0
|
||||||
|
anchor_right = 0.0
|
||||||
|
anchor_bottom = 0.0
|
||||||
|
margin_top = 24.0
|
||||||
|
margin_right = 142.0
|
||||||
|
margin_bottom = 44.0
|
||||||
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
|
rect_clip_content = false
|
||||||
|
mouse_filter = 1
|
||||||
|
mouse_default_cursor_shape = 0
|
||||||
|
size_flags_horizontal = 1
|
||||||
|
size_flags_vertical = 1
|
||||||
|
alignment = 0
|
||||||
|
_sections_unfolded = [ "Size Flags" ]
|
||||||
|
|
||||||
|
[node name="label" type="Label" parent="scenes_box/scenes/test_grid_map" index="0"]
|
||||||
|
|
||||||
|
anchor_left = 0.0
|
||||||
|
anchor_top = 0.0
|
||||||
|
anchor_right = 0.0
|
||||||
|
anchor_bottom = 0.0
|
||||||
|
margin_top = 3.0
|
||||||
|
margin_right = 87.0
|
||||||
|
margin_bottom = 17.0
|
||||||
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
|
rect_clip_content = false
|
||||||
|
mouse_filter = 2
|
||||||
|
mouse_default_cursor_shape = 0
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_vertical = 4
|
||||||
|
text = "Test grid map"
|
||||||
|
percent_visible = 1.0
|
||||||
|
lines_skipped = 0
|
||||||
|
max_lines_visible = -1
|
||||||
|
_sections_unfolded = [ "Size Flags" ]
|
||||||
|
|
||||||
|
[node name="select_scene_button" type="Button" parent="scenes_box/scenes/test_grid_map" index="1"]
|
||||||
|
|
||||||
|
anchor_left = 0.0
|
||||||
|
anchor_top = 0.0
|
||||||
|
anchor_right = 0.0
|
||||||
|
anchor_bottom = 0.0
|
||||||
|
margin_left = 91.0
|
||||||
|
margin_right = 142.0
|
||||||
|
margin_bottom = 20.0
|
||||||
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
|
rect_clip_content = false
|
||||||
|
focus_mode = 2
|
||||||
|
mouse_filter = 0
|
||||||
|
mouse_default_cursor_shape = 0
|
||||||
|
size_flags_horizontal = 9
|
||||||
|
size_flags_vertical = 1
|
||||||
|
toggle_mode = false
|
||||||
|
enabled_focus_mode = 2
|
||||||
|
shortcut = null
|
||||||
|
group = null
|
||||||
|
text = "select"
|
||||||
|
flat = false
|
||||||
|
align = 1
|
||||||
|
script = ExtResource( 1 )
|
||||||
|
_sections_unfolded = [ "Size Flags" ]
|
||||||
|
scene_path = "res://dispensaire_gridmap/dispensaire_gridmap.tscn"
|
||||||
|
start_position_path = "start_position"
|
||||||
|
|
||||||
|
[node name="test_scenes" type="HBoxContainer" parent="scenes_box/scenes" index="2"]
|
||||||
|
|
||||||
|
editor/display_folded = true
|
||||||
|
anchor_left = 0.0
|
||||||
|
anchor_top = 0.0
|
||||||
|
anchor_right = 0.0
|
||||||
|
anchor_bottom = 0.0
|
||||||
|
margin_top = 48.0
|
||||||
|
margin_right = 142.0
|
||||||
|
margin_bottom = 68.0
|
||||||
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
|
rect_clip_content = false
|
||||||
|
mouse_filter = 1
|
||||||
|
mouse_default_cursor_shape = 0
|
||||||
|
size_flags_horizontal = 1
|
||||||
|
size_flags_vertical = 1
|
||||||
|
alignment = 0
|
||||||
|
|
||||||
|
[node name="label" type="Label" parent="scenes_box/scenes/test_scenes" index="0"]
|
||||||
|
|
||||||
|
anchor_left = 0.0
|
||||||
|
anchor_top = 0.0
|
||||||
|
anchor_right = 0.0
|
||||||
|
anchor_bottom = 0.0
|
||||||
|
margin_top = 3.0
|
||||||
|
margin_right = 87.0
|
||||||
|
margin_bottom = 17.0
|
||||||
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
|
rect_clip_content = false
|
||||||
|
mouse_filter = 2
|
||||||
|
mouse_default_cursor_shape = 0
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_vertical = 4
|
||||||
|
text = "Test scenes"
|
||||||
|
percent_visible = 1.0
|
||||||
|
lines_skipped = 0
|
||||||
|
max_lines_visible = -1
|
||||||
|
_sections_unfolded = [ "Size Flags" ]
|
||||||
|
|
||||||
|
[node name="select_scene_button" type="Button" parent="scenes_box/scenes/test_scenes" index="1"]
|
||||||
|
|
||||||
|
anchor_left = 0.0
|
||||||
|
anchor_top = 0.0
|
||||||
|
anchor_right = 0.0
|
||||||
|
anchor_bottom = 0.0
|
||||||
|
margin_left = 91.0
|
||||||
|
margin_right = 142.0
|
||||||
|
margin_bottom = 20.0
|
||||||
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
|
rect_clip_content = false
|
||||||
|
focus_mode = 2
|
||||||
|
mouse_filter = 0
|
||||||
|
mouse_default_cursor_shape = 0
|
||||||
|
size_flags_horizontal = 9
|
||||||
|
size_flags_vertical = 1
|
||||||
|
toggle_mode = false
|
||||||
|
enabled_focus_mode = 2
|
||||||
|
shortcut = null
|
||||||
|
group = null
|
||||||
|
text = "select"
|
||||||
|
flat = false
|
||||||
|
align = 1
|
||||||
|
script = ExtResource( 1 )
|
||||||
|
_sections_unfolded = [ "Size Flags" ]
|
||||||
|
scene_path = "res://dispensaire_scenes/dispensaire_scenes.tscn"
|
||||||
|
start_position_path = "start_position"
|
||||||
|
|
||||||
|
[connection signal="pressed" from="scenes_box/scenes/main_scene/select_scene_button" to="scenes_box/scenes/main_scene/select_scene_button" method="_on_select_scene_button_pressed"]
|
||||||
|
|
||||||
|
[connection signal="pressed" from="scenes_box/scenes/test_grid_map/select_scene_button" to="scenes_box/scenes/test_grid_map/select_scene_button" method="_on_select_scene_button_pressed"]
|
||||||
|
|
||||||
|
[connection signal="pressed" from="scenes_box/scenes/test_scenes/select_scene_button" to="scenes_box/scenes/test_scenes/select_scene_button" method="_on_select_scene_button_pressed"]
|
||||||
|
|
||||||
|
|
10
gui_scene/GUI/scene_selection/select_scene_button.gd
Normal file
10
gui_scene/GUI/scene_selection/select_scene_button.gd
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
extends Button
|
||||||
|
|
||||||
|
export( String ) var scene_path = null
|
||||||
|
export( String ) var start_position_path = "start_position"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
func _on_select_scene_button_pressed():
|
||||||
|
if scene_path and not scene_path == "":
|
||||||
|
global.change_level( "game", scene_path, null, global.current_map, start_position_path )
|
|
@ -4,7 +4,7 @@
|
||||||
[ext_resource path="res://login_scene/character_selection_menu.tscn" type="PackedScene" id=2]
|
[ext_resource path="res://login_scene/character_selection_menu.tscn" type="PackedScene" id=2]
|
||||||
[ext_resource path="res://gui_scene/GUI/login/login_menu.tscn" type="PackedScene" id=3]
|
[ext_resource path="res://gui_scene/GUI/login/login_menu.tscn" type="PackedScene" id=3]
|
||||||
|
|
||||||
[node name="login_scene" type="Node" index="0"]
|
[node name="login_scene" type="Node"]
|
||||||
|
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue