diff infinite_canvas/canvas.c @ 282:6bd4a3990696 default tip

Add cross-platform canvas orchestration and typed composer Enable native ARM dependencies, macOS Copilot orchestration, portable service supervision, CPU dictation, and a shared N-key speak-or-type composer. Co-authored-by: Copilot <[email protected]> Copilot-Session: f68442b1-fa8f-46a0-9689-81710613bbd4
author MrJuneJune <me@mrjunejune.com>
date Thu, 20 Aug 2026 20:45:25 -0700
parents c57149ad216e
children
line wrap: on
line diff
--- a/infinite_canvas/canvas.c	Tue Aug 18 22:18:15 2026 -0700
+++ b/infinite_canvas/canvas.c	Thu Aug 20 20:45:25 2026 -0700
@@ -2113,6 +2113,18 @@
         (float)line_count * CANVAS_TEXT_AREA_LINE_HEIGHT - content.height);
 }
 
+void Canvas_Text_Area_Focus_End(
+    Canvas_Entity *p_entity,
+    Font font)
+{
+    if (!p_entity || p_entity->type != CANVAS_ENTITY_TEXT_AREA) return;
+    p_entity->active = TRUE;
+    p_entity->text_muted = FALSE;
+    p_entity->text_cursor = (int32)strlen(p_entity->text);
+    p_entity->text_selection_anchor = p_entity->text_cursor;
+    Canvas_Text_Ensure_Cursor_Visible(p_entity, font);
+}
+
 static void Canvas_Text_Update_Keyboard(Canvas_Entity *p_entity, Font font)
 {
     boolean shortcut = Canvas_Control_Is_Down();
@@ -3137,7 +3149,9 @@
         boolean dictation = strcmp(p_entity->label, "Dictation") == 0;
         DrawTextEx(
             font,
-            dictation ? "Speak now..." : "Type a thought for Copilot...",
+            dictation
+                ? "Speak with M or type with N..."
+                : "Type a thought for Copilot...",
             (Vector2){content.x, content.y},
             CANVAS_TEXT_AREA_FONT_SIZE,
             CANVAS_TEXT_AREA_SPACING,
@@ -3145,7 +3159,7 @@
         DrawTextEx(
             font,
             dictation
-                ? "Enter to send  |  Backspace to clear"
+                ? "Enter to send  |  Shift+Enter for a new line"
                 : "Ctrl/Cmd+Enter to send",
             (Vector2){content.x, content.y + 22.0f},
             12.0f,