mirror of
https://github.com/Dariasteam/Cows-Revenge.git
synced 2026-01-23 02:15:17 +00:00
305 lines
7.1 KiB
Text
305 lines
7.1 KiB
Text
[gd_scene load_steps=7 format=1]
|
|
|
|
[ext_resource path="res://Scenes/Menu/level_unlock.gd" type="Script" id=1]
|
|
[ext_resource path="res://Fonts/pixelated_title.fnt" type="BitmapFont" id=2]
|
|
[ext_resource path="res://Scenes/Menu/select_level.gd" type="Script" id=3]
|
|
[ext_resource path="res://Scenes/Menu/button_back.tscn" type="PackedScene" id=4]
|
|
[ext_resource path="res://Scenes/Menu/main_menu.tscn" type="PackedScene" id=5]
|
|
|
|
[sub_resource type="GDScript" id=1]
|
|
|
|
script/source = "# jackmakesthing on godot Q&A
|
|
|
|
extends VBoxContainer
|
|
|
|
onready var scroll_container = get_parent()
|
|
|
|
func _ready():
|
|
for child in get_children():
|
|
child.connect(\"focus_enter\", self, \"_on_focus_change\")
|
|
|
|
func _on_focus_change():
|
|
var focused = get_focus_owner()
|
|
var focus_offset = focused.get_pos().y - 100
|
|
|
|
var scrolled_top = scroll_container.get_v_scroll()
|
|
var scrolled_bottom = scrolled_top + scroll_container.get_size().y - focused.get_size().y
|
|
|
|
if focus_offset < scrolled_top or focus_offset >= scrolled_bottom - 200:
|
|
scroll_container.set_v_scroll(focus_offset)"
|
|
|
|
[node name="Node2D" type="Node2D"]
|
|
|
|
script/script = ExtResource( 1 )
|
|
|
|
[node name="Panel" type="Panel" parent="."]
|
|
|
|
focus/ignore_mouse = false
|
|
focus/stop_mouse = true
|
|
size_flags/horizontal = 2
|
|
size_flags/vertical = 2
|
|
margin/left = 37.0
|
|
margin/top = 33.0
|
|
margin/right = 1248.0
|
|
margin/bottom = 694.0
|
|
|
|
[node name="VButtonArray" type="VButtonArray" parent="."]
|
|
|
|
focus/ignore_mouse = false
|
|
focus/stop_mouse = true
|
|
size_flags/horizontal = 2
|
|
size_flags/vertical = 2
|
|
margin/left = 197.0
|
|
margin/top = 203.0
|
|
margin/right = 197.0
|
|
margin/bottom = 203.0
|
|
flat = false
|
|
button/count = 0
|
|
button/min_button_size = -1.0
|
|
button/align = 1065353216
|
|
|
|
[node name="ScrollContainer" type="ScrollContainer" parent="VButtonArray"]
|
|
|
|
focus/ignore_mouse = true
|
|
focus/stop_mouse = true
|
|
size_flags/horizontal = 2
|
|
size_flags/vertical = 2
|
|
margin/left = 0.0
|
|
margin/top = 0.0
|
|
margin/right = 897.0
|
|
margin/bottom = 422.0
|
|
scroll/horizontal = false
|
|
scroll/vertical = true
|
|
scroll/deadzone = 0
|
|
|
|
[node name="VBoxContainer" type="VBoxContainer" parent="VButtonArray/ScrollContainer"]
|
|
|
|
visibility/behind_parent = true
|
|
focus/ignore_mouse = false
|
|
focus/stop_mouse = false
|
|
size_flags/horizontal = 3
|
|
size_flags/vertical = 3
|
|
margin/left = 0.0
|
|
margin/top = 0.0
|
|
margin/right = 885.0
|
|
margin/bottom = 920.0
|
|
custom_constants/separation = 25
|
|
alignment = 0
|
|
script/script = SubResource( 1 )
|
|
|
|
[node name="Button1" type="Button" parent="VButtonArray/ScrollContainer/VBoxContainer"]
|
|
|
|
rect/min_size = Vector2( 50, 80 )
|
|
focus/ignore_mouse = false
|
|
focus/stop_mouse = true
|
|
size_flags/horizontal = 3
|
|
size_flags/vertical = 2
|
|
margin/left = 0.0
|
|
margin/top = 0.0
|
|
margin/right = 885.0
|
|
margin/bottom = 80.0
|
|
custom_fonts/font = ExtResource( 2 )
|
|
disabled = true
|
|
toggle_mode = false
|
|
enabled_focus_mode = 2
|
|
shortcut = null
|
|
text = "EP1"
|
|
flat = false
|
|
script/script = ExtResource( 3 )
|
|
id = 0
|
|
|
|
[node name="Button2" type="Button" parent="VButtonArray/ScrollContainer/VBoxContainer"]
|
|
|
|
rect/min_size = Vector2( 50, 80 )
|
|
focus/ignore_mouse = false
|
|
focus/stop_mouse = true
|
|
size_flags/horizontal = 3
|
|
size_flags/vertical = 2
|
|
margin/left = 0.0
|
|
margin/top = 105.0
|
|
margin/right = 885.0
|
|
margin/bottom = 185.0
|
|
custom_fonts/font = ExtResource( 2 )
|
|
disabled = true
|
|
toggle_mode = false
|
|
enabled_focus_mode = 2
|
|
shortcut = null
|
|
text = "EP2"
|
|
flat = false
|
|
script/script = ExtResource( 3 )
|
|
id = 1
|
|
|
|
[node name="Button3" type="Button" parent="VButtonArray/ScrollContainer/VBoxContainer"]
|
|
|
|
rect/min_size = Vector2( 50, 80 )
|
|
focus/ignore_mouse = false
|
|
focus/stop_mouse = true
|
|
size_flags/horizontal = 3
|
|
size_flags/vertical = 2
|
|
margin/left = 0.0
|
|
margin/top = 210.0
|
|
margin/right = 885.0
|
|
margin/bottom = 290.0
|
|
custom_fonts/font = ExtResource( 2 )
|
|
disabled = true
|
|
toggle_mode = false
|
|
enabled_focus_mode = 2
|
|
shortcut = null
|
|
text = "EP3"
|
|
flat = false
|
|
script/script = ExtResource( 3 )
|
|
id = 2
|
|
|
|
[node name="Button4" type="Button" parent="VButtonArray/ScrollContainer/VBoxContainer"]
|
|
|
|
rect/min_size = Vector2( 50, 80 )
|
|
focus/ignore_mouse = false
|
|
focus/stop_mouse = true
|
|
size_flags/horizontal = 3
|
|
size_flags/vertical = 2
|
|
margin/left = 0.0
|
|
margin/top = 315.0
|
|
margin/right = 885.0
|
|
margin/bottom = 395.0
|
|
custom_fonts/font = ExtResource( 2 )
|
|
disabled = true
|
|
toggle_mode = false
|
|
enabled_focus_mode = 2
|
|
shortcut = null
|
|
text = "EP4"
|
|
flat = false
|
|
script/script = ExtResource( 3 )
|
|
id = 3
|
|
|
|
[node name="Button5" type="Button" parent="VButtonArray/ScrollContainer/VBoxContainer"]
|
|
|
|
rect/min_size = Vector2( 50, 80 )
|
|
focus/ignore_mouse = false
|
|
focus/stop_mouse = true
|
|
size_flags/horizontal = 3
|
|
size_flags/vertical = 2
|
|
margin/left = 0.0
|
|
margin/top = 420.0
|
|
margin/right = 885.0
|
|
margin/bottom = 500.0
|
|
custom_fonts/font = ExtResource( 2 )
|
|
disabled = true
|
|
toggle_mode = false
|
|
enabled_focus_mode = 2
|
|
shortcut = null
|
|
text = "EP5"
|
|
flat = false
|
|
script/script = ExtResource( 3 )
|
|
id = 4
|
|
|
|
[node name="Button6" type="Button" parent="VButtonArray/ScrollContainer/VBoxContainer"]
|
|
|
|
rect/min_size = Vector2( 50, 80 )
|
|
focus/ignore_mouse = false
|
|
focus/stop_mouse = true
|
|
size_flags/horizontal = 3
|
|
size_flags/vertical = 2
|
|
margin/left = 0.0
|
|
margin/top = 525.0
|
|
margin/right = 885.0
|
|
margin/bottom = 605.0
|
|
custom_fonts/font = ExtResource( 2 )
|
|
disabled = true
|
|
toggle_mode = false
|
|
enabled_focus_mode = 2
|
|
shortcut = null
|
|
text = "EP6"
|
|
flat = false
|
|
script/script = ExtResource( 3 )
|
|
id = 5
|
|
|
|
[node name="Button7" type="Button" parent="VButtonArray/ScrollContainer/VBoxContainer"]
|
|
|
|
rect/min_size = Vector2( 50, 80 )
|
|
focus/ignore_mouse = false
|
|
focus/stop_mouse = true
|
|
size_flags/horizontal = 3
|
|
size_flags/vertical = 2
|
|
margin/left = 0.0
|
|
margin/top = 630.0
|
|
margin/right = 885.0
|
|
margin/bottom = 710.0
|
|
custom_fonts/font = ExtResource( 2 )
|
|
disabled = true
|
|
toggle_mode = false
|
|
enabled_focus_mode = 2
|
|
shortcut = null
|
|
text = "EP7"
|
|
flat = false
|
|
script/script = ExtResource( 3 )
|
|
id = 6
|
|
|
|
[node name="Button8" type="Button" parent="VButtonArray/ScrollContainer/VBoxContainer"]
|
|
|
|
rect/min_size = Vector2( 50, 80 )
|
|
focus/ignore_mouse = false
|
|
focus/stop_mouse = true
|
|
size_flags/horizontal = 3
|
|
size_flags/vertical = 2
|
|
margin/left = 0.0
|
|
margin/top = 735.0
|
|
margin/right = 885.0
|
|
margin/bottom = 815.0
|
|
custom_fonts/font = ExtResource( 2 )
|
|
disabled = true
|
|
toggle_mode = false
|
|
enabled_focus_mode = 2
|
|
shortcut = null
|
|
text = "EP8"
|
|
flat = false
|
|
script/script = ExtResource( 3 )
|
|
id = 7
|
|
|
|
[node name="Button9" type="Button" parent="VButtonArray/ScrollContainer/VBoxContainer"]
|
|
|
|
rect/min_size = Vector2( 50, 80 )
|
|
focus/ignore_mouse = false
|
|
focus/stop_mouse = true
|
|
size_flags/horizontal = 3
|
|
size_flags/vertical = 2
|
|
margin/left = 0.0
|
|
margin/top = 840.0
|
|
margin/right = 885.0
|
|
margin/bottom = 920.0
|
|
custom_fonts/font = ExtResource( 2 )
|
|
disabled = true
|
|
toggle_mode = false
|
|
enabled_focus_mode = 2
|
|
shortcut = null
|
|
text = "EP9"
|
|
flat = false
|
|
script/script = ExtResource( 3 )
|
|
id = 8
|
|
|
|
[node name="Button" parent="VButtonArray" instance=ExtResource( 4 )]
|
|
|
|
margin/left = 293.0
|
|
margin/top = 461.0
|
|
margin/right = 575.0
|
|
margin/bottom = 509.0
|
|
scene = ExtResource( 5 )
|
|
|
|
[node name="Label" type="Label" parent="."]
|
|
|
|
rect/scale = Vector2( 2, 2 )
|
|
focus/ignore_mouse = true
|
|
focus/stop_mouse = true
|
|
size_flags/horizontal = 2
|
|
size_flags/vertical = 0
|
|
margin/left = 381.0
|
|
margin/top = 58.0
|
|
margin/right = 651.0
|
|
margin/bottom = 89.0
|
|
custom_fonts/font = ExtResource( 2 )
|
|
text = "CHAPTERS"
|
|
align = 1
|
|
percent_visible = 1.0
|
|
lines_skipped = 0
|
|
max_lines_visible = -1
|
|
|
|
|