fix(ability-builder): add Condition palette button in canvas mode
The Conditions node only renders when count > 0, so there was no way to add the first condition from the canvas. The "Add Node" palette now has a Condition button that adds a blank ConditionDraft, lays out the node, and auto-selects it so the inspector opens immediately for editing. Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
@@ -955,10 +955,14 @@
|
||||
@onclick="() => { fabpal.Costs.Add(new CostDraft()); AutoLayoutAbility(_focusedAbility); Compile(); }">
|
||||
<i class="bi bi-plus me-1"></i>Cost Entry
|
||||
</button>
|
||||
<button class="btn btn-sm btn-outline-secondary w-100 py-0"
|
||||
<button class="btn btn-sm btn-outline-secondary w-100 mb-1 py-0"
|
||||
@onclick="() => { fabpal.SubGroups.Add(new ActionGroupDraft()); AutoLayoutAbility(_focusedAbility); Compile(); }">
|
||||
<i class="bi bi-plus me-1"></i>Sub-Group
|
||||
</button>
|
||||
<button class="btn btn-sm btn-outline-secondary w-100 py-0"
|
||||
@onclick='() => { fabpal.Conditions.Add(new ConditionDraft()); AutoLayoutAbility(_focusedAbility); _selectedNode = $"cond-{_focusedAbility}"; Compile(); }'>
|
||||
<i class="bi bi-plus me-1"></i>Condition
|
||||
</button>
|
||||
}
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user