From cc2543fe1768aa16572d40fbffd654fc0d32632b Mon Sep 17 00:00:00 2001 From: Daniel Collin Date: Sat, 29 Dec 2012 18:16:59 +0100 Subject: [PATCH] Added support for pressing "return" between keys to create a new key based on the current interpolated value --- ogl_editor/src/Editor.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/ogl_editor/src/Editor.c b/ogl_editor/src/Editor.c index 8f718d8..c0320e9 100644 --- a/ogl_editor/src/Editor.c +++ b/ogl_editor/src/Editor.c @@ -882,6 +882,10 @@ bool Editor_keyDown(int key, int keyCode, int modifiers) } biasSelection(bias_value, selectLeft, selectRight, selectTop, selectBottom); + + Editor_update(); + + return true; } // do edit here and biasing here @@ -935,7 +939,30 @@ bool Editor_keyDown(int key, int keyCode, int modifiers) s_editorData.trackData.editText = 0; } - if (key == 'i' || key == 'I') + if (key == EMGUI_KEY_TAB_ENTER) + { + struct sync_track* t = getTracks()[active_track]; + + if (t->keys) + { + struct track_key key; + int idx = sync_find_key(t, row_pos); + if (idx < 0) + idx = -idx - 1; + + key.row = row_pos; + key.value = sync_get_val(t, row_pos); + key.type = t->keys[emaxi(idx - 1, 0)].type; + + sync_set_key(t, &key); + + RemoteConnection_sendSetKeyCommand(t->name, &key); + } + + handled_key = true; + } + + if (key == 'i' || key == 'I' || key == 'q') { struct track_key newKey; struct sync_track* track = tracks[active_track];