Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
To Do Break Down
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
breakdown
To Do Break Down
Commits
1b8cac91
Commit
1b8cac91
authored
Nov 29, 2021
by
Julia Santos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Notepad now opens and closes when clicked on
parent
ed49caab
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
59 deletions
+77
-59
Multi.tscn
Multi.tscn
+58
-35
To do UI.gd
To do UI.gd
+2
-13
To do hitbox.gd
To do hitbox.gd
+17
-11
No files found.
Multi.tscn
View file @
1b8cac91
[gd_scene load_steps=3
3
format=2]
[gd_scene load_steps=3
4
format=2]
[ext_resource path="res://Test room 1.tscn" type="PackedScene" id=1]
[ext_resource path="res://assets/189066690_228150108704696_3850052974465333899_n.png" type="Texture" id=2]
...
...
@@ -28,18 +28,34 @@
[ext_resource path="res://Desk.tscn" type="PackedScene" id=26]
[ext_resource path="res://Living room.tscn" type="PackedScene" id=27]
[sub_resource type="StyleBoxFlat" id=1]
[sub_resource type="Animation" id=1]
resource_name = "Notepad open"
length = 0.5
tracks/0/type = "value"
tracks/0/path = NodePath("To do:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.1, 0.2, 0.4, 0.5 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1 ),
"update": 0,
"values": [ Vector2( 474.699, 104.779 ), Vector2( 474.699, 90.9202 ), Vector2( 474.699, 116.119 ), Vector2( 474.699, -64.0501 ), Vector2( 474.699, -72.8696 ) ]
}
[sub_resource type="StyleBoxFlat" id=2]
bg_color = Color( 0.984314, 0.847059, 0.435294, 1 )
[sub_resource type="RectangleShape2D" id=2]
extents = Vector2( 143.453, 196.701 )
[sub_resource type="StyleBoxEmpty" id=4]
[sub_resource type="StyleBoxEmpty" id=3]
[sub_resource type="RectangleShape2D" id=3]
extents = Vector2( 143.453, 196.701 )
[sub_resource type="StyleBoxFlat" id=
4
]
[sub_resource type="StyleBoxFlat" id=
5
]
bg_color = Color( 0.466667, 0.631373, 0.168627, 1 )
[sub_resource type="StyleBoxFlat" id=
5
]
[sub_resource type="StyleBoxFlat" id=
6
]
bg_color = Color( 0.145098, 0.145098, 0.164706, 1 )
[node name="Node2D" type="Node2D"]
...
...
@@ -130,44 +146,45 @@ scale = Vector2( 2.86111, 2.86111 )
current = true
[node name="UI" type="Control" parent="."]
margin_left = 214.135
margin_top = 386.725
margin_right = 254.135
margin_bottom = 426.725
margin_left = 214.0
margin_top = 387.0
margin_right = 1031.0
margin_bottom = 872.0
mouse_filter = 2
__meta__ = {
"_edit_use_anchors_": false
}
[node name="To do" type="Panel" parent="UI"]
margin_left = 474.699
margin_top = 140.82
margin_right = 761.699
margin_bottom = 533.82
custom_styles/panel = SubResource( 1 )
[node name="AnimationPlayer" type="AnimationPlayer" parent="UI"]
"anims/Notepad open" = SubResource( 1 )
[node name="To do" type="StaticBody2D" parent="UI"]
position = Vector2( 474.699, 104.779 )
input_pickable = true
script = ExtResource( 16 )
[node name="Panel" type="Panel" parent="UI/To do"]
margin_right = 287.0
margin_bottom = 393.0
mouse_filter = 2
custom_styles/panel = SubResource( 2 )
script = ExtResource( 15 )
__meta__ = {
"_edit_group_": true,
"_edit_use_anchors_": false
}
[node name="Hitbox" type="StaticBody2D" parent="UI/To do"]
script = ExtResource( 16 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="UI/To do/Hitbox"]
position = Vector2( 144.013, 197.335 )
shape = SubResource( 2 )
[node name="Title" type="RichTextLabel" parent="UI/To do"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 13.0
margin_top = 16.0
margin_right = -213.0
margin_bottom = -362.0
margin_right = 113.0
margin_bottom = 116.0
mouse_filter = 2
custom_colors/default_color = Color( 0, 0, 0, 1 )
text = "To Do:"
__meta__ = {
"_edit_use_anchors_":
tru
e
"_edit_use_anchors_":
fals
e
}
[node name="Quests" type="RichTextLabel" parent="UI/To do"]
...
...
@@ -175,6 +192,7 @@ margin_left = 14.7614
margin_top = 39.8421
margin_right = 272.761
margin_bottom = 256.842
mouse_filter = 2
custom_colors/default_color = Color( 0, 0, 0, 1 )
script = ExtResource( 11 )
__meta__ = {
...
...
@@ -184,12 +202,13 @@ quests = PoolStringArray( "Do laundry" )
[node name="Words" type="ItemList" parent="UI/To do"]
anchor_right = 0.267
margin_left =
58.0
margin_top = 4
7.0
margin_right =
165.371
margin_bottom = 15
4.0
margin_left =
32.8016
margin_top = 4
8.2599
margin_right =
252.802
margin_bottom = 15
5.26
rect_clip_content = false
custom_styles/bg = SubResource( 3 )
mouse_filter = 2
custom_styles/bg = SubResource( 4 )
custom_colors/font_color_selected = Color( 0, 0, 0, 1 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
custom_constants/vseparation = 10
...
...
@@ -199,6 +218,10 @@ __meta__ = {
"_edit_use_anchors_": false
}
[node name="CollisionShape2D" type="CollisionShape2D" parent="UI/To do"]
position = Vector2( 144.013, 197.335 )
shape = SubResource( 3 )
[node name="Inventory" type="ItemList" parent="UI"]
margin_left = -201.361
margin_top = 128.912
...
...
@@ -288,8 +311,8 @@ margin_left = -197.122
margin_top = -367.765
margin_right = 235.878
margin_bottom = -325.765
custom_styles/fg = SubResource(
4
)
custom_styles/bg = SubResource(
5
)
custom_styles/fg = SubResource(
5
)
custom_styles/bg = SubResource(
6
)
value = 50.0
percent_visible = false
__meta__ = {
...
...
To do UI.gd
View file @
1b8cac91
extends Panel
onready var opened = false
#onready var animator = get_parent().get_node("AnimationPlayer")
# Called when the node enters the scene tree for the first time.
func _ready():
pass
func _open_UI():
print("Clicked on to do list")
if opened:
set_position(Vector2(474.699,140.82))
opened = false
#x = 474.699
#y = 140.82
else:
set_position(Vector2(474.699,-150))
opened = true
#x = 474.699
#y = -150
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
...
...
To do hitbox.gd
View file @
1b8cac91
extends StaticBody2D
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
onready var opened
onready var animator = get_parent().get_node("AnimationPlayer")
# Called when the node enters the scene tree for the first time.
func _ready():
opened = false
pass # Replace with function body.
func _input_event(viewport, event, shape_idx): # executes when clicked on
if event is InputEventMouseButton:
if event.button_index == BUTTON_LEFT and event.pressed:
get_parent()._open_UI()
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
_open_UI()
func _open_UI():
if !opened:
animator.play("Notepad open")
opened = true
#x = 474.699
#y = 140.82
else:
animator.play_backwards("Notepad open")
opened = false
#x = 474.699
#y = -150
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment