summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2023-07-13 05:48:19 -0700
committerVito Caputo <vcaputo@pengaru.com>2023-07-13 05:56:52 -0700
commit0f75c3d7e674a89c95717ea8e49e1aafb183d2ad (patch)
tree0a2f47f8b9135d51dd301aa19099d40305b7362c /src/modules
parentdaba1bb530850e08e852957494b4e389d7a12d96 (diff)
modules/rkt: '=' for current Rocket scene in scener
Pressing '=' at either prompts now makes scener's current scene the current Rocket scene. While you could already do this manually by just looking at the scenes list for the one with the '*' in the Rocket column while either watching a production and pressing <enter> repeatedly to keep refreshing the scenes list... that's cumbersome and annoying, now just use this shortcut. Since this just copies Rocket's scene to the Scener scene index, it needed to properly handle scene 99999... hence the previous commits.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/rkt/rkt_scener.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/modules/rkt/rkt_scener.c b/src/modules/rkt/rkt_scener.c
index 1a7bc1a..1a3a025 100644
--- a/src/modules/rkt/rkt_scener.c
+++ b/src/modules/rkt/rkt_scener.c
@@ -318,6 +318,11 @@ static int rkt_scener_handle_input_scenes(rkt_context_t *ctxt)
scener->state = RKT_SCENER_FSM_SEND_SCENES;
break;
+ case '=': /* set scener scene idx to current Rocket scene idx, and go to edit scene view */
+ scener->scene = ctxt->scene;
+ scener->state = RKT_SCENER_FSM_SEND_EDITSCENE;
+ break;
+
case '\0': /* if you don't say anything to even quote as "invalid input", just go back to the scenes dialog */
scener->state = RKT_SCENER_FSM_SEND_SCENES;
break;
@@ -644,6 +649,11 @@ static int rkt_scener_handle_input_editscene(rkt_context_t *ctxt)
scener->state = RKT_SCENER_FSM_SEND_EDITSCENE;
break;
+ case '=': /* set scener scene idx to current Rocket scene idx, and go to edit scene view */
+ scener->scene = ctxt->scene;
+ scener->state = RKT_SCENER_FSM_SEND_EDITSCENE;
+ break;
+
case '\0': /* if you don't say anything to even quote as "invalid input", just go back to the scenes dialog */
scener->state = RKT_SCENER_FSM_SEND_SCENES;
break;
@@ -899,7 +909,7 @@ int rkt_scener_update(rkt_context_t *ctxt)
return rkt_scener_err_close(scener, ENOMEM);
if (i) {
- if (til_str_appendf(output, " [0-%u]", i - 1) < 0)
+ if (til_str_appendf(output, " [0-%u,=]", i - 1) < 0)
return rkt_scener_err_close(scener, ENOMEM);
}
@@ -1211,6 +1221,11 @@ int rkt_scener_update(rkt_context_t *ctxt)
char *as_arg;
til_str_t *output;
+ if (scener->scene == RKT_EXIT_SCENE_IDX) {
+ scener->state = RKT_SCENER_FSM_SEND_SCENES;
+ break;
+ }
+
if (!til_settings_get_value_by_idx(scenes_settings, scener->scene, &scene_setting))
return rkt_scener_err_close(scener, ENOENT);
© All Rights Reserved