-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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
[3.x] Add editor keyboard shortcut for Mono Build solution button #52595
[3.x] Add editor keyboard shortcut for Mono Build solution button #52595
Conversation
I think the |
For the implementation of passing |
I didn't mean to set the editor shortcut from C#, just to have the |
I see, for clarity's sake, you mean to move the call to register the shortcut i.e.:
Into one of the cpp files in |
Yes, but I'm not sure where exactly.
I guess that would make sense. |
After a bit of trial and error, I think this is about the right place for it: At this point the checks for Mono being enabled are done, and the cs editor plugin is about to be enabled. Any later than this in the process, and the plugin will try and lookup the shortcut before it's been registered. I have tested on a non-mono build, and the shortcut doesn't get registered as expected. I fixed the shortcut hint label: And the shortcut now sits in a new "mono" category of shortcuts: I haven't got round to testing it with Godot 4 yet, but I will pull down your fix, @raulsntos, and see what happens, when I get a chance later. Thanks. |
Btw, with my initial PR a review was auto requested from the @godotengine/script-editor group, as the original commit registered the editor shortcut in the |
Update GodotSharpEditor.cs & csharp_script.cpp with better casing and localisation for HintTooltip on Build button Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
Thanks! |
Related issue: #39633
This adds a keyboard shortcut for the Build button in Godot Mono 3.x. Default is
Alt+B
(since other suggestions from the issue were taken by the script editor bookmark shortcuts).This exposes the
ED_GET_SHORTCUT
function frommodules\mono\editor\editor_internal_calls.cpp
to the GodotTools C# solution, via a newGodotTools.Internals.Globals
function:GodotTools.Internals.Globals::internal_EditorShortcut
- allowing theGodotSharpEditor.cs
EditorPlugin to retrieve editor shortcuts, which it does to attach a newscript_editor/build_mono_solution
mono/build_solution
shortcut definition to the mono Build button.I couldn't get these changes to compile against
master
; firstly I got an error becauseShortCut
is nowShortcut
, but then I got errors related to themono/editor/code_completion.cpp
file (unchanged):I'm unsure what the status of Mono is in Godot 4? So, I made these changes against
3.x
since that's what I'm using, let me know if this needs to be moved tomaster
, and if I need to change anything to do so.Additionally, I've added the keyboard shortcut under theShortcut is now underscript_editor
shortcut setting group, since that seemed most relevant, however this shortcut will be available even in non-Mono builds; is there a way to conditionally add the shortcut only in a Mono build?mono/build_solution
settings key.Cheers.
Bugsquad edit: This closes godotengine/godot-proposals#3197.