summaryrefslogtreecommitdiffstats
path: root/Scripts/osc_ctrl.py
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2023-02-02 01:02:03 -0800
committeryum <yum.food.vr@gmail.com>2023-02-13 14:36:20 -0800
commit7c6894614dcc3ebc5d4c8839b64f4da761b5ccf0 (patch)
tree6232b86b09190fd162aeb67229da359971b2e517 /Scripts/osc_ctrl.py
parent2fc3b1b978b6e24814e9de7200865b912108bd34 (diff)
Begin work adding emotes
Done: * Users can add images to Fonts/Emotes/ * The basename of that image ('clueless.png' becomes 'clueless') is the keyword to make the image show up in game. * Fix a bug in the shader where letters on the 2nd texture and later would have UV outside of [0.0, 1.0] Not yet implemented: * transcribed words are encoded using emotes mapping
Diffstat (limited to 'Scripts/osc_ctrl.py')
-rw-r--r--Scripts/osc_ctrl.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/Scripts/osc_ctrl.py b/Scripts/osc_ctrl.py
index 93b236b..750059f 100644
--- a/Scripts/osc_ctrl.py
+++ b/Scripts/osc_ctrl.py
@@ -1,11 +1,13 @@
#!/usr/bin/env python3
-import argparse
+from emotes_v2 import EmotesState
from generate_utils import config
-import generate_utils
+from math import ceil
from paging import MultiLinePager
from pythonosc import udp_client
-from math import ceil
+
+import argparse
+import generate_utils
import time
# Based on a couple experiments, this seems like about as fast as we can go
@@ -87,7 +89,7 @@ def updateRegion(client, region_idx, letter_encoded):
# Sends one slice of `msg` to the board then returns. Slices are sent
# in FIFO order; e.g., the most recently spoken words are sent last.
# Returns True if done paging, False otherwise.
-def pageMessage(osc_state: OscState, msg: str) -> bool:
+def pageMessage(osc_state: OscState, msg: str, estate: EmotesState) -> bool:
msg_slice, slice_idx = osc_state.pager.getNextSlice(msg)
if slice_idx == -1:
return True