Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugger visuals broken in 4.2 #232

Open
bitbrain opened this issue Oct 14, 2023 · 7 comments
Open

Debugger visuals broken in 4.2 #232

bitbrain opened this issue Oct 14, 2023 · 7 comments
Labels
🐛 bug Something isn't working 🔨 debugger Issues related to the debugger.

Comments

@bitbrain
Copy link
Owner

Godot version: 4.2
Beehave Version: 2.7.6

Describe the bug

With the debugger being fixed in 4.2, its visuals are still broken:
Screenshot 2023-10-14 142405

@bitbrain bitbrain added the 🐛 bug Something isn't working label Oct 14, 2023
@bits-by-brandon
Copy link
Contributor

@bitbrain Partially able to fix this by updating the property reference from port_offset to port_h_offset. That only fixed the x axis though

add_theme_constant_override("port_offset", 12 * BeehaveUtils.get_editor_scale() if horizontal else round(size.x / 2.0))

@bits-by-brandon
Copy link
Contributor

bits-by-brandon commented Dec 1, 2023

Also from this PR: godotengine/godot#79311

GraphNode: get_port_input/output_position returns no longer the position premultiplied with the scale

Could this be part of the issue?

@bits-by-brandon
Copy link
Contributor

Oh wait I think I see the issue. The ports positions are now based on the inner container node, not the outermost node.

@bitbrain
Copy link
Owner Author

bitbrain commented Dec 2, 2023

@bits-by-brandon feel free to raise a PR!

@bits-by-brandon
Copy link
Contributor

Fiddled around with it for a little bit, and I can't seem go find a way to fix this without changing a lot of the layout implementation. I'm hesitant to lay a bunch of conditionals in here, im wondering if we need a different 4.2.x branch, or some other strategy for separating the layout needed for 4.2

@bitbrain
Copy link
Owner Author

bitbrain commented Dec 3, 2023

@bits-by-brandon I recommend creating a new scene structure for 4.2 (but keep the existing debugger) and have a toggle like this somewhere:

if godot 4.2+:
load new debugger
else:
load old debugger

@bits-by-brandon
Copy link
Contributor

@bitbrain Okay working with something along these lines. I could also use has_method to branch based on capabilities instead of version numbers

func _ready() -> void:
	var version_info = Engine.get_version_info()
	if version_info.minor >= 2:
		modify_node_layout()
	else:
		build_custom_layout()

@bitbrain bitbrain pinned this issue Dec 4, 2023
@bitbrain bitbrain added the 🔨 debugger Issues related to the debugger. label May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working 🔨 debugger Issues related to the debugger.
Projects
None yet
Development

No branches or pull requests

2 participants