Skip to content

Commit

Permalink
Add temporary "options" button
Browse files Browse the repository at this point in the history
"Options" runs the first-time setup screen for the time being. I'll think of what to put in the options window later...
  • Loading branch information
edintomato2 committed Jan 16, 2024
1 parent 1f2f6e2 commit 919cb0b
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 70 deletions.
1 change: 1 addition & 0 deletions Scenes/MainScene.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
environment = ExtResource("3_tf75n")

[node name="DebugCam" type="Camera3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 10)
cull_mask = 1048574
script = ExtResource("5_ad71m")

Expand Down
28 changes: 22 additions & 6 deletions Scenes/NoDirs.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,34 @@ layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_right = -1280.0
offset_bottom = -720.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
size_flags_vertical = 3
script = ExtResource("1_p3fr0")

[node name="TextureRect" type="TextureRect" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_right = 1280.0
offset_bottom = 720.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("1_57dfe")

[node name="Main" type="CenterContainer" parent="."]
layout_mode = 2
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_right = 1280.0
offset_bottom = 720.0
grow_horizontal = 2
grow_vertical = 2
size_flags_vertical = 3

[node name="VBox" type="VBoxContainer" parent="Main"]
Expand Down Expand Up @@ -153,9 +173,5 @@ size_flags_horizontal = 4
disabled = true
text = "Load Beret!"

[node name="Starback" type="Sprite2D" parent="."]
z_index = -1
position = Vector2(640, 360)
texture = ExtResource("1_57dfe")

[connection signal="resized" from="." to="." method="_on_resized"]
[connection signal="pressed" from="Main/VBox/LoadHARDHAT" to="." method="_on_load_hardhat_pressed"]
50 changes: 0 additions & 50 deletions Scenes/Stopper.tscn

This file was deleted.

3 changes: 3 additions & 0 deletions Scenes/UI.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ mouse_filter = 1
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
mouse_filter = 0
theme_override_constants/separation = 0

[node name="Position" type="Label" parent="VSplitContainer/Sidebar/SidebarVertical"]
Expand All @@ -278,6 +279,7 @@ horizontal_alignment = 1
[node name="EditorLog" type="RichTextLabel" parent="VSplitContainer/Sidebar/SidebarVertical"]
layout_mode = 2
size_flags_vertical = 3
mouse_force_pass_scroll_events = false
theme = ExtResource("2_pfeim")
text = "Welcome to Beret!
"
Expand Down Expand Up @@ -323,6 +325,7 @@ horizontal_alignment = 1

[node name="HSlider" type="HSlider" parent="VSplitContainer/Sidebar/SidebarVertical/PhiControl"]
layout_mode = 2
mouse_force_pass_scroll_events = false
theme = ExtResource("2_pfeim")
max_value = 3.0
tick_count = 4
Expand Down
14 changes: 6 additions & 8 deletions Scripts/UI/Titlebar/menuFile.gd
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,14 @@ func _ready():

func _on_file_menu_pressed(id: int):
match id:
0:
_fdLoad.visible = true
1:
_svFile.visible = true
2: # Saving, options
print("To do!")
0: _fdLoad.visible = true
1: _svFile.visible = true
2: # Reopen First-Time setup (for the time being)
var s = preload("res://Scenes/NoDirs.tscn")
get_tree().change_scene_to_packed(s)
4:
get_tree().root.propagate_notification(NOTIFICATION_WM_CLOSE_REQUEST)
5:
_nwFile.visible = true
5: _nwFile.visible = true


func _on_loader_level_json(_lvlJSON, _trileNum, _aoNum, _npcNum):
Expand Down
10 changes: 5 additions & 5 deletions Scripts/UI/UI.gd
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ func _notification(what):

func _process(_delta):
# Update Facing label
var facing = abs(fmod(_cursor.rotation_degrees.y, 360) / 90)
var facing = fmod(_cursor.rotation_degrees.y, 360) / 90
match str(facing):
"0": _faceLabel.text = "Facing: Left"
"1": _faceLabel.text = "Facing: Front"
"2": _faceLabel.text = "Facing: Right"
"3": _faceLabel.text = "Facing: Back"
"0", "-0": _faceLabel.text = "Facing: Left"
"1", "-3": _faceLabel.text = "Facing: Front"
"2", "-2": _faceLabel.text = "Facing: Right"
"3", "-1": _faceLabel.text = "Facing: Back"

# Update Position label
var pos = _cursor.global_position
Expand Down
2 changes: 1 addition & 1 deletion project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ config_version=5
[application]

config/name="Beret - A FEZ Level Editor"
config/version="0.1.0"
config/version="0.1.1"
run/main_scene="res://Scenes/MainScene.tscn"
config/features=PackedStringArray("4.2", "Forward Plus")
boot_splash/show_image=false
Expand Down

0 comments on commit 919cb0b

Please sign in to comment.