main
ULTRACOMBOS-DEV 3 months ago
parent 7f3c3adf13
commit eb391c04d2
  1. 3
      vite/src/comps/debug.jsx
  2. 9
      vite/src/pages/flow_free.jsx

@ -3,7 +3,7 @@ import { useData } from '../util/useData.jsx';
export const TEST_PROMPT='a window frame, beach outside, island far away';
export function DebugControl({refLight}){
export function DebugControl({onReset}){
const {data} = useData();
@ -17,6 +17,7 @@ export function DebugControl({refLight}){
<div className="grid grid-cols-3 gap-2 [&>button]:rounded-full [&>button]:bg-white bg-gray-200 p-2 w-full justify-center">
<button onClick={() =>{
sendOsc(OSC_ADDRESS.STATUS, 'reset');
onReset();
// refLight.current.set(1);
}}>reset</button>
<button onClick={() => sendOsc(OSC_ADDRESS.STATUS, 'intro')}>intro</button>

@ -97,10 +97,12 @@ export function FreeFlow(){
setSummary(null);
reset();
resetUser();
sendOsc(OSC_ADDRESS.CHOICE, 'reset');
sendOsc(OSC_ADDRESS.SPEECH, 'stop');
setPadInput();
setChoice();
}
function onOsc(payload){
@ -429,13 +431,13 @@ export function FreeFlow(){
}
sendOsc(OSC_ADDRESS.SPEECH, 'stop');
if(cue.numpad_type=='password'){
if(cue.numpad_type=='choice'){
if(!choice){
console.log('set default choice to save');
setChoice('save');
sendOsc(OSC_ADDRESS.CHOICE, 'save'); // Send OSC save choice message
}else{
sendOsc(OSC_ADDRESS.CHOICE, choice); // Send OSC save choice message
// sendOsc(OSC_ADDRESS.CHOICE, choice); // Send OSC save choice message
}
}
@ -498,6 +500,7 @@ export function FreeFlow(){
case NUMPAD_TYPE.CHOICE:
next=cue.branch[padInput.toString()].nextcue;
setChoice(()=>cue.branch[padInput.toString()].description); // Set choice for user input
sendOsc(OSC_ADDRESS.CHOICE, cue.branch[padInput.toString()].description);
break;
case NUMPAD_TYPE.PASSWORD:
setPassword(padInput);
@ -766,7 +769,7 @@ export function FreeFlow(){
<span className='font-bold'>PC {data?.id}</span>
<span className="">{localIP || '...'}</span>
</div>
<DebugControl/>
<DebugControl onReset={resetData}/>
<div className="w-full p-2 grid grid-cols-4 gap-2 items-stretch justify-center *:max-h-[5rem]">
<div className="bg-gray-100 text-4xl font-bold mb-4 flex justify-center items-center">
{refCurrentCue.current?.name}

Loading…
Cancel
Save