Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion algorithms/pseudo_code/Kruskal.tres
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_resource type="Resource" script_class="PseudoCodeData" format=3]
[gd_resource type="Resource" script_class="PseudoCodeData" format=3 uid="uid://dmj804lx6nflv"]

[ext_resource type="Script" uid="uid://c8h8cvjik2tcu" path="res://algorithms/pseudo_code/pseudo_code_resource.gd" id="1_kruskal"]

Expand Down
2 changes: 1 addition & 1 deletion controller/ghost_edge_preview.gd
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const _PHYS_CTRL_R := 4194328 ## Right Ctrl physical keycode (Input map keycode
const LINE_ALPHA := 0.42
const GHOST_DISK_ALPHA := 0.22
## Placement hint only — smaller than a real vertex so it reads lighter than committed nodes.
const GHOST_DISK_RADIUS := Globals.VERTEX_RADIUS * 0.86
const GHOST_DISK_RADIUS: float = Globals.VERTEX_RADIUS * 0.86

var _arrow: Polygon2D
var _ghost_vertex: Polygon2D
Expand Down
2 changes: 1 addition & 1 deletion controller/mouse_actions.gd
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ func _handle_left_click(event: InputEventMouseButton):
return

var selection_buffer = controller.selection_buffer
var ctrl_graph_path := is_ctrl and (
var ctrl_graph_path: bool = is_ctrl and (
Globals.current_state == Globals.State.CREATE
or Globals.current_state == Globals.State.EDGE
)
Expand Down
2 changes: 1 addition & 1 deletion core/graph/graph.gd
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func get_incoming_edges(target: Vertex) -> Array[Edge]:

## Finds the vertex whose circle contains pos. Returns NOT_FOUND if none.
func get_vertex_id_at(pos: Vector2) -> int:
var radius_sq := Globals.VERTEX_RADIUS * Globals.VERTEX_RADIUS
var radius_sq: float = Globals.VERTEX_RADIUS * Globals.VERTEX_RADIUS
for id in _vertex_spatial_index.get_candidate_ids(pos):
var v: Vertex = vertices.get(id)
if v == null:
Expand Down
6 changes: 3 additions & 3 deletions dev/profile_benchmark.tscn
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[gd_scene load_steps=2 format=3]
[gd_scene format=3 uid="uid://bnbegesykc4lk"]

[ext_resource type="Script" path="res://dev/profile_benchmark.gd" id="1"]
[ext_resource type="Script" uid="uid://dy1ix4u5djiuc" path="res://dev/profile_benchmark.gd" id="1"]

[node name="ProfileBenchmark" type="Node"]
[node name="ProfileBenchmark" type="Node" unique_id=1781357243]
script = ExtResource("1")
14 changes: 4 additions & 10 deletions project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@

config_version=5

[animation]

compatibility/default_parent_skeleton_in_mesh_instance_3d=true

[application]

config/name="Graphos"
Expand All @@ -30,6 +26,10 @@ GLogger="*uid://b7vp5dn120dii"
CommandManager="*uid://bstobjaowschd"
Notify="*res://scenes/notifier/notify.tscn"

[debug]

gdscript/warnings/treat_warnings_as_errors=false

[display]

window/size/viewport_width=1280
Expand Down Expand Up @@ -146,9 +146,3 @@ renderer/rendering_method.mobile="gl_compatibility"
environment/defaults/default_clear_color=Color(1, 1, 1, 1)
2d/snap/snap_2d_transforms_to_pixel=true
2d/snap/snap_2d_vertices_to_pixel=true

[debug]

gdscript/warnings/treat_warnings_as_errors=false
gdscript/warnings/inferred_declaration=0
gdscript/warnings/untyped_declaration=0
1 change: 0 additions & 1 deletion scenes/algorithm_controls/algorithm_controls.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ theme_override_styles/focus = SubResource("StyleBoxFlat_speed_hover")
text = "1x"

[node name="ProgressTrack" type="Control" parent="Panel/VBox" unique_id=1420688071]
clip_contents = false
custom_minimum_size = Vector2(0, 8)
layout_mode = 2
size_flags_horizontal = 3
Expand Down
3 changes: 1 addition & 2 deletions scenes/camera/camera.tscn
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[gd_scene format=3 uid="uid://cjtn7ni7fjvft"]

[ext_resource type="Script" path="res://scenes/camera/camera.gd" id="1_cam_script"]
[ext_resource type="Script" uid="uid://dp50yd7ftv7w4" path="res://scenes/camera/camera.gd" id="1_cam_script"]

[node name="Camera" type="Camera2D" unique_id=603822564]
script = ExtResource("1_cam_script")
enabled = true
6 changes: 2 additions & 4 deletions scenes/edge_view/edge_view.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ antialiased = true

[node name="Weight" type="Label" parent="." unique_id=152968238]
texture_filter = 2
mouse_filter = 2
offset_right = 40.0
offset_bottom = 23.0
theme_override_colors/font_color = Color(0.118, 0.118, 0.18, 1)
Expand All @@ -47,16 +46,15 @@ vertical_alignment = 1

[node name="WeightEdit" type="LineEdit" parent="." unique_id=918274631]
visible = false
mouse_filter = 2
offset_right = 56.0
offset_bottom = 30.0
mouse_filter = 2
theme_override_colors/font_color = Color(0.118, 0.118, 0.18, 1)
theme_override_fonts/font = ExtResource("2_ewg0c")
theme_override_font_sizes/font_size = 22
theme_override_styles/normal = SubResource("StyleBoxEmpty_weight_edit")
theme_override_styles/focus = SubResource("StyleBoxEmpty_weight_edit")
theme_override_styles/read_only = SubResource("StyleBoxEmpty_weight_edit")
theme_override_styles/disabled = SubResource("StyleBoxEmpty_weight_edit")
theme_override_styles/focus = SubResource("StyleBoxEmpty_weight_edit")
alignment = 1
flat = true

Expand Down
1 change: 1 addition & 0 deletions scenes/feedback/feedback.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
script = ExtResource("1_kd6fv")

[node name="MarginContainer" type="MarginContainer" parent="." unique_id=437233443]
Expand Down
9 changes: 4 additions & 5 deletions scenes/notifier/notify.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ script = ExtResource("1_kfvck")

[node name="PanelContainer" type="PanelContainer" parent="." unique_id=299046112]
custom_minimum_size = Vector2(100, 50)
layout_mode = 1
anchors_preset = 1
anchor_left = 1.0
anchor_right = 1.0
Expand All @@ -23,12 +22,12 @@ theme_override_styles/panel = ExtResource("2_7r6yp")

[node name="Label" type="Label" parent="PanelContainer" unique_id=853132152]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 1
theme_override_colors/font_color = Color(0.118, 0.118, 0.18, 1)
theme_override_colors/font_shadow_color = Color(0, 0, 0, 0)
theme_override_font_sizes/font_size = 15
theme_override_constants/line_spacing = 3
autowrap_mode = 3
size_flags_horizontal = 3
size_flags_vertical = 1
theme_override_font_sizes/font_size = 15
horizontal_alignment = 1
vertical_alignment = 1
autowrap_mode = 3
35 changes: 15 additions & 20 deletions scenes/presets/preset_picker.tscn
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
[gd_scene load_steps=3 format=3]
[gd_scene format=3 uid="uid://dor2q5ey20s4e"]

[ext_resource type="Script" path="res://scenes/presets/preset_picker.gd" id="1_script"]
[ext_resource type="Script" uid="uid://cvucfnlol4whc" path="res://scenes/presets/preset_picker.gd" id="1_script"]
[ext_resource type="StyleBox" uid="uid://bdiessvqitwl2" path="res://scenes/tool_bar/tool_bar_background.tres" id="2_bar"]

[node name="PresetPickerRoot" type="CanvasLayer"]
[node name="PresetPickerRoot" type="CanvasLayer" unique_id=1141586939]
layer = 2
script = ExtResource("1_script")
graph_controller_path = NodePath("../GraphController")

[node name="Margin" type="MarginContainer" parent="."]
anchors_preset = 2
[node name="Margin" type="MarginContainer" parent="." unique_id=1174629466]
anchors_preset = 1
anchor_left = 1.0
anchor_right = 1.0
offset_left = -202.0
Expand All @@ -18,59 +17,55 @@ offset_right = -20.0
offset_bottom = 68.0
grow_horizontal = 0

[node name="HBox" type="HBoxContainer" parent="Margin"]
[node name="HBox" type="HBoxContainer" parent="Margin" unique_id=227239117]
layout_mode = 2
size_flags_horizontal = 8
size_flags_vertical = 4
theme_override_constants/separation = 8

[node name="ShareButton" type="Button" parent="Margin/HBox"]
[node name="ShareButton" type="Button" parent="Margin/HBox" unique_id=1463491879]
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
tooltip_text = "Share
Copy a link to this graph"
text = "Share"

[node name="PresetsButton" type="Button" parent="Margin/HBox"]
[node name="PresetsButton" type="Button" parent="Margin/HBox" unique_id=1408462323]
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
tooltip_text = "Presets
Load a sample graph"
text = "Presets"

[node name="PresetsPopup" type="Popup" parent="."]
transparent = false
borderless = true
popup_window = true
unresizable = true
visible = false
[node name="PresetsPopup" type="Popup" parent="." unique_id=768198572]
size = Vector2i(328, 380)
min_size = Vector2i(328, 380)

[node name="PanelRoot" type="PanelContainer" parent="PresetsPopup"]
[node name="PanelRoot" type="PanelContainer" parent="PresetsPopup" unique_id=408387991]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_styles/panel = ExtResource("2_bar")

[node name="Margin" type="MarginContainer" parent="PresetsPopup/PanelRoot"]
[node name="Margin" type="MarginContainer" parent="PresetsPopup/PanelRoot" unique_id=1776170700]
layout_mode = 2
theme_override_constants/margin_left = 6
theme_override_constants/margin_top = 6
theme_override_constants/margin_right = 6
theme_override_constants/margin_bottom = 6

[node name="Scroll" type="ScrollContainer" parent="PresetsPopup/PanelRoot/Margin"]
[node name="Scroll" type="ScrollContainer" parent="PresetsPopup/PanelRoot/Margin" unique_id=1638118207]
custom_minimum_size = Vector2(0, 332)
layout_mode = 2
size_flags_vertical = 3
custom_minimum_size = Vector2(0, 332)
horizontal_scroll_mode = 0
vertical_scroll_mode = 2

[node name="Grid" type="GridContainer" parent="PresetsPopup/PanelRoot/Margin/Scroll"]
[node name="Grid" type="GridContainer" parent="PresetsPopup/PanelRoot/Margin/Scroll" unique_id=644374042]
layout_mode = 2
size_flags_horizontal = 3
theme_override_constants/h_separation = 6
Expand Down
2 changes: 0 additions & 2 deletions scenes/pseudo_visualizer/pseudo_visualizer.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
[node name="CodeBackground" type="PanelContainer" unique_id=870985294]
z_index = 10
texture_filter = 4
custom_minimum_size = Vector2(0, 0)
offset_right = 1.0
offset_bottom = 1.0
size_flags_horizontal = 8
Expand Down Expand Up @@ -57,4 +56,3 @@ text = "[outline_size=2][outline_color=black][color=#0080ffff][b]1. Q ← new Qu
"
fit_content = true
autowrap_mode = 0
vertical_alignment = 0
2 changes: 1 addition & 1 deletion scenes/selection_bounds/selection_bounds_view.gd
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func _draw() -> void:
func _handle_world_size(ui_scale: float) -> float:
var target_screen_px := 8.0
var uncapped := target_screen_px * ui_scale
var max_world := Globals.VERTEX_RADIUS * 0.85
var max_world: float = Globals.VERTEX_RADIUS * 0.85
return clampf(minf(uncapped, max_world), 1.2, max_world)

func _draw_handle(pos: Vector2, size: float, outline_scale: float) -> void:
Expand Down
36 changes: 17 additions & 19 deletions scenes/tool_bar/tool_bar.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,17 @@

[ext_resource type="Script" uid="uid://dcl6ckcas6der" path="res://scenes/tool_bar/tool_bar.gd" id="1_gdu6t"]
[ext_resource type="Script" uid="uid://css85v57pq6ys" path="res://scenes/tool_bar/button_highlights.gd" id="1_uiivm"]
[ext_resource type="StyleBox" uid="uid://bdiessvqitwl2" path="res://scenes/tool_bar/tool_bar_background.tres" id="2_u1pd4"]
[ext_resource type="StyleBox" uid="uid://npixnrumei6q" path="res://scenes/tool_bar/button_normal.tres" id="3_lpcgc"]
[ext_resource type="StyleBox" uid="uid://edc2pra87k3x" path="res://scenes/tool_bar/button_hover.tres" id="4_u1pd4"]
[ext_resource type="Texture2D" uid="uid://v5eliv4lx04j" path="res://assets/icons/cursor-alt-svgrepo-com.svg" id="4_selection_icon"]
[ext_resource type="StyleBox" uid="uid://edc2pra87k3x" path="res://scenes/tool_bar/button_hover.tres" id="4_u1pd4"]
[ext_resource type="Texture2D" uid="uid://cmgktymkkl21e" path="res://assets/icons/create_tool_icon.svg" id="5_2j54p"]
[ext_resource type="Texture2D" path="res://assets/icons/hand_toolbar.svg" id="6_pan"]
[ext_resource type="Texture2D" uid="uid://b6juabb4v03bc" path="res://assets/icons/hand_toolbar.svg" id="6_pan"]
[ext_resource type="Texture2D" uid="uid://bqx8k2m4n7p3w" path="res://assets/icons/edge_tool_icon.png" id="7_edge_icon"]
[ext_resource type="Texture2D" path="res://assets/icons/eraser_icon.svg" id="8_eraser_icon"]

[sub_resource type="StyleBoxLine" id="StyleBoxLine_lpcgc"]
color = Color(0.72, 0.72, 0.76, 0.85)
grow_begin = -4.0
grow_end = -4.0
thickness = 1
vertical = true
[ext_resource type="Texture2D" uid="uid://c6mroisvwpr7w" path="res://assets/icons/eraser_icon.svg" id="8_eraser_icon"]

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_toolbar_panel"]
content_margin_left = 5.0
content_margin_right = 5.0
bg_color = Color(1, 1, 1, 1)
border_width_left = 1
border_width_top = 1
Expand All @@ -33,11 +27,15 @@ expand_margin_left = 7.0
expand_margin_top = 7.0
expand_margin_right = 7.0
expand_margin_bottom = 7.0
shadow_color = Color(0, 0, 0, 0.10)
shadow_color = Color(0, 0, 0, 0.1)
shadow_size = 6
shadow_offset = Vector2(0, 2)
content_margin_left = 5.0
content_margin_right = 5.0

[sub_resource type="StyleBoxLine" id="StyleBoxLine_lpcgc"]
color = Color(0.72, 0.72, 0.76, 0.85)
grow_begin = -4.0
grow_end = -4.0
vertical = true

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_toggle_normal"]
content_margin_left = 8.0
Expand Down Expand Up @@ -125,9 +123,9 @@ texture_filter = 4
custom_minimum_size = Vector2(36, 36)
layout_mode = 2
size_flags_vertical = 4
focus_mode = 0
tooltip_text = "Select
Click or drag to select · Right-click selection for options"
focus_mode = 0
theme_override_styles/normal = ExtResource("3_lpcgc")
theme_override_styles/pressed = ExtResource("4_u1pd4")
theme_override_styles/hover = ExtResource("4_u1pd4")
Expand Down Expand Up @@ -159,9 +157,9 @@ texture_filter = 4
custom_minimum_size = Vector2(36, 36)
layout_mode = 2
size_flags_vertical = 4
focus_mode = 0
tooltip_text = "Create
Click to add vertex · Hold Ctrl + click two vertices to connect"
focus_mode = 0
theme_override_styles/normal = ExtResource("3_lpcgc")
theme_override_styles/pressed = ExtResource("4_u1pd4")
theme_override_styles/hover = ExtResource("4_u1pd4")
Expand Down Expand Up @@ -194,9 +192,9 @@ texture_filter = 4
custom_minimum_size = Vector2(36, 36)
layout_mode = 2
size_flags_vertical = 4
focus_mode = 0
tooltip_text = "Edge
Pick a start vertex, then a second to connect · Same vertex cancels"
focus_mode = 0
theme_override_styles/normal = ExtResource("3_lpcgc")
theme_override_styles/pressed = ExtResource("4_u1pd4")
theme_override_styles/hover = ExtResource("4_u1pd4")
Expand Down Expand Up @@ -228,9 +226,9 @@ texture_filter = 4
custom_minimum_size = Vector2(36, 36)
layout_mode = 2
size_flags_vertical = 4
focus_mode = 0
tooltip_text = "Pan
Drag to pan · Scroll to zoom"
focus_mode = 0
theme_override_styles/normal = ExtResource("3_lpcgc")
theme_override_styles/pressed = ExtResource("4_u1pd4")
theme_override_styles/hover = ExtResource("4_u1pd4")
Expand Down Expand Up @@ -262,9 +260,9 @@ texture_filter = 4
custom_minimum_size = Vector2(36, 36)
layout_mode = 2
size_flags_vertical = 4
focus_mode = 0
tooltip_text = "Erase
Click and drag to erase vertices and edges"
focus_mode = 0
theme_override_styles/normal = ExtResource("3_lpcgc")
theme_override_styles/pressed = ExtResource("4_u1pd4")
theme_override_styles/hover = ExtResource("4_u1pd4")
Expand Down
8 changes: 4 additions & 4 deletions scenes/vertex_view/vertex_view.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ horizontal_alignment = 1
vertical_alignment = 1
metadata/_edit_use_anchors_ = true

[node name="KeyBadge" type="Node2D" parent="."]
[node name="KeyBadge" type="Node2D" parent="." unique_id=938544250]
position = Vector2(16, -16)

[node name="BubbleRing" type="Polygon2D" parent="KeyBadge"]
[node name="BubbleRing" type="Polygon2D" parent="KeyBadge" unique_id=521154687]
color = Color(0.58, 0.64, 0.72, 1)

[node name="Bubble" type="Polygon2D" parent="KeyBadge"]
[node name="Bubble" type="Polygon2D" parent="KeyBadge" unique_id=1470173891]
color = Color(0.945098, 0.960784, 0.976471, 1)

[node name="KeyLabel" type="Label" parent="KeyBadge"]
[node name="KeyLabel" type="Label" parent="KeyBadge" unique_id=1944785353]
offset_left = -15.0
offset_top = -10.0
offset_right = 15.0
Expand Down
Loading