diff --git a/vite/src/pages/flow_free.jsx b/vite/src/pages/flow_free.jsx index 2934bde..399e605 100644 --- a/vite/src/pages/flow_free.jsx +++ b/vite/src/pages/flow_free.jsx @@ -99,6 +99,8 @@ export function FreeFlow(){ reset(); sendOsc(OSC_ADDRESS.CHOICE, 'reset'); sendOsc(OSC_ADDRESS.SPEECH, 'stop'); + + setPadInput(); } function onOsc(payload){ @@ -266,6 +268,8 @@ export function FreeFlow(){ sendOsc(OSC_ADDRESS.INPUT, ''); // Clear input message sendOsc(OSC_ADDRESS.SPEECH, 'stop'); + setPadInput(); + switch(cue.type){ case 'chat': // Special case for starting a conversation @@ -329,7 +333,7 @@ export function FreeFlow(){ // if(cue.callback=='fade_in_light') refLight.current.fadeIn(); // Fade in light for conversation start // if(cue.callback=='fade_out_light') refLight.current.fadeOut(); // Fade out light for conversation end - if(cue.hint!=null){ + if(cue.hint!=null && cue.hint_time!=null){ refHintTimeout.current=setTimeout(()=>{ sendOsc(OSC_ADDRESS.HINT, cue.hint); // Send OSC hint message }, cue.hint_time); @@ -389,8 +393,8 @@ export function FreeFlow(){ } - if(cue.hint!=null){ - // sendOsc(OSC_ADDRESS.HINT, cue.hint); // Send OSC hint message + if(cue.hint!=null && cue.hint_time==null){ + sendOsc(OSC_ADDRESS.HINT, cue.hint); // Send OSC hint message }else{ sendOsc(OSC_ADDRESS.HINT, ''); // Clear hint message } @@ -426,7 +430,8 @@ export function FreeFlow(){ function onNumpad(mess){ - setPadInput(mess); + console.log('onNumPad',mess); + setPadInput(()=>mess); } function exportFile(){ diff --git a/vite/src/util/useData.jsx b/vite/src/util/useData.jsx index c044036..7272890 100644 --- a/vite/src/util/useData.jsx +++ b/vite/src/util/useData.jsx @@ -34,7 +34,7 @@ export function DataProvider({children}) { path(GlobalSettingsPath, { baseDir: BaseDirectory.Resource })); } if(!privateExists){ - await writeTextFile(PrivateSettingsPath, JSON.stringify({}), + await writeTextFile(PrivateSettingsPath, JSON.stringify({ id:13}), { baseDir: BaseDirectory.Resource }); console.log("Empty private settings written to", path(PrivateSettingsPath, { baseDir: BaseDirectory.Resource }));