Dialogue editor: use trigger button text instead of label.
Drop the trigger label field from Configure; port tooltips and canvas port titles use the player-facing button text. Branches keep label.
@@ -147,7 +147,8 @@ export function createDialogueCanvas ({ getDraft, onOpenStep, onCreateStep, onCh
147
147
{
148
148
return (exit.triggers ?? []).map((trig, i) => ({
149
149
key: `trigger:${i}`,
150
label: trig.label || trig.trigger || `Trigger ${i + 1}`,
150
/** Player-facing button text (not the internal trigger id / legacy label). */
151
label: (trig.text ?? "").trim() || trig.trigger || `Trigger ${i + 1}`,
151
152
nextStepId: trig.nextStepId ?? null,
152
153
setNext (id)
153
154
{
@@ -147,7 +147,8 @@ export function createDialogueCanvas ({ getDraft, onOpenStep, onCreateStep, onCh147
{147
{148
return (exit.triggers ?? []).map((trig, i) => ({148
return (exit.triggers ?? []).map((trig, i) => ({149
key: `trigger:${i}`,149
key: `trigger:${i}`,150
label: trig.label || trig.trigger || `Trigger ${i + 1}`,150
/** Player-facing button text (not the internal trigger id / legacy label). */151
label: (trig.text ?? "").trim() || trig.trigger || `Trigger ${i + 1}`,151
nextStepId: trig.nextStepId ?? null,152
nextStepId: trig.nextStepId ?? null,152
setNext (id)153
setNext (id)153
{154
{@@ -437,7 +437,9 @@ export function initDialogueStepModal ({
437
437
{
438
438
const hint = document.createElement("p");
439
439
hint.className = "content-editor-hint";
440
hint.textContent = "Wire next steps on the canvas. Here you edit labels, text, conditions, and effects.";
440
hint.textContent = kind === "triggers"
441
? "Wire next steps on the canvas. Here you edit button text and conditions."
442
: "Wire next steps on the canvas. Here you edit labels and conditions.";
441
443
subBody.append(hint);
442
444
443
445
if (kind === "triggers")
@@ -448,7 +450,6 @@ export function initDialogueStepModal ({
448
450
{
449
451
step.exit.triggers.push({
450
452
trigger: `choice-${step.exit.triggers.length + 1}`,
451
label: `choice-${step.exit.triggers.length + 1}`,
452
453
text: "Choice",
453
454
nextStepId: null,
454
455
when: emptyConditionSet(),
@@ -480,15 +481,11 @@ export function initDialogueStepModal ({
480
481
trig.trigger = v;
481
482
onChange();
482
483
})),
483
field("label", textInput(trig.label ?? "", (v) =>
484
{
485
trig.label = v;
486
onChange();
487
})),
488
field("text (button)", textInput(trig.text, (v) =>
484
field("Button", textInput(trig.text ?? "", (v) =>
489
485
{
490
486
trig.text = v;
491
487
onChange();
488
render();
492
489
}))
493
490
);
494
491
tBox.append(renderConditionSet(trig.when, (next, { remount = true } = {}) =>
@@ -637,7 +634,6 @@ export function initDialogueStepModal ({
637
634
? step.exit.triggers
638
635
: [{
639
636
trigger: "continue",
640
label: "continue",
641
637
text: "Continue",
642
638
nextStepId: null,
643
639
when: emptyConditionSet(),
@@ -437,7 +437,9 @@ export function initDialogueStepModal ({437
{437
{438
const hint = document.createElement("p");438
const hint = document.createElement("p");439
hint.className = "content-editor-hint";439
hint.className = "content-editor-hint";440
hint.textContent = "Wire next steps on the canvas. Here you edit labels, text, conditions, and effects.";440
hint.textContent = kind === "triggers"441
? "Wire next steps on the canvas. Here you edit button text and conditions."442
: "Wire next steps on the canvas. Here you edit labels and conditions.";441
subBody.append(hint);443
subBody.append(hint);442
444
443
if (kind === "triggers")445
if (kind === "triggers")@@ -448,7 +450,6 @@ export function initDialogueStepModal ({448
{450
{449
step.exit.triggers.push({451
step.exit.triggers.push({450
trigger: `choice-${step.exit.triggers.length + 1}`,452
trigger: `choice-${step.exit.triggers.length + 1}`,451
label: `choice-${step.exit.triggers.length + 1}`,452
text: "Choice",453
text: "Choice",453
nextStepId: null,454
nextStepId: null,454
when: emptyConditionSet(),455
when: emptyConditionSet(),@@ -480,15 +481,11 @@ export function initDialogueStepModal ({480
trig.trigger = v;481
trig.trigger = v;481
onChange();482
onChange();482
})),483
})),483
field("label", textInput(trig.label ?? "", (v) =>484
field("Button", textInput(trig.text ?? "", (v) =>484
{485
trig.label = v;486
onChange();487
})),488
field("text (button)", textInput(trig.text, (v) =>489
{485
{490
trig.text = v;486
trig.text = v;491
onChange();487
onChange();488
render();492
}))489
}))493
);490
);494
tBox.append(renderConditionSet(trig.when, (next, { remount = true } = {}) =>491
tBox.append(renderConditionSet(trig.when, (next, { remount = true } = {}) =>@@ -637,7 +634,6 @@ export function initDialogueStepModal ({637
? step.exit.triggers634
? step.exit.triggers638
: [{635
: [{639
trigger: "continue",636
trigger: "continue",640
label: "continue",641
text: "Continue",637
text: "Continue",642
nextStepId: null,638
nextStepId: null,643
when: emptyConditionSet(),639
when: emptyConditionSet(),