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

dialogic_default_action isn't respected by Centered Choices box #2411

Open
mak448a opened this issue Sep 25, 2024 · 5 comments
Open

dialogic_default_action isn't respected by Centered Choices box #2411

mak448a opened this issue Sep 25, 2024 · 5 comments

Comments

@mak448a
Copy link

mak448a commented Sep 25, 2024

The problem

Describe the bug
dialogic_default_action isn't respected by Centered Choices box. So when I click on a button that I've assigned to this, it doesn't work.

To Reproduce
Steps to reproduce the behavior:

  1. Assign a different button to dialogic_default_action in the Input Map. I used CTRL.
  2. Make a timeline with centered choices.
  3. Try to press ctrl to choose one.
  4. It only works with the default buttons.

Expected behavior
It works with the new button.

Screenshots
If applicable, add screenshots to help explain your problem.

System (please complete the following information):

  • OS: Fedora Linux 40 KDE Spin
  • Godot Version: 4.3
  • Dialogic Version: 2.0 Alpha 15

Solutions

Workaround
You could probably send a space input action when ctrl is pressed?

Possible fixes

Not sure.

@Jowan-Spooner
Copy link
Collaborator

Choices are buttons and that means they use the ui_accept action not the advance action so this is expected. However I think we might be able to add a setting to also use the input action additionally to the ui_accept action.

@mak448a
Copy link
Author

mak448a commented Sep 29, 2024

It seems like when I click on the mouse it freezes up the whole choices box. This may because of the code below.
This is slightly off topic, but could you help me? I have a giant button over the whole screen that sends a dialogic default action event in the code. The choices lock up when I press it on the choice.

Code:

var dialog_advance_action_value: bool = true
func _on_button_button_down() -> void:
	print("Pressing dialogic_default_action...")
	# This one doesn't work. Use other way, as documented in action_press
	# docs. Input.action_press("dialogic_default_action")
	var action_dialog_proceed = InputEventAction.new()
	action_dialog_proceed.action = "dialogic_default_action"
	action_dialog_proceed.pressed = !dialog_advance_action_value
	Input.parse_input_event(action_dialog_proceed)

I assume that it's because I'm not freeing the dialog_advance_action_value by doing a key up? But I did it this way because the advance button gets broken otherwise.

@Jowan-Spooner
Copy link
Collaborator

What do you mean it freezes up the choices?

@mak448a
Copy link
Author

mak448a commented Sep 29, 2024

They don't work anymore. But I do see it's on my end. Sorry! I'll solve it later

@mak448a
Copy link
Author

mak448a commented Sep 29, 2024

Should I close this issue since you can just rebind ui_accept?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants