1
0
Fork 0

Compare commits

...

3 Commits

Author SHA1 Message Date
under 5bdca00c5e Fix game window not receiving inputs
When I added the "Windows" node to contain all the windows, it started
blocking the inputs to the game window because it covers the entire
window and its mouse_filter was set to block.
2024-03-20 13:30:08 -07:00
under b83bd2074a Move windows into foreground when selected 2024-03-20 13:29:18 -07:00
under cc629bfc42 Move windows into Windows control
It's annoying to find all the windows so I'd like them to be childed
under one node to make that easier.
2024-03-20 13:20:51 -07:00
2 changed files with 19 additions and 8 deletions

View File

@ -12,6 +12,7 @@ func _input(event: InputEvent):
if event.pressed: if event.pressed:
if get_global_rect().has_point(get_global_mouse_position()): if get_global_rect().has_point(get_global_mouse_position()):
desktop.current_window = self desktop.current_window = self
get_parent().move_child(self, get_parent().get_child_count())
elif event is InputEventKey: elif event is InputEventKey:
if event.keycode == KEY_F11: if event.keycode == KEY_F11:
if event.pressed: if event.pressed:

View File

@ -416,23 +416,33 @@ text = "Inventory
" "
script = SubResource("GDScript_2vlp5") script = SubResource("GDScript_2vlp5")
[node name="DesktopWindow" parent="." node_paths=PackedStringArray("desktop", "maximized_windows", "taskbar") instance=ExtResource("11_m0w0q")] [node name="Windows" type="Control" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
metadata/_edit_lock_ = true
[node name="DesktopWindow" parent="Windows" node_paths=PackedStringArray("desktop", "maximized_windows", "taskbar") instance=ExtResource("11_m0w0q")]
offset_left = 132.0 offset_left = 132.0
offset_top = 185.0 offset_top = 185.0
offset_right = 293.0 offset_right = 293.0
offset_bottom = 320.0 offset_bottom = 320.0
desktop = NodePath("..") desktop = NodePath("../..")
maximized_windows = NodePath("../VBoxContainer/MaximizedWindows") maximized_windows = NodePath("../../VBoxContainer/MaximizedWindows")
taskbar = NodePath("../VBoxContainer/TaskBar") taskbar = NodePath("../../VBoxContainer/TaskBar")
[node name="DesktopWindow2" parent="." node_paths=PackedStringArray("desktop", "maximized_windows", "taskbar") instance=ExtResource("11_m0w0q")] [node name="DesktopWindow2" parent="Windows" node_paths=PackedStringArray("desktop", "maximized_windows", "taskbar") instance=ExtResource("11_m0w0q")]
offset_left = 190.0 offset_left = 190.0
offset_top = 197.0 offset_top = 197.0
offset_right = 351.0 offset_right = 351.0
offset_bottom = 332.0 offset_bottom = 332.0
desktop = NodePath("..") desktop = NodePath("../..")
maximized_windows = NodePath("../VBoxContainer/MaximizedWindows") maximized_windows = NodePath("../../VBoxContainer/MaximizedWindows")
taskbar = NodePath("../VBoxContainer/TaskBar") taskbar = NodePath("../../VBoxContainer/TaskBar")
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] [node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
stream = ExtResource("12_16brn") stream = ExtResource("12_16brn")