MaxWilson / ShiningSword

D&D 5E combat game inspired by XCOM: UFO Defense and Bard's Tale

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EitherN doesn't allow picking multiple options

MaxWilson opened this issue · comments

EitherN collapses when you pick the first option, even if there's multiple allowed, e.g. "pick 7 skills from this list".

The logic error occurs in render:

| Either(None, OneSelection (key, child)) ->
// if the either has no label and is already ready, just omit it from the visual tree and show the child directly. I'm not sure it's correct to ignore renderMe though.
let renderChild (label, children) = render.checked'(label, key, children)
recur shortCircuit (collapsedRender key, renderChild) child

In general it isn't correct to assume that just because there's one selection, the either is ready.