frame-of-mind/src/dev-util/bug_button.gd

30 lines
1.1 KiB
GDScript

class_name BugButton extends Button
func _ready() -> void:
pressed.connect(create_bug_report)
text = "copy Debug Info & open Log"
tooltip_text = "Get what is nessecary to create a Bug Report in the Steam Community Forums"
func create_bug_report():
OS.shell_show_in_file_manager(ProjectSettings.globalize_path(ProjectSettings.get_setting("debug/file_logging/log_path")))
var debug_text:String = """Help us identify the bug by
1. Telling us what you did before it happened
2. Describing what you expected to happen and what ended up happening
3. Attaching a screenshot if possible
4. Attaching the Log file that should have popped up on your screen.
5. Leaving in this information:
OS: %s
GPU: %s
Current Focus: %s
Current Scene: %s
Mementos: %s
""" % [OS.get_name(), OS.get_video_adapter_driver_info(), State.stage_list, State.current_room, Scenes.completed_sequences]
#debug_text = debug_text.replace(" ", "%20").replace("\n", "%0A").replace("\t", "")
DisplayServer.clipboard_set(debug_text)
#print_debug("mailto:support@polynormal.games?subject=Frame%20of%20Mind%20Demo%20-%20Bug%20Report&body=" + debug_text)