Skip to content

Commit

Permalink
Fix debugger buttons and make them interactable again
Browse files Browse the repository at this point in the history
  • Loading branch information
bits-by-brandon authored Dec 3, 2023
1 parent a440208 commit ac597cb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 2 additions & 0 deletions addons/beehave/debug/debugger_tab.gd
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ func _ready() -> void:

var button := Button.new()
button.flat = true
button.name = "MakeFloatingButton"
button.icon = get_theme_icon(&"ExternalLink", &"EditorIcons")
button.pressed.connect(func(): make_floating.emit())
button.tooltip_text = "Make floating"
Expand All @@ -45,6 +46,7 @@ func _ready() -> void:

var toggle_button := Button.new()
toggle_button.flat = true
toggle_button.name = "TogglePanelButton"
toggle_button.icon = get_theme_icon(&"Back", &"EditorIcons")
toggle_button.pressed.connect(_on_toggle_button_pressed.bind(toggle_button))
toggle_button.tooltip_text = "Toggle Panel"
Expand Down
8 changes: 2 additions & 6 deletions addons/beehave/debug/graph_edit.gd
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,7 @@ func _ready() -> void:
layout_button.flat = true
layout_button.focus_mode = Control.FOCUS_NONE
layout_button.pressed.connect(func(): horizontal_layout = not horizontal_layout)
# Godot 4.2+
if has_method("get_menu_hbox"):
call("get_menu_hbox").add_child(layout_button)
else:
call("get_zoom_hbox").add_child(layout_button)
get_menu_container().add_child(layout_button)
_update_layout_button()


Expand Down Expand Up @@ -152,7 +148,7 @@ func get_menu_container() -> Control:
return call("get_zoom_hbox")

# Godot 4.2+
return call("get_menu_hbox").get_parent()
return call("get_menu_hbox")


func get_status(status: int) -> String:
Expand Down
2 changes: 1 addition & 1 deletion docs/manual/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ In case you want to investigate your behaviors in a separate window, **Beehave**

![how-to-debug-popout](../assets/how-to-debug-popout.png)

If you have any other ideas on how to improve the debug view, please feel free [to provide your feedback here](https://github.com/bitbrain/beehave/discussions/141).
If you have any other ideas on how to improve the debug view, please feel free [to provide your feedback here](https://github.com/bitbrain/beehave/discussions/141).

0 comments on commit ac597cb

Please sign in to comment.