mirror of
https://github.com/godotengine/godot.git
synced 2025-11-02 14:41:07 +00:00
Add numpad emulation in 3D viewport
(cherry picked from commit 4a26e61e89)
This commit is contained in:
parent
3b11b1022d
commit
f252622d82
2 changed files with 8 additions and 0 deletions
|
|
@ -1927,6 +1927,13 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (EditorSettings::get_singleton()->get("editors/3d/navigation/emulate_numpad")) {
|
||||
const uint32_t code = k->get_scancode();
|
||||
if (code >= KEY_0 && code <= KEY_9) {
|
||||
k->set_scancode(code - KEY_0 + KEY_KP_0);
|
||||
}
|
||||
}
|
||||
|
||||
if (ED_IS_SHORTCUT("spatial_editor/snap", p_event)) {
|
||||
if (_edit.mode != TRANSFORM_NONE) {
|
||||
_edit.snap = !_edit.snap;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue