-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aa68296
commit e96f4be
Showing
4 changed files
with
124 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
created: 2025-02-06T17:07:06Z | ||
--- | ||
|
||
_no signal_ stream 171: | ||
- Copied TODOs from [20250202182941](20250202182941.md) | ||
- Ran into a weird `Window` focus issue [20250206191936](20250206191936.md) | ||
|
||
Tanuki: | ||
- [ ] Add audio-locked box | ||
- [ ] Articulate piano keys | ||
- [ ] Decorate music room | ||
- [ ] Separate toilet lever so it can be animated in Godot | ||
- [ ] Fix Rubix cube UVs | ||
- [ ] Make Naoko's charm model | ||
|
||
TODO: | ||
- [ ] Add previews to audio settings | ||
- [ ] [#44](https://gitea.arcturuscollective.com/exodrifter/lost-contact/issues/44) Controller support | ||
- [ ] Sometimes the anchor point is wrong when you select an item, not sure how to reproduce. | ||
|
||
Part One: | ||
- [x] Add a map button | ||
- [ ] Zoom in and out on cursor position in map | ||
- [ ] Show current position on map | ||
- [ ] Add buttons for zooming in and out | ||
- [ ] Add button for resetting view | ||
- [ ] Remember map position in save | ||
|
||
Part Two: | ||
- [ ] Add poem song puzzle to music room | ||
- [ ] Make toilets flushable | ||
- [ ] Implement Rubix cube | ||
|
||
Part Three: | ||
- [ ] Delete all items when transitioning to part three | ||
- [ ] Add footstep sounds | ||
- [ ] Add breathing sounds | ||
- [ ] Add dialog to energy lab | ||
- [ ] Add dialog to radio lab | ||
- [ ] Add fuse, eva, and card writer | ||
- [ ] Add ftl ship puzzle | ||
- [ ] Add final cinematic | ||
- [ ] Add free text dialog system |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
created: 2025-02-06T19:19:36Z | ||
--- | ||
|
||
In _no signal_ I'm trying to add a new embedded window, for a total of two embedded windows: the notes window and the map window. I want the user to be able to show and hide these windows, but for some reason when I make a window visible and tell it to grab focus, the other window does not update its visual appearance to show that it is unfocused: | ||
|
||
```gdscript | ||
func _on_notes_button_pressed() -> void: | ||
notes_ui.visible = not notes_ui.visible | ||
if notes_ui.visible: | ||
notes_ui.grab_focus() | ||
func _on_map_button_pressed() -> void: | ||
map_ui.visible = not map_ui.visible | ||
if map_ui.visible: | ||
map_ui.grab_focus() | ||
``` | ||
|
||
I wasn't able to find a way to explicitly drop focus or find out why the other window was not dropping focus, so I worked around it by grabbing the focus of all of the other windows before grabbing the focus of the window I wanted to focus: | ||
|
||
```gdscript | ||
func _on_notes_button_pressed() -> void: | ||
notes_ui.visible = not notes_ui.visible | ||
if notes_ui.visible: | ||
focus_window(notes_ui) | ||
func _on_map_button_pressed() -> void: | ||
map_ui.visible = not map_ui.visible | ||
if map_ui.visible: | ||
focus_window(map_ui) | ||
func focus_window(window_to_focus: Window) -> void: | ||
# For some reason, focus isn't dropped when we focus the new window and | ||
# there's no function to explicitly drop focus. So, to work around this | ||
# we focus the window we want to unfocus right before we focus the | ||
# window we want to focus | ||
for window: Window in get_viewport().get_embedded_subwindows(): | ||
if window != window_to_focus: | ||
window.grab_focus() | ||
window_to_focus.grab_focus() | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
title: "Godot `Window` does not lose focus" | ||
created: 2025-02-06T19:28:51Z | ||
aliases: | ||
- "Godot `Window` does not lose focus" | ||
tags: | ||
- godot | ||
--- | ||
|
||
# Godot `Window` does not lose focus | ||
|
||
For some reason, `Window`s do not always lose focus when other windows are focused. There isn't a function to explicitly drop focus, so to work around this problem you can focus of all of the other windows before grabbing the focus of the window you want to focus. For example: [^1] | ||
|
||
```gdscript | ||
func _on_notes_button_pressed() -> void: | ||
notes_ui.visible = not notes_ui.visible | ||
if notes_ui.visible: | ||
focus_window(notes_ui) | ||
func _on_map_button_pressed() -> void: | ||
map_ui.visible = not map_ui.visible | ||
if map_ui.visible: | ||
focus_window(map_ui) | ||
func focus_window(window_to_focus: Window) -> void: | ||
# For some reason, focus isn't dropped when we focus the new window and | ||
# there's no function to explicitly drop focus. So, to work around this | ||
# we focus the window we want to unfocus right before we focus the | ||
# window we want to focus | ||
for window: Window in get_viewport().get_embedded_subwindows(): | ||
if window != window_to_focus: | ||
window.grab_focus() | ||
window_to_focus.grab_focus() | ||
``` | ||
|
||
[^1]: [20250206191936](entries/20250206191936.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters