I'm having a bit of trouble conceptually with dialogs and dialog panes. Here's a mockup of what I want to make. What I don't know how to do is to handle closing the dialog at the end. ButtonTypes is the wrong thing because the different attack types don't map logically to the ButtonTypes enum options.
I think I need to do something like
{:fx/type :dialog-pane
:content {:fx/type :v-box
:children [{:fx/type header-label}
{:fx/type attack-details-label}
(attack-buttons generator attacker target)]}}
Where header-label is a method that produces that header label, attack-details-label produces the text box, and then attack-buttons-generator produces a vector of button objects with the appropriate text and events.
What I can't figure out is the events.I should note, there are at least 7 different possible attack buttons that could be generated, based on the unit involved.