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

feat(ui): add keybinding for target radial #5962

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

mwerle
Copy link
Contributor

@mwerle mwerle commented Nov 12, 2024

Add a keybinding to open the target radial menu. The bind is empty by default as per the other target radials.

This allows keyboard controls to fly to, orbit, or dock with the current frame object or nav target, as appropriate.

Copy link
Member

@sturnclaw sturnclaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks simple enough - I have only one spot where I'd prefer some cleanup be done to increase the future maintainability of the code.

I cannot promise a timeline, but I'll be working on allowing Lua to register inputs without the need for the C++-side AddActionBinding calls.

data/pigui/modules/flight-ui/reticule.lua Outdated Show resolved Hide resolved
@mwerle
Copy link
Contributor Author

mwerle commented Nov 13, 2024

I cannot promise a timeline, but I'll be working on allowing Lua to register inputs without the need for the C++-side AddActionBinding calls.

It appears the timeline was <12hrs... should I update this PR to make use of the new API?

@sturnclaw
Copy link
Member

It appears the timeline was <12hrs... should I update this PR to make use of the new API?

The only thing that's currently missing to do so is a nice place to hang a Lua-side InputFrame off of - we don't currently have a good way to track when the WorldView is made active and push/pop an InputFrame in response. Some work would likely be needed to amend PiGuiView.cpp to trigger LuaEvent::Queue("onViewActive", GetViewName()); etc. in the OnSwitchTo and OnSwitchFrom methods.

I leave it at your discretion whether you want to merge this first, then convert all of the radial menu keybinds as described, or expand the scope of this PR and tackle all of the above in this PR.

@mwerle
Copy link
Contributor Author

mwerle commented Nov 14, 2024

I leave it at your discretion whether you want to merge this first, then convert all of the radial menu keybinds as described, or expand the scope of this PR and tackle all of the above in this PR.

Let's keep the scope to the actual feature for now; please merge if acceptable and I'll create a TODO ticket to put in the relevant plumbing and upgrade all radial menus / Lua keybinds in a clean-up ticket.

Add a keybinding to open the target radial menu. The bind is empty by
default as per the other target radials.

This allows keyboard controls to fly to, orbit, or dock with the current
frame object or nav target, as appropriate.
@mwerle mwerle force-pushed the feat/autopilot_controls branch from 894b7ad to 10b0112 Compare November 14, 2024 08:29
@sturnclaw sturnclaw merged commit 9d2b55e into pioneerspacesim:master Nov 14, 2024
4 checks passed
@sturnclaw
Copy link
Member

Merged, thanks!

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

Successfully merging this pull request may close these issues.

2 participants